Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 31, 2025

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_version from 2 to 3
  • Replaced background.scripts with background.service_worker pointing to background.js
  • Changed browser_action to action (new V3 terminology)
  • Added "scripting" permission required for the new script injection API
  • Updated command from _execute_browser_action to _execute_action

background.js

  • Replaced deprecated chrome.browserAction.onClicked with chrome.action.onClicked
  • Updated script injection from chrome.tabs.executeScript() to chrome.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.storage API)
  • 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.

Co-authored-by: sprig <2652983+sprig@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] update to manifest v3 Update to Manifest V3: Migrate Chrome extension to modern APIs Jul 31, 2025
@Copilot Copilot AI requested a review from sprig July 31, 2025 23:53
Copilot finished work on behalf of sprig July 31, 2025 23:53
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.

2 participants