Content_Scripts optional host permission? (MV2 and MV3)

Well, I have a feeling there is one more (rare) use-case. When the addon is disabled and it’s later on enabled (none of those events will fire).
I’m actually using session store to check if the background script is executing for the first time (by storing there some dummy “addonStarted” value).

If user has already tabs opened, registering script for them doesn’t run it in there, only after they are reloaded.
Also, Firefox was missing the persistAcrossSessions option, so after restarting browser, the session restore could again restore tabs before the content script was registered.

1 Like