mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
remove shortcuts from firefox and opera manifest
This commit is contained in:
11
gulpfile.js
11
gulpfile.js
@@ -66,6 +66,7 @@ gulp.task('dist:firefox', (cb) => {
|
|||||||
return dist('firefox', (manifest) => {
|
return dist('firefox', (manifest) => {
|
||||||
delete manifest['-ms-preload'];
|
delete manifest['-ms-preload'];
|
||||||
delete manifest.content_security_policy;
|
delete manifest.content_security_policy;
|
||||||
|
removeShortcuts(manifest);
|
||||||
return manifest;
|
return manifest;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -75,6 +76,7 @@ gulp.task('dist:opera', (cb) => {
|
|||||||
delete manifest['-ms-preload'];
|
delete manifest['-ms-preload'];
|
||||||
delete manifest.applications;
|
delete manifest.applications;
|
||||||
delete manifest.content_security_policy;
|
delete manifest.content_security_policy;
|
||||||
|
removeShortcuts(manifest);
|
||||||
return 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.
|
// Since Edge extensions require makeappx to be run we temporarily store it in a folder.
|
||||||
gulp.task('dist:edge', (cb) => {
|
gulp.task('dist:edge', (cb) => {
|
||||||
const edgePath = paths.dist + 'Edge/';
|
const edgePath = paths.dist + 'Edge/';
|
||||||
|
|||||||
Reference in New Issue
Block a user