diff --git a/README.md b/README.md index b1735b8..8f74aba 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ For this reason, this solution is not the best in this case, but when I started # Known Issues -This extension is unable to work with window focus (reason discussed right above), therefore the time count becomes unreliable in case the user unfocus the browser window somehow. This makes that the time keeps counting up for the site that was last focusued before the window lost focus. +This extension is unable to work with window focus (reason discussed right above), therefore the time count becomes unreliable in case the user unfocus the browser window somehow. This makes that the time keeps counting up for the site that was last focusued before the window lost focus. # Using the extension Right after installing the extension, it will start collecting time data from the sites accessed by following the default settings, defined in the `Setting` section that can be found in the page shown by options menu, that can be accessed by right clicking the extension's menu. @@ -101,12 +101,12 @@ This extension is compatible with **Firefox**; **Google Chrome and derivatives** # Installation * Firefox: [Add-ons for Firefox page](https://addons.mozilla.org/en-US/firefox/addon/page-stat/); -* Google Chrome: [Chrome Web Store page](https://chrome.google.com/webstore/detail/page-stat/iifimpgnkpmahfnopiaidbohgepbeggd); +* Google Chrome: [Chrome Web Store page](https://chrome.google.com/webstore/detail/page-stat/iifimpgnkpmahfnopiaidbohgepbeggd); * Opera: Follow the instructions below. ## Install Chrome extension on Opera 1. Install the `Install Chrome Extensions` addon for Opera. ([link](https://addons.opera.com/en/extensions/details/install-chrome-extensions/)) -2. Go to the [Chrome Web Store page](https://chrome.google.com/webstore/detail/page-stat/iifimpgnkpmahfnopiaidbohgepbeggd); +2. Go to the [Chrome Web Store page](https://chrome.google.com/webstore/detail/page-stat/iifimpgnkpmahfnopiaidbohgepbeggd); 3. Hit the button `Add to Opera`; 4. Click OK on the dialogue that will show up; 5. Click the `Install` button. @@ -116,6 +116,9 @@ See the specifications regarding unpacked extensions for your particular browser # ChangeLog +## v1.0.2 +Fixed a bug where favicons couldn't be fetched due to CORS issues. + ## v1.0.1 * Fixed a bug where hosts accessed between two different days were getting their time calculated erroneously. diff --git a/src/background_scripts/page.js b/src/background_scripts/page.js index a2af12d..e4e1c5a 100644 --- a/src/background_scripts/page.js +++ b/src/background_scripts/page.js @@ -6,16 +6,7 @@ class Page { this.time[today()] = Date.now() - host.focusedAt; return (async () => { - this.favicon = await fetch(faviconAPI + host.host) - .then(res => res.blob()) - .then(blob => new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - resolve(reader.result); - } - reader.onerror = reject; - reader.readAsDataURL(blob); - })); + this.favicon = faviconAPI + host.host; return this; })(); diff --git a/src/manifest_chrome.json b/src/manifest_chrome.json index 09fac50..1bbd89f 100644 --- a/src/manifest_chrome.json +++ b/src/manifest_chrome.json @@ -1,6 +1,6 @@ { "name": "Page Stat", - "version": "1.0.1", + "version": "1.0.2", "description": "Display time usage statistics for accessed pages", "manifest_version": 2, "permissions": [ diff --git a/src/manifest_gecko.json b/src/manifest_gecko.json index 6c036f3..f8768d0 100644 --- a/src/manifest_gecko.json +++ b/src/manifest_gecko.json @@ -1,6 +1,6 @@ { "name": "Page Stat", - "version": "1.0.1", + "version": "1.0.2", "description": "Display time usage statistics for accessed pages", "manifest_version": 2, "permissions": [