From 317eb95f6c248013e1f296f49f71ca940b0b63e8 Mon Sep 17 00:00:00 2001 From: dessant Date: Mon, 12 Oct 2020 18:23:34 +0300 Subject: [PATCH] fix: Opera add-ons does not accept the .enc file extension --- gulpfile.js | 4 ++-- src/background/main.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index bf384eb..2907181 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -211,10 +211,10 @@ function secrets(done) { const ciphertext = CryptoJS.AES.encrypt(data, key).toString(); - writeFileSync(path.join(distDir, 'secrets.json.enc'), ciphertext); + writeFileSync(path.join(distDir, 'secrets.txt'), ciphertext); } catch (err) { console.log( - 'Secrets are missing, secrets.json.enc will not be included in the extension package.' + 'Secrets are missing, secrets.txt will not be included in the extension package.' ); } diff --git a/src/background/main.js b/src/background/main.js index 064a4c3..448cce2 100644 --- a/src/background/main.js +++ b/src/background/main.js @@ -227,7 +227,7 @@ async function prepareAudio(audio) { async function loadSecrets() { try { - const ciphertext = await (await fetch('/secrets.json.enc')).text(); + const ciphertext = await (await fetch('/secrets.txt')).text(); const key = sha256( (await (await fetch('/src/background/script.js')).text()) +