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`.
feature/default_network_editable
Mark Stacey 4 years ago
parent e9b5386f74
commit 07fab76dd0
  1. 2
      app/home.html
  2. 4
      app/manifest/_base.json
  3. 2
      app/notification.html
  4. 2
      app/phishing.html
  5. 2
      app/popup.html
  6. 5
      development/build/static.js

@ -12,7 +12,7 @@
<div id="popover-content"></div>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./initSentry.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./ui-libs.js" type="text/javascript" charset="utf-8"></script>
<script src="./ui.js" type="text/javascript" charset="utf-8"></script>

@ -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"
],

@ -35,7 +35,7 @@
<div id="popover-content"></div>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./initSentry.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./ui-libs.js" type="text/javascript" charset="utf-8"></script>
<script src="./ui.js" type="text/javascript" charset="utf-8"></script>

@ -3,7 +3,7 @@
<head>
<title>Ethereum Phishing Detection - MetaMask</title>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./phishing-detect.js"></script>
<link rel="stylesheet" type="text/css" href="./index.css" title="ltr">

@ -12,7 +12,7 @@
<div id="popover-content"></div>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./initSentry.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./ui-libs.js" type="text/javascript" charset="utf-8"></script>
<script src="./ui.js" type="text/javascript" charset="utf-8"></script>

@ -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/`,

Loading…
Cancel
Save