12 Commits

16 changed files with 44 additions and 25 deletions

2
.env_example Normal file
View File

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

5
.gitignore vendored
View File

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

Binary file not shown.

View File

@@ -1,18 +1,22 @@
# Aula-Fixer # Aula-Fixer
Browser extension that removes all the notifications about rooms for rent and tenancy takeovers from Aula and changes the styling of the pages to stop wasting so much space. This is a browser extension that removes all the notifications about rooms for rent and tenancy takeovers etc. from Aula and changes the styling of the pages to stop wasting so much space.
Will remove any notifications containing the any of the ~keywords~ keyphrases in the keywords.txt file stored in this repo, it can also fall back on a local keywords.txt if the server cannot be reached. Will remove any notifications containing the any of the ~keywords~ keyphrases in the keywords.txt file stored in this repo, it can also fall back on a local keywords.txt if the server cannot be reached.
I've only tested with Chrome, Brave and Firefox. The easiest way to install this on chromium or similar is to use the prepackaged .crx. You can also install it by cloning this repo to a folder on your computer, turning on dev mode in chrome://extensions (or equivalent), clicking on 'Load unpacked' and selecting the Aula-Extension folder, if you update/customize the extension, reload it to apply any changes. I've only tested with Chrome, Brave and Firefox. The easiest way to install this on chromium or similar is to download the .zip file, extract it somewhere, turn on dev mode in chrome://extensions (or equivalent), clicking on 'Load unpacked' and select the extracted folder. Alternatively clone this repo and select the src folder. I did pack a .crx for this purpose but Chrome has removed the ability to load .crx files 😐
For firefox I've built an xpi which is signed (surprisingly difficult), just open a new firefox tab and drag it into the window. For Firefox, I've made a signed .xpi which can be found in builds. To install from here, just open a new firefox tab and drag it into the window.
I'm working on getting the extension published on the chrome and firefox stores. The Firefox version will often be slightly more up-to-date compared to the chrome version as building for chrome cannot be done from the CLI (afaik).
I'm working on getting the extension published on both the Chrome and Firefox stores.
https://addons.mozilla.org/en-GB/firefox/addon/aula-ad-filter/ https://addons.mozilla.org/en-GB/firefox/addon/aula-ad-filter/
https://chromewebstore.google.com/detail/aula-ad-filter/ooghijbicaoiccbkjplnellggncbcgbl?authuser=0&hl=en-GB https://chromewebstore.google.com/detail/aula-ad-filter/ooghijbicaoiccbkjplnellggncbcgbl?authuser=0&hl=en-GB
If you just want the 'ad-blocker' function, I've kept a separate branch in this repo. If you just want the 'ad-blocker' function, I've kept a separate branch in this repo.
If you want to use a custom keywords.txt, you can break the url in background.js and it will then fall back on the local keywords.txt file. This only works if you are NOT using the prepackaged extensions or extensions from the chrome/firefox stores, these will only pull from the file in this repo. If you think a word or phrase should be added to keywords.txt, either submit a pull request or raise an issue. If you have customised keywords.txt, you will have to break the url in 'background.js' so that it falls back on the local keywords.txt file. This only works if you are NOT using the prepackaged extensions or extensions from the chrome/firefox stores, these will only pull from the file in this repo or fall back on the included version if the server cannot be reached. If you think a word or phrase should be added to keywords.txt, either submit a pull request or raise an issue.
If you would like to build the extension for yourself run /build_scripts/build.sh, which will give you a .zip compatible with most browsers, if you wish to build a Firefox .xpi you will need to get a developer api key and change the id in the manifest.

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=./builds

View File

@@ -1,6 +1,11 @@
cd .. !/usr/bin/env bash
mv manifest.json manifest_temp.json
mv manifest_ff.json manifest.json source .env
web-ext sign --channel=listed --api-key=user: --api-secret=
mv manifest.json manifest_ff.json echo "Building/signing listed firefox extension"
mv manifest_temp.json manifest.json mv src/manifest.json src/manifest_temp.json
mv src/manifest_ff.json src/manifest.json
echo "manifest_ff > manifest"
web-ext sign --channel=unlisted --api-key=user:$API_KEY --api-secret=$API_SECRET --source-dir=./src --artifacts-dir=./builds
mv src/manifest.json src/manifest_ff.json
mv src/manifest_temp.json src/manifest.json

View File

@@ -1,6 +1,10 @@
cd .. #!/usr/bin/env bash
mv manifest.json manifest_temp.json
mv manifest_ff.json manifest.json source .env
web-ext sign --channel=unlisted --api-key=user: --api-secret=
mv manifest.json manifest_ff.json echo "Building/signing UNlisted firefox extension"
mv manifest_temp.json manifest.json mv src/manifest.json src/manifest_temp.json
mv src/manifest_ff.json src/manifest.json
web-ext sign --channel=unlisted --api-key=user:$API_KEY --api-secret=$API_SECRET --source-dir=./src --artifacts-dir=./builds
mv src/manifest.json src/manifest_ff.json
mv src/manifest_temp.json src/manifest.json

BIN
builds/aula_fixer-1.4.1.xpi Normal file

Binary file not shown.

BIN
builds/aula_fixer-1.4.zip Normal file

Binary file not shown.

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

View File

@@ -1,7 +1,7 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Aula Fixer", "name": "Aula Fixer",
"version": "1.3", "version": "1.4",
"description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.", "description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.",
"background": { "background": {

View File

@@ -1,12 +1,11 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Aula Fixer", "name": "Aula Fixer",
"version": "1.3", "version": "1.4",
"description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.", "description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.",
"background": { "background": {
"service_worker": "background.js", "service_worker": "background.js"
"scripts": ["background.js"]
}, },
"content_scripts": [ "content_scripts": [

View File

@@ -1,11 +1,10 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Aula Fixer", "name": "Aula Fixer",
"version": "1.3", "version": "1.4.1",
"description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.", "description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.",
"background": { "background": {
"service_worker": "background.js",
"scripts": ["background.js"] "scripts": ["background.js"]
}, },

Binary file not shown.