Skip to content

Instantly share code, notes, and snippets.

@heypoom
Last active December 27, 2023 15:35
Show Gist options
  • Save heypoom/c77dc15d9321aedc2c1e7018f03f1165 to your computer and use it in GitHub Desktop.
Save heypoom/c77dc15d9321aedc2c1e7018f03f1165 to your computer and use it in GitHub Desktop.
async function run() {
const wait = ms => new Promise(resolve => setTimeout(resolve, ms))
const selector = 'div[aria-label="Toggle to follow"] div'
const nodes = [...document.querySelectorAll(selector)]
for (let node of nodes) {
const text = node.parentElement.parentElement.parentElement.innerText
console.log(text)
if (!text.includes('Following')) continue
node.click()
await wait(100)
}
}
// Click on the arrow on the upper right > settings and privacy > news feed preferences > unfollow > run this code on DevTools
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment