Last active
August 7, 2022 13:31
-
-
Save AndersMoberg/f3b8ae61c7662f3d282d158325aa8fdc to your computer and use it in GitHub Desktop.
Uncheck all "notification" boxes in Patreon settings page (run in browser dev tools - https://www.patreon.com/settings/email)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result = document.querySelectorAll("button[aria-checked=true]") | |
const mouseClickEvents = ['mousedown', 'click', 'mouseup']; | |
function simulateMouseClick(element){ | |
element.scrollIntoView(); | |
mouseClickEvents.forEach(mouseEventType => | |
element.dispatchEvent( | |
new MouseEvent(mouseEventType, { | |
view: window, | |
bubbles: true, | |
cancelable: true, | |
buttons: 1 | |
}) | |
) | |
); | |
} | |
result.forEach((element, index) => setTimeout(() => {simulateMouseClick(element)} ,index * 5000)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment