org-capture-extension
org-capture-extension copied to clipboard
Update to Manifest V3: Migrate Chrome extension to modern APIs
This PR migrates the Org Capture extension from Chrome Manifest V2 to Manifest V3, ensuring compatibility with modern Chrome browsers and future-proofing the extension.
Changes Made
manifest.json
- Updated
manifest_versionfrom 2 to 3 - Replaced
background.scriptswithbackground.service_workerpointing tobackground.js - Changed
browser_actiontoaction(new V3 terminology) - Added
"scripting"permission required for the new script injection API - Updated command from
_execute_browser_actionto_execute_action
background.js
- Replaced deprecated
chrome.browserAction.onClickedwithchrome.action.onClicked - Updated script injection from
chrome.tabs.executeScript()tochrome.scripting.executeScript()with new target-based API structure
Compatibility
All existing functionality is preserved:
- The extension continues to capture web pages and send them to Emacs via org-protocol
- Options page and storage functionality remain unchanged (using V3-compatible
chrome.storageAPI) - Keyboard shortcuts and user interface behavior are identical
- All configuration options work as before
Testing
- ✅ Manifest syntax validation passes
- ✅ All JavaScript files have valid syntax
- ✅ Extension file structure is complete
- ✅ Chrome APIs used in content scripts are V3-compatible
This migration addresses Chrome's deprecation of Manifest V2 and ensures the extension will continue working in future Chrome versions that require Manifest V3.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.