remove shortcuts from firefox and opera manifest
This commit is contained in:
parent
5d0c480586
commit
c05128d9f5
11
gulpfile.js
11
gulpfile.js
|
@ -66,6 +66,7 @@ gulp.task('dist:firefox', (cb) => {
|
|||
return dist('firefox', (manifest) => {
|
||||
delete manifest['-ms-preload'];
|
||||
delete manifest.content_security_policy;
|
||||
removeShortcuts(manifest);
|
||||
return manifest;
|
||||
});
|
||||
});
|
||||
|
@ -75,6 +76,7 @@ gulp.task('dist:opera', (cb) => {
|
|||
delete manifest['-ms-preload'];
|
||||
delete manifest.applications;
|
||||
delete manifest.content_security_policy;
|
||||
removeShortcuts(manifest);
|
||||
return manifest;
|
||||
});
|
||||
});
|
||||
|
@ -90,6 +92,15 @@ gulp.task('dist:chrome', (cb) => {
|
|||
});
|
||||
});
|
||||
|
||||
function removeShortcuts(manifest) {
|
||||
if (manifest.content_scripts && manifest.content_scripts.length > 1) {
|
||||
const shortcutsScript = manifest.content_scripts[1];
|
||||
if (shortcutsScript.js.indexOf('content/shortcuts.js') > -1) {
|
||||
manifest.content_scripts.splice(1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Since Edge extensions require makeappx to be run we temporarily store it in a folder.
|
||||
gulp.task('dist:edge', (cb) => {
|
||||
const edgePath = paths.dist + 'Edge/';
|
||||
|
|
Loading…
Reference in New Issue