add .env support

This commit is contained in:
Ugric
2026-02-26 21:18:39 +00:00
parent 5fe2d981e8
commit ad17674577
12 changed files with 20 additions and 6 deletions

2
.env Normal file
View File

@@ -0,0 +1,2 @@
API_KEY="YOUR_API_KEY"
API_SECRET="YOUR_API_SECRET"

3
.gitignore vendored
View File

@@ -4,4 +4,5 @@ Archive.zip
dev-resources dev-resources
content copy.js content copy.js
aula-fixer_v1-2.zip aula-fixer_v1-2.zip
.env
web-ext-artifacts

Binary file not shown.

3
build_scripts/build.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
web-ext build --source-dir=./src --artifacts-dir=./web-ext-artifacts

View File

@@ -1,6 +1,10 @@
cd .. #!/usr/bin/env bash
source .env
cd src
mv manifest.json manifest_temp.json mv manifest.json manifest_temp.json
mv manifest_ff.json manifest.json mv manifest_ff.json manifest.json
web-ext sign --channel=listed --api-key=user: --api-secret= web-ext sign --channel=listed --api-key=user:$API_KEY --api-secret=$API_SECRET
mv manifest.json manifest_ff.json mv manifest.json manifest_ff.json
mv manifest_temp.json manifest.json mv manifest_temp.json manifest.json

View File

@@ -1,6 +1,10 @@
cd .. #!/usr/bin/env bash
source .env
cd src
mv manifest.json manifest_temp.json mv manifest.json manifest_temp.json
mv manifest_ff.json manifest.json mv manifest_ff.json manifest.json
web-ext sign --channel=unlisted --api-key=user: --api-secret= web-ext sign --channel=unlisted --api-key=user:$API_KEY --api-secret=$API_SECRET
mv manifest.json manifest_ff.json mv manifest.json manifest_ff.json
mv manifest_temp.json manifest.json mv manifest_temp.json manifest.json

View File

@@ -1,7 +1,7 @@
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (request.type === "GET_KEYWORDS") { if (request.type === "GET_KEYWORDS") {
const remoteUrl = "https://git.wbell.dev/TussockyJoker/Aula-Fixer/raw/branch/main/keywords.txt"; const remoteUrl = "https://git.wbell.dev/TussockyJoker/Aula-Fixer/raw/branch/main/src/keywords.txt";
const localUrl = chrome.runtime.getURL("keywords.txt"); const localUrl = chrome.runtime.getURL("keywords.txt");
// remote // remote