Last active
July 22, 2023 19:49
-
-
Save aaronlifton/2f22ac3257c3fd78696c2aa08792e552 to your computer and use it in GitHub Desktop.
unsubscribe from next-door emails
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
// https://nextdoor.com/settings/notification_prefs/ | |
async function unsubscribe() { | |
matchingElementSet = document.evaluate("//span[text()='Email']/parent::div/following-sibling::input[contains(@aria-checked, 'true')]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (let i = 0; i < matchingElementSet.snapshotLength; i++) { | |
await new Promise(r => setTimeout(r, 1000)); | |
let currentEl = matchingElementSet.snapshotItem(i); | |
currentEl.click() | |
} | |
} | |
unsubscribe() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment