Skip to content

Instantly share code, notes, and snippets.

@SamWSoftware
Created November 22, 2024 09:39
Show Gist options
  • Save SamWSoftware/a8ff2e671acd74e19a04820ae1b8dcb4 to your computer and use it in GitHub Desktop.
Save SamWSoftware/a8ff2e671acd74e19a04820ae1b8dcb4 to your computer and use it in GitHub Desktop.
const cleanNotifications = () => {
// this can be updated to fix the bea
const notificationList = document.querySelector('div.scaffold-layout.scaffold-layout--sidebar-main-aside.scaffold-layout--reflow > div > div > main > div > div > section:nth-child(2) > div > div.scaffold-finite-scroll__content > div');
[...notificationList.children].map(notification => {
const titleDiv = notification.querySelector('article > div > div.display-flex.flex-column.flex-grow-1.mr2 > a')
if (titleDiv && titleDiv.innerText.includes('reacted')) {
notification.style.display = 'none';
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment