Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Manifest V3 #8

Merged
merged 12 commits into from
Mar 18, 2024
Merged

Switch to Manifest V3 #8

merged 12 commits into from
Mar 18, 2024

Conversation

dstein64
Copy link
Owner

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
Copy link
Owner Author

dstein64 commented Feb 26, 2022

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.

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"
   },

This way, callbacks can be executed without "Unchecked
runtime.lastError".
@dstein64
Copy link
Owner Author

dstein64 commented Apr 3, 2022

Chromium 614b578 adds optional_host_permissions.

Support was added to Auto Highlight in eedb482.

@dstein64 dstein64 merged commit f0c106f into master Mar 18, 2024
1 check passed
@dstein64 dstein64 deleted the manifest_v3 branch March 18, 2024 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant