proginosko / LeechBlockNG-chrome

LeechBlock NG (Next Generation) for Chrome is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. All you need to do is specify which sites to block and when to block them.
https://www.proginosko.com/leechblock/
Mozilla Public License 2.0
73 stars 14 forks source link

Time that computer spent in suspended state is counted as active browsing #19

Closed k32 closed 3 years ago

k32 commented 3 years ago

Hi,

Thanks for the extension! I believe there is a bug that can be reproduced like following: 1) Configure a block set with a time limit (via "Enter a time limit after which to block these sites (optional):" setting) 1) Open a tab with a site that belongs to the block set. 1) Suspend the computer 1) Wake up the computer some time later 1) The tab immediately gets blocked

Ideally, the extension should account for such gaps in time.

proginosko commented 3 years ago

This should have been fixed in version 1.0.6.2 (see #18). Which version of LB do you have installed?

k32 commented 3 years ago

Hi, I have this exact version: 1.0.6.2. There is one important detail that I forgot to mention: I use Vivaldi rather than chrome.

Vivaldi | 3.2.1967.47 (Stable channel) (64-bit)
OS | Linux
proginosko commented 3 years ago

This could be an issue with Vivaldi not properly registering to the extension that the window/tab has lost its focus.

Try the following test. Set up LB to block some site after 15 minutes in every hour. Open the site in your browser and check that the timer is counting down. Put the computer to sleep for a minute or two (don't minimize the browser window or switch applications) then wake it up and see whether the timer has gone down during the whole time the computer was asleep. Let me know what you find!

I tested this with both Firefox and Chrome, and LB works fine (the timer doesn't go down when the computer is asleep).

Also check that the option "Count time spent on these sites only when browser tab is active" is selected.

k32 commented 3 years ago

Interesting, it didn't go down. I suspect the extension auto-updated between filing the bug report and checking the version. Sorry for bogus error report.

proginosko commented 3 years ago

No worries! Just reopen this issue if the problem recurs.