From c05128d9f53b567fb242a6be13cd9a21f017f003 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 9 May 2018 14:52:22 -0400 Subject: [PATCH] remove shortcuts from firefox and opera manifest --- gulpfile.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 3d3fab671e..ffb1f0f630 100644 --- a/gulpfile.js +++ b/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/';