Compare commits
31 Commits
aula-ad-bl
...
6f15bf70c6
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f15bf70c6 | |||
| 3c703d7425 | |||
| 91b692593f | |||
| c7b4955291 | |||
| 2706812496 | |||
| a6bd5a5d5c | |||
| bc0f77bfd4 | |||
| c48c5c45ba | |||
| b4a86d0e2d | |||
| 5578b22148 | |||
| 12ceca7bea | |||
| 2c2c5dc3d4 | |||
| 498999d12a | |||
| c0d206a957 | |||
| 36c004b802 | |||
| 8390c0a43e | |||
| 293f5142e6 | |||
| 11830f9e20 | |||
| 8bacbb301e | |||
| 0e71f8ba63 | |||
| 0b10f5f993 | |||
| 366117a93c | |||
| 10fc5f88bc | |||
| e1bd9ad31e | |||
| f76a8db079 | |||
| aaeae49517 | |||
| 100bcb4c2c | |||
| 5900482d93 | |||
| a9c257dc99 | |||
| 6f2198a268 | |||
| f9103ba332 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,3 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
Archive.zip
|
Archive.zip
|
||||||
.amo-upload-uuid
|
.amo-upload-uuid
|
||||||
|
dev-resources
|
||||||
|
content copy.js
|
||||||
|
aula-fixer_v1-2.zip
|
||||||
|
.env
|
||||||
Binary file not shown.
BIN
Aula-Fixer.crx
Normal file
BIN
Aula-Fixer.crx
Normal file
Binary file not shown.
15
README.md
15
README.md
@@ -1,13 +1,18 @@
|
|||||||
# Aula-Extension
|
# Aula-Fixer
|
||||||
|
|
||||||
Browser extension that removes all the notifications about rooms for rent and shit
|
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.
|
||||||
|
|
||||||
Will remove any notifications containing the any of the ~keywords~ keyphrases in keywords.txt so you can make it hide other stuff too if you wanted.
|
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 turn on dev mode in chrome://extensions (or equivalent), click on 'Load unpacked' and select the Aula-Extension folder.
|
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.
|
||||||
|
|
||||||
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 built an xpi which is signed (surprisingly difficult), 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.
|
I'm working on getting the extension published on the chrome and firefox stores.
|
||||||
|
|
||||||
The keyphrases cannot be edited if you're using the prepacked .xpi file. Possibly an oversight and I may fix this at some point
|
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
|
||||||
|
|
||||||
|
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.
|
||||||
34
background.js
Normal file
34
background.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||||
|
if (request.type === "GET_KEYWORDS") {
|
||||||
|
|
||||||
|
const remoteUrl = "https://git.wbell.dev/TussockyJoker/Aula-Fixer/raw/branch/main/keywords.txt";
|
||||||
|
const localUrl = chrome.runtime.getURL("keywords.txt");
|
||||||
|
|
||||||
|
// remote
|
||||||
|
fetch(remoteUrl)
|
||||||
|
.then(response => {
|
||||||
|
if (!response.ok) throw new Error("Remote fetch failed");
|
||||||
|
return response.text();
|
||||||
|
})
|
||||||
|
.then(text => {
|
||||||
|
console.log("Loaded remote keywords");
|
||||||
|
sendResponse({ success: true, data: text });
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
console.warn("Remote failed, loading local fallback");
|
||||||
|
|
||||||
|
// local
|
||||||
|
fetch(localUrl)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => {
|
||||||
|
console.log("Loaded local fallback keywords");
|
||||||
|
sendResponse({ success: true, data: text });
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
sendResponse({ success: false, error: error.toString() });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
6
build_scripts/build_ff_listed.sh
Executable file
6
build_scripts/build_ff_listed.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
cd ..
|
||||||
|
mv manifest.json manifest_temp.json
|
||||||
|
mv manifest_ff.json manifest.json
|
||||||
|
web-ext sign --channel=listed --api-key=user: --api-secret=
|
||||||
|
mv manifest.json manifest_ff.json
|
||||||
|
mv manifest_temp.json manifest.json
|
||||||
6
build_scripts/build_ff_unlisted.sh
Executable file
6
build_scripts/build_ff_unlisted.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
cd ..
|
||||||
|
mv manifest.json manifest_temp.json
|
||||||
|
mv manifest_ff.json manifest.json
|
||||||
|
web-ext sign --channel=unlisted --api-key=user: --api-secret=
|
||||||
|
mv manifest.json manifest_ff.json
|
||||||
|
mv manifest_temp.json manifest.json
|
||||||
58
content.js
58
content.js
@@ -1,29 +1,29 @@
|
|||||||
let keywords = [];
|
let keywords = [];
|
||||||
|
|
||||||
async function loadKeywords() {
|
function loadKeywords() {
|
||||||
try {
|
chrome.runtime.sendMessage({ type: "GET_KEYWORDS" }, (response) => {
|
||||||
const response = await fetch(chrome.runtime.getURL("keywords.txt"));
|
if (!response || !response.success) {
|
||||||
const text = await response.text();
|
console.error("Failed to load remote keywords:", response?.error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
keywords = text
|
keywords = response.data
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.map(k => k.trim().toLowerCase())
|
.map(k => k.trim().toLowerCase())
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
|
|
||||||
console.log("Loaded keywords:", keywords);
|
console.log("Loaded keywords:", keywords);
|
||||||
|
|
||||||
|
injectStyles();
|
||||||
startFiltering();
|
startFiltering();
|
||||||
|
});
|
||||||
} catch (error) {
|
|
||||||
console.error("Failed to load keywords.txt:", error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterNotifications() {
|
function filterNotifications() {
|
||||||
const notifications = document.querySelectorAll('div[role="button"]');
|
const notifications = document.querySelectorAll('div[role="button"]');
|
||||||
|
|
||||||
notifications.forEach(notification => {
|
notifications.forEach(notification => {
|
||||||
const text = notification.innerText.toLowerCase();
|
const text = notification.innerText?.toLowerCase() || "";
|
||||||
|
|
||||||
const containsKeyword = keywords.some(keyword =>
|
const containsKeyword = keywords.some(keyword =>
|
||||||
text.includes(keyword)
|
text.includes(keyword)
|
||||||
@@ -35,6 +35,44 @@ function filterNotifications() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function injectStyles() {
|
||||||
|
// Prevent duplicate injection
|
||||||
|
if (document.getElementById("aula-fixer-styles")) return;
|
||||||
|
|
||||||
|
const style = document.createElement("style");
|
||||||
|
style.id = "aula-fixer-styles";
|
||||||
|
|
||||||
|
style.textContent = `
|
||||||
|
.css-qbgecn {
|
||||||
|
max-height: 99% !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-15ampbt {
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-1iji2l6 {
|
||||||
|
margin: 1px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-content > div > div > div.css-qbgecn.e1f8gytw1 {
|
||||||
|
overflow-y: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-1vz9kb2 {
|
||||||
|
flex-basis: 85% !important;
|
||||||
|
padding: 0px 0px 0px 1% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-nivjaw {
|
||||||
|
padding: 12px 12px 12px 12px !important;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
document.head.appendChild(style);
|
||||||
|
}
|
||||||
|
|
||||||
function startFiltering() {
|
function startFiltering() {
|
||||||
filterNotifications();
|
filterNotifications();
|
||||||
|
|
||||||
|
|||||||
@@ -9,3 +9,11 @@ i'm looking for accomodation
|
|||||||
fully furnished house
|
fully furnished house
|
||||||
ensuite room available
|
ensuite room available
|
||||||
room available cv13gx queens park house unite student
|
room available cv13gx queens park house unite student
|
||||||
|
en-suite room available
|
||||||
|
double studio room is available
|
||||||
|
need a space for 1 person (girl) to stay
|
||||||
|
hey everyone looking space for one
|
||||||
|
room available for girl (shared accommodation)
|
||||||
|
takeover an en-suite room
|
||||||
|
i'm currently seeking for someone who can take over an en-suite room
|
||||||
|
accomodation alert
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Aula Ad Filter",
|
"name": "Aula Fixer",
|
||||||
"version": "1.1",
|
"version": "1.3",
|
||||||
"description": "Removes all the notifications about rooms for rent on Aula",
|
"description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.",
|
||||||
|
|
||||||
|
"background": {
|
||||||
|
"service_worker": "background.js",
|
||||||
|
"scripts": ["background.js"]
|
||||||
|
},
|
||||||
|
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
@@ -11,6 +16,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"host_permissions": [
|
||||||
|
"https://git.wbell.dev/*"
|
||||||
|
],
|
||||||
|
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": [
|
||||||
{
|
{
|
||||||
"resources": ["keywords.txt"],
|
"resources": ["keywords.txt"],
|
||||||
@@ -20,11 +29,7 @@
|
|||||||
|
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "aulaadremoverpublic@tussockyjoker.com",
|
"id": "aula-fixer@tussockyjoker.com"
|
||||||
"data_collection_permissions": {
|
|
||||||
"required": ["none"],
|
|
||||||
"optional": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
35
manifest_chrome.json
Normal file
35
manifest_chrome.json
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"manifest_version": 3,
|
||||||
|
"name": "Aula Fixer",
|
||||||
|
"version": "1.3",
|
||||||
|
"description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.",
|
||||||
|
|
||||||
|
"background": {
|
||||||
|
"service_worker": "background.js",
|
||||||
|
"scripts": ["background.js"]
|
||||||
|
},
|
||||||
|
|
||||||
|
"content_scripts": [
|
||||||
|
{
|
||||||
|
"matches": ["https://coventry.aula.education/*"],
|
||||||
|
"js": ["content.js"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"host_permissions": [
|
||||||
|
"https://git.wbell.dev/*"
|
||||||
|
],
|
||||||
|
|
||||||
|
"web_accessible_resources": [
|
||||||
|
{
|
||||||
|
"resources": ["keywords.txt"],
|
||||||
|
"matches": ["https://coventry.aula.education/*"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"browser_specific_settings": {
|
||||||
|
"gecko": {
|
||||||
|
"id": "aula-fixer@tussockyjoker.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
35
manifest_ff.json
Normal file
35
manifest_ff.json
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"manifest_version": 3,
|
||||||
|
"name": "Aula Fixer",
|
||||||
|
"version": "1.3",
|
||||||
|
"description": "Removes all notifications about rooms for rent etc. on Aula and changes styling so that less screen space is wasted.",
|
||||||
|
|
||||||
|
"background": {
|
||||||
|
"service_worker": "background.js",
|
||||||
|
"scripts": ["background.js"]
|
||||||
|
},
|
||||||
|
|
||||||
|
"content_scripts": [
|
||||||
|
{
|
||||||
|
"matches": ["https://coventry.aula.education/*"],
|
||||||
|
"js": ["content.js"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"host_permissions": [
|
||||||
|
"https://git.wbell.dev/*"
|
||||||
|
],
|
||||||
|
|
||||||
|
"web_accessible_resources": [
|
||||||
|
{
|
||||||
|
"resources": ["keywords.txt"],
|
||||||
|
"matches": ["https://coventry.aula.education/*"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"browser_specific_settings": {
|
||||||
|
"gecko": {
|
||||||
|
"id": "aula-fixer@tussockyjoker.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
web-ext-artifacts/aula_fixer-1.3.xpi
Normal file
BIN
web-ext-artifacts/aula_fixer-1.3.xpi
Normal file
Binary file not shown.
Reference in New Issue
Block a user