Skip to content

Commit

Permalink
fix: Opera add-ons does not accept the .enc file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Oct 12, 2020
1 parent 29269d2 commit 317eb95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/background/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) +
Expand Down

0 comments on commit 317eb95

Please sign in to comment.