Is there any way to have a content_script permission that is optional? I don’t want to add a new content script to my add-on and have every user need to accept a new permission when they update (particularly because this permission is google.com and seeing “access your data from google.com” in an update doesn’t seem super great). I’ve tried adding the url to the optional permissions, but the match url from the content script always seems to be added to the required permissions when loading the add-on.
I’ve been attempting to use the scripting.registerContentScripts. It sort of works, but when reloading the add-on, the content_script doesn’t seem to be registered anymore, so I assume that it won’t be registered in normal installs when closing and reopening the browser.
I need something that works in both Manifest V2 and V3 because my add-on is still V2 for Firefox, but V3 for Chrome.