webext-dynamic-content-scripts
webext-dynamic-content-scripts copied to clipboard
Manifest v3 compatibility
Manifest v3 might have brought some changes that broke this script. I never tested it, but it should be.
This module is potentially deprecated and no longer necessary in MV3: https://github.com/fregante/webext-domain-permission-toggle/issues/19#issuecomment-817239856 🎉
These might have further context: https://bugzilla.mozilla.org/show_bug.cgi?id=1687761 https://bugs.chromium.org/p/chromium/issues/detail?id=1054624
The new chrome.scripting API is here: https://developer.chrome.com/docs/extensions/reference/scripting/
You can inject code as long as they're bundled with the extension
It seems that that API is only slightly different from the chrome.tabs.executeScript API and is not applicable/useful here, this module would still have to register scripts through the contentScripts.register API/polyfill.
This seems to be confirmed by their blog posts, which only alludes to future extensions similar to Firefox’ contentScripts API: https://developer.chrome.com/blog/crx-scripting-api/
Safari may be the first to support optional_host_permissions, and this should mean others will follow and this issue will be unblocked soon 🎊
https://developer.apple.com/documentation/safari-release-notes/safari-15_5-release-notes
FYI: web extensions working group thread: https://github.com/w3c/webextensions/issues/119
Hey!
Any plans on migrating to support MV3? I guess "scripting" permission is required etc.
Chrome appears to have implemented optional_host_permissions according to
- https://bugs.chromium.org/p/chromium/issues/detail?id=1265064
- https://developer.chrome.com/docs/extensions/mv3/manifest/
Next:
- [ ] Support
optional_host_permissionsin https://github.com/fregante/webext-additional-permissions/issues/8 - [ ] Use
scripting.registerContentScripts()instead ofcontentScript.register()if available
Implementing this likely isn't very difficult, but testing it will be time consuming.