From 07fab76dd01d358da79aa96adbb2d49fa091e289 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 9 Dec 2020 12:04:11 -0330 Subject: [PATCH] Rename `lockdown.cjs` to `lockdown.js` (#10026) When you load an extension `.zip` file in Firefox, it fails to load scripts with the `.cjs` file extension. However, it works if you load the extension via the `manifest.json` file instead. After renaming the `lockdown.cjs` file to `lockdown.js`, it works in Firefox in all cases, regardless whether it's loaded by manifest or by `.zip`. --- app/home.html | 2 +- app/manifest/_base.json | 4 ++-- app/notification.html | 2 +- app/phishing.html | 2 +- app/popup.html | 2 +- development/build/static.js | 5 ++--- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/home.html b/app/home.html index 072eddea9..d952983c9 100644 --- a/app/home.html +++ b/app/home.html @@ -12,7 +12,7 @@
- + diff --git a/app/manifest/_base.json b/app/manifest/_base.json index b9b650071..0fe5a017e 100644 --- a/app/manifest/_base.json +++ b/app/manifest/_base.json @@ -4,7 +4,7 @@ "scripts": [ "globalthis.js", "initSentry.js", - "lockdown.cjs", + "lockdown.js", "runLockdown.js", "bg-libs.js", "background.js" @@ -39,7 +39,7 @@ "matches": ["file://*/*", "http://*/*", "https://*/*"], "js": [ "globalthis.js", - "lockdown.cjs", + "lockdown.js", "runLockdown.js", "contentscript.js" ], diff --git a/app/notification.html b/app/notification.html index 4f424e3c0..8d82c41b2 100644 --- a/app/notification.html +++ b/app/notification.html @@ -35,7 +35,7 @@
- + diff --git a/app/phishing.html b/app/phishing.html index 59ea3ac71..7bbc11dab 100644 --- a/app/phishing.html +++ b/app/phishing.html @@ -3,7 +3,7 @@ Ethereum Phishing Detection - MetaMask - + diff --git a/app/popup.html b/app/popup.html index e73f3e4d2..d16257992 100644 --- a/app/popup.html +++ b/app/popup.html @@ -12,7 +12,7 @@
- + diff --git a/development/build/static.js b/development/build/static.js index 1fe5dc959..ee3341643 100644 --- a/development/build/static.js +++ b/development/build/static.js @@ -49,9 +49,8 @@ const copyTargets = [ dest: `globalthis.js`, }, { - src: `./node_modules/ses/dist/`, - pattern: `lockdown.cjs`, - dest: ``, + src: `./node_modules/ses/dist/lockdown.cjs`, + dest: `lockdown.js`, }, { src: `./app/scripts/`,