Skip to content

Commit daf5182

Browse files
committed
Remove browser-polyfill.js from Firefox builds.
1 parent 7dba310 commit daf5182

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

manifest.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ if (isFirefox) {
6262
for (const size of [16, 32, 48, 64, 128, 256]) {
6363
json.icons[size] = "img/logo.svg";
6464
}
65+
for (const s of [json.background.scripts, json.content_scripts[0].js]) {
66+
s.splice(s.indexOf("/nscl/lib/browser-polyfill.js"), 1);
67+
}
6568
}
6669

6770
if (MANIFEST_VER.includes(3)) {
@@ -70,7 +73,6 @@ if (MANIFEST_VER.includes(3)) {
7073

7174
const excludedScriptsRx = /\bcontent\/(?:embeddingDocument|dirindex)\.js$/;
7275
const scriptsFilter = src => !excludedScriptsRx.test(src);
73-
console.log(json.background);
7476
json.background.scripts = json.background.scripts.filter(scriptsFilter);
7577
for (const cs of json.content_scripts) {
7678
cs.js = cs.js.filter(scriptsFilter);
@@ -117,9 +119,6 @@ if (MANIFEST_VER.includes(3)) {
117119
delete json.web_accessible_resources;
118120
delete json.host_permissions;
119121
delete json.action;
120-
121-
// match_origin_as_fallback is MV3 only
122-
// json.content_scripts.forEach(cs => delete cs.match_origin_as_fallback);
123122
}
124123

125124
if (isFirefox || json.manifest_version == 2) {

0 commit comments

Comments
 (0)