Migrate Chrome extension to Manifest V3#99
Open
arkanovicz wants to merge 1 commit intoosnr:masterfrom
Open
Conversation
Chrome 139+ no longer supports Manifest V2 extensions. This commit updates TabFS to use Manifest V3 for Chrome compatibility. Changes: - manifest.json: Update to manifest_version 3 - Move <all_urls> from permissions to host_permissions - Add "scripting" permission for chrome.scripting API - Replace background scripts with service_worker - Remove deprecated content_security_policy format - background.js: Adapt for MV3 service worker environment - Replace browser.tabs.executeScript with chrome.scripting.executeScript - Add executeScript() helper that uses eval in MAIN world context - Replace window.Routes with globalThis.Routes for service worker - Replace window.fetch with fetch (service workers have fetch natively) - Add browser shim (const browser = globalThis.browser || chrome) Notes: - Native messaging keeps service worker alive (Chrome 100+) - Firefox users can continue using MV2 (Firefox doesn't deprecate MV2) - The eval-based script execution maintains compatibility with TabFS's dynamic code execution features (evals/, watches/, inputs/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chrome 139+ no longer supports Manifest V2 extensions. This commit updates TabFS to use Manifest V3 for Chrome compatibility.
Changes:
manifest.json: Update to manifest_version 3
background.js: Adapt for MV3 service worker environment
Notes:
Note: this must be carefully reviewed, most changes were performed by a coding agent.