Hi folks,
I'm working on porting our MV2 extension to MV3.
Our MV2 extension has the "activeTab" permission, and uses chrome.tabs.executeScript to inject a file (packaged as a static part of the extension) into browser tabs that the user has interacted with (via our browser action button). This all works great.
MV3 has removed chrome.tabs.executeScript and instead wants us to use chrome.scripting.executeScript, which requires a new permission, "scripting".
Two questions, if anybody knows the answer:
a) Will chrome.scripting play nice with "activeTab" permission and allow us to inject into tabs the user has interacted with? We don't want to have any host permissions, we only want to base injection on tabs the user has chosen.
b) If we add "scripting" to our "permissions" key in manifest.json at the same moment that we update to MV3, given that we previously had the capability to do scripting via chrome.tabs.executeScript, will Chrome decide we "added a permission" or will it allow the update without user action?
My concern is that at least in the past, adding a permission would cause extensions to get disabled for all users, without any special prompt about allowing them again, so likely we'd lose all installs, get a flood of support requests, and need to help tens of thousands of users to reinstall or re-enable the extension.
The alternative would be to add this as an "optional_permission" and prompt the user to allow it, but this is a sub-optimal user experience and strictly worse than how the extension exists today.
Thanks for any feedback you might have!
Best regards,
Jói