More Safari support (#2171)
* Add support for not building a zip * Update gitignore * Add safari variant
This commit is contained in:
parent
aa5e13b441
commit
e61edc387c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
builds
|
builds
|
||||||
|
.DS_Store
|
||||||
|
@ -141,9 +141,11 @@ async function build(buildDir, extDir, manifestUtil, variantNames, manifestPath,
|
|||||||
|
|
||||||
const modifiedManifest = manifestUtil.getManifest(variant.name);
|
const modifiedManifest = manifestUtil.getManifest(variant.name);
|
||||||
|
|
||||||
|
ensureFilesExist(extDir, excludeFiles);
|
||||||
|
|
||||||
|
if (typeof fileName === 'string') {
|
||||||
const fileNameSafe = path.basename(fileName);
|
const fileNameSafe = path.basename(fileName);
|
||||||
const fullFileName = path.join(buildDir, fileNameSafe);
|
const fullFileName = path.join(buildDir, fileNameSafe);
|
||||||
ensureFilesExist(extDir, excludeFiles);
|
|
||||||
if (!dryRun) {
|
if (!dryRun) {
|
||||||
fs.writeFileSync(manifestPath, ManifestUtil.createManifestString(modifiedManifest));
|
fs.writeFileSync(manifestPath, ManifestUtil.createManifestString(modifiedManifest));
|
||||||
}
|
}
|
||||||
@ -160,6 +162,7 @@ async function build(buildDir, extDir, manifestUtil, variantNames, manifestPath,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
process.stdout.write('\n');
|
process.stdout.write('\n');
|
||||||
}
|
}
|
||||||
|
@ -306,6 +306,26 @@
|
|||||||
"js/dom/simple-dom-parser.js",
|
"js/dom/simple-dom-parser.js",
|
||||||
"lib/parse5.js"
|
"lib/parse5.js"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "safari",
|
||||||
|
"fileName": null,
|
||||||
|
"modifications": [
|
||||||
|
{"action": "remove", "path": ["optional_permissions"], "item": "clipboardRead"},
|
||||||
|
{"action": "remove", "path": ["permissions"], "item": "webRequestBlocking"},
|
||||||
|
{"action": "delete", "path": ["content_scripts", 0, "match_about_blank"]},
|
||||||
|
{"action": "delete", "path": ["sandbox"]},
|
||||||
|
{
|
||||||
|
"action": "set",
|
||||||
|
"path": ["content_security_policy"],
|
||||||
|
"value": "default-src 'self'; script-src 'self' 'unsafe-eval'; img-src blob: 'self'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"excludeFiles": [
|
||||||
|
"sw.js",
|
||||||
|
"js/dom/simple-dom-parser.js",
|
||||||
|
"lib/parse5.js"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user