webext-dynamic-content-scripts icon indicating copy to clipboard operation
webext-dynamic-content-scripts copied to clipboard

Manifest v3 compatibility

Open fregante opened this issue 4 years ago • 8 comments
trafficstars

Manifest v3 might have brought some changes that broke this script. I never tested it, but it should be.

fregante avatar Mar 15 '21 10:03 fregante

This module is potentially deprecated and no longer necessary in MV3: https://github.com/fregante/webext-domain-permission-toggle/issues/19#issuecomment-817239856 🎉

fregante avatar Apr 11 '21 03:04 fregante

These might have further context: https://bugzilla.mozilla.org/show_bug.cgi?id=1687761 https://bugs.chromium.org/p/chromium/issues/detail?id=1054624

fregante avatar Jun 06 '21 06:06 fregante

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

twschiller avatar Jun 09 '21 02:06 twschiller

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/

fregante avatar Jun 09 '21 03:06 fregante

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

fregante avatar Apr 07 '22 17:04 fregante

FYI: web extensions working group thread: https://github.com/w3c/webextensions/issues/119

twschiller avatar Apr 07 '22 22:04 twschiller

Hey!

Any plans on migrating to support MV3? I guess "scripting" permission is required etc.

guyschlider avatar Jun 02 '22 15:06 guyschlider

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_permissions in https://github.com/fregante/webext-additional-permissions/issues/8
  • [ ] Use scripting.registerContentScripts() instead of contentScript.register() if available

Implementing this likely isn't very difficult, but testing it will be time consuming.

fregante avatar Jun 02 '22 17:06 fregante