arifwn / TinySuspender

Unload idle tabs to reduce memory and cpu usage.
54 stars 11 forks source link

Added dark mode styles and settings #1

Closed abdusco closed 7 years ago

abdusco commented 7 years ago

I added an option to toggle night mode for the popup, settings and suspended page. However, the solution for the detection of dark mode preference on suspended page relies on parsing URL, so when dark mode is toggled off, the suspended status pages won't be updated if they're shown before the change. Not sure how to circumvent this, or if it matters at all.

Edit Screenshots:

arifwn commented 7 years ago

Thanks! Sorry I can't review this immediately, but I'll get to it in the coming days.

However, the solution for the detection of dark mode preference on suspended page relies on parsing URL, so when dark mode is toggled off, the suspended status pages won't be updated if they're shown before the change. Not sure how to circumvent this, or if it matters at all.

Actually you should be able to listen to chrome.storage.onChanged event on the suspend page (suspend.js) to make the page notified when settings changed. It is used in core.js to make the Chrome alarms (the suspension timers) got reinitialized when timeout settings updated. I'll put this in suspend.js when I merge your pull request.

Again, thanks a lot for taking the time to make this modification!

arifwn commented 7 years ago

Your pull request has been merged and published to chrome webstore as version 1.3.0. Thanks!