keysocket
keysocket copied to clipboard
Update extension to Manifest V3
Google Chrome extensions are required to migrate from Manifest V2 to Manifest V3 for continued support and publication in the Chrome Web Store. This update involves rewriting the extension's manifest file and updating code to comply with Manifest V3 specifications.
Key considerations:
- Manifest V3 requires background scripts to run as service workers (non-persistent). All logic in the background page must be refactored for the new model and tab registration state may need to be stored in
chrome.storage. - Content scripts and messaging patterns are still supported, but all background communication must now be handled in the service worker context.
- Context menus and page actions are still supported, with API usage updated for service workers.
- Script injection via content scripts is still possible, but must avoid deprecated APIs (
eval, etc.) and follow Manifest V3 restrictions. Usechrome.scripting.executeScriptwhere appropriate. - All permissions in
manifest.jsonshould be reviewed and updated for MV3. - The extension’s core functionality (media key control, script injection, tab registration, etc.) is possible with Manifest V3, but requires code updates for service worker, state, and injection patterns.
Tasks:
- Update
manifest.jsonto version 3 format. - Refactor background logic for service worker (event-driven model).
- Update messaging, permissions, and script injection for MV3 compliance.
- Test all extension features (media key control, per-site plugins, context menus) in Chrome with Manifest V3.
- Update documentation and usage instructions as needed.
Seems like https://github.com/weihenglim/keysocket already did a version upgrade