louisbarclay / nudge

Nudge makes the internet less addictive.
https://nudgeware.io
MIT License
144 stars 9 forks source link

onIdle event triggered too late #13

Closed louisbarclay closed 7 years ago

louisbarclay commented 7 years ago

image

louisbarclay commented 7 years ago

This means we might need to check every second whether window has focus and whether system is idle.

How does system idle work? If another program is active, does that mean system never goes idle?

Tests:

Research:

Notes:

19:26:36 nO dOmAiN Gone idle zZZzZzZZ

That event should have happened before - but only registered once we went back to the browser.

image

louisbarclay commented 7 years ago

actually 2 problems here: 1) didn't register window had changed 2) fired chrome idle too late

louisbarclay commented 7 years ago

Fixed some stuff for this. Think it's better now