Hi,
I noticed that now the permission is optional, but also required, because the content_scripts property in the manifest requires it to insert the content script into every page. This pull request registers and unregisters the content script depending on the optional permission.
I need to save the contentScriptObject in the state of the addon, so I can unregister the content script, when the option is disabled. You could also simplify the code, by just letting the content script stay registered until the browser is relaunched, but I believe that this is the proper way to do it.
Hi, I noticed that now the permission is optional, but also required, because the content_scripts property in the manifest requires it to insert the content script into every page. This pull request registers and unregisters the content script depending on the optional permission.
I need to save the contentScriptObject in the state of the addon, so I can unregister the content script, when the option is disabled. You could also simplify the code, by just letting the content script stay registered until the browser is relaunched, but I believe that this is the proper way to do it.