Skip to content

Commit

Permalink
[mv3] Remove obsolete Firefox workaround code
Browse files Browse the repository at this point in the history
Related commit:
2e745f9
  • Loading branch information
gorhill committed Feb 22, 2025
1 parent 0013e04 commit 02b78fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions platform/mv3/extension/js/scripting-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import { ubolLog } from './debug.js';

/******************************************************************************/

const isGecko = browser.runtime.getURL('').startsWith('moz-extension://');

const resourceDetailPromises = new Map();

function getScriptletDetails() {
Expand Down Expand Up @@ -467,16 +465,11 @@ function registerScriptlet(context, scriptletDetails) {
allFrames: true,
matches,
excludeMatches,
matchOriginAsFallback: true,
runAt: 'document_start',
world: 'MAIN',
};

// https://bugzilla.mozilla.org/show_bug.cgi?id=1736575
// `MAIN` world not yet supported in Firefox
if ( isGecko === false ) {
directive.world = 'MAIN';
directive.matchOriginAsFallback = true;
}

// register
if ( registered === undefined ) {
context.toAdd.push(directive);
Expand Down
4 changes: 2 additions & 2 deletions platform/mv3/firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "127.0"
"strict_min_version": "128.0"
},
"gecko_android": {
"strict_min_version": "127.0"
"strict_min_version": "128.0"
}
},
"declarative_net_request": {
Expand Down

0 comments on commit 02b78fb

Please sign in to comment.