forked from TussockyJoker/Aula-Fixer
Changed to Aula Fixer
This commit is contained in:
39
content.js
39
content.js
@@ -12,6 +12,7 @@ async function loadKeywords() {
|
||||
|
||||
console.log("Loaded keywords:", keywords);
|
||||
|
||||
injectStyles(); // 👈 Add this
|
||||
startFiltering();
|
||||
|
||||
} catch (error) {
|
||||
@@ -23,7 +24,7 @@ function filterNotifications() {
|
||||
const notifications = document.querySelectorAll('div[role="button"]');
|
||||
|
||||
notifications.forEach(notification => {
|
||||
const text = notification.innerText.toLowerCase();
|
||||
const text = notification.innerText?.toLowerCase() || "";
|
||||
|
||||
const containsKeyword = keywords.some(keyword =>
|
||||
text.includes(keyword)
|
||||
@@ -35,6 +36,42 @@ function filterNotifications() {
|
||||
});
|
||||
}
|
||||
|
||||
function injectStyles() {
|
||||
const style = document.createElement("style");
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
`;
|
||||
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
|
||||
function startFiltering() {
|
||||
filterNotifications();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user