This commit is contained in:
2026-02-21 18:27:54 +00:00
parent eab3b4dcc1
commit db28d05228
3 changed files with 44 additions and 0 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

31
content.js Normal file
View File

@@ -0,0 +1,31 @@
const keywords = ["tenancy", "bedroom available", "spacious room", "room available cv13GX queens park house unite student"];
// Function to check and remove matching notifications
function filterNotifications() {
const notifications = document.querySelectorAll('div[role="button"]');
notifications.forEach(notification => {
const text = notification.innerText.toLowerCase();
const containsKeyword = keywords.some(keyword =>
text.includes(keyword)
);
if (containsKeyword) {
notification.remove();
}
});
}
// Run once on load
filterNotifications();
// Watch for dynamically loaded notifications
const observer = new MutationObserver(() => {
filterNotifications();
});
observer.observe(document.body, {
childList: true,
subtree: true
});

13
manifest.json Normal file
View File

@@ -0,0 +1,13 @@
{
"manifest_version": 3,
"name": "Notification Keyword Filter",
"version": "0.2",
"description": "Removes notifications containing specific keywords",
"permissions": [],
"content_scripts": [
{
"matches": ["https://coventry.aula.education/*"],
"js": ["content.js"]
}
]
}