fregante / webext-permission-toggle

Browser-action context menu to request permission for the current tab.
https://fregante.github.io/webext-permission-toggle/
MIT License
70 stars 5 forks source link

Menu item out of date on extension start #44

Closed fregante closed 3 months ago

fregante commented 9 months ago

Since it only listen on tab changes, if the extension loads and the user doesn't change the tab, the menu item is not up to date.

This happens for example when the browser starts.

fregante commented 3 months ago

I think that browser startup is covered by the tab update listeners because the event is fired multiple times as the page loads:

https://github.com/fregante/webext-permission-toggle/blob/9f9e40cd8910f737fe8b924584b075e1f7a7a7fc/index.ts#L244-L248

So this only applies when all these are true:

Quite a long list of coincidences that basically only happen when testing the extension.

Not sure I care right this moment.