highlight icon indicating copy to clipboard operation
highlight copied to clipboard

Switch to Manifest V3

Open dstein64 opened this issue 2 years ago • 2 comments

This PR updates the extension to use Manifest V3.

Starting in January 2023, "the Chrome browser will no longer run Manifest V2 extensions." (source)

Firefox does not currently support Manifest V3, but it is scheduled to be available soon: "we are hoping to complete enough work on this project to support developer testing in Q4 2021 and start accepting v3 submissions in early 2022." (source)

dstein64 avatar Feb 26 '22 01:02 dstein64

~Currently autonomous highlighting and global highlighting don't work. The following change in manifest.json would fix the issue:~

   },
   "permissions": ["activeTab", "contextMenus", "scripting", "storage"],
   "optional_permissions": ["tabs", "clipboardWrite"],
+  "host_permissions": ["<all_urls>"],
   "background": {
     "service_worker": "src/eventPage.js"
   },

~There is currently no way to add optional host permissions, which the extension utilized under Manifest V2 in order to support autonomous highlighting and global highlighting.~

~The following links have related information. There is a proposal to add optional_host_permissions.~

  • ~https://groups.google.com/a/chromium.org/g/chromium-extensions/c/EnUmtHWOI9o~
  • ~https://github.com/w3c/webextensions/issues/119~
  • ~https://bugs.chromium.org/p/chromium/issues/detail?id=1265064~

~With optional_host_permissions the plugin could support autonomous highlighting and global highlighting in the same way it did under Manifest V2.~

   },
   "permissions": ["activeTab", "contextMenus", "scripting", "storage"],
   "optional_permissions": ["tabs", "clipboardWrite"],
+  "optional_host_permissions": ["<all_urls>"],
   "background": {
     "service_worker": "src/eventPage.js"
   },

dstein64 avatar Feb 26 '22 02:02 dstein64

Chromium 614b578 adds optional_host_permissions.

Support was added to Auto Highlight in eedb48218580aa3007086af41daec0240e157561.

dstein64 avatar Apr 03 '22 19:04 dstein64