Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.

Expand Down
11 changes: 1 addition & 10 deletions src/background_scripts/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
})();
Expand Down
2 changes: 1 addition & 1 deletion src/manifest_chrome.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion src/manifest_gecko.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down