WesleyBranton / Grandfather-Clock

Turn your browser into a grandfather clock that plays a tune at the top of each hour!
https://addons.mozilla.org/firefox/addon/grandfather-clock/
Mozilla Public License 2.0
3 stars 1 forks source link

Replace navigation-based timer verification with the Tab API #20

Closed WesleyBranton closed 3 years ago

WesleyBranton commented 3 years ago

To address issues with the add-on timer sometimes stopping, failing to fire or not be set properly, some automatic functions were added to make sure that the timer is set and is set to a time in the future. These functions are triggered by user navigation in the browser.

A big disadvantage to this approach is that the user needs to grant the add-on permission to "Access browser activity during navigation" when they install the add-on. For many, this seems like access that the add-on should not have, given the purpose of the add-on. I agree.

Instead of triggering the automatic timer verification functions when the user navigates a page, these could be triggered using the Tab API. The Tab API can detect changes to the user's tabs (created, closed, website changed, etc) without any additional permissions.