Skip to content

Instantly share code, notes, and snippets.

@moeamaya
Last active March 20, 2020 22:00
Show Gist options
  • Save moeamaya/a6e8669c818b968312eda163327a92c4 to your computer and use it in GitHub Desktop.
Save moeamaya/a6e8669c818b968312eda163327a92c4 to your computer and use it in GitHub Desktop.
// Note this is against Twitter's Terms of Service, so it's just for fun :)
const btns = Array.from(document.querySelectorAll('[data-testid]'))
const unfollows = btns.filter(btn => btn.textContent == "Following")
for (let i = 0; i <= unfollows.length; i++){
setTimeout(function () {
unfollows[i].click();
setTimeout(function () {
const confirm = document.querySelector('[data-testid="confirmationSheetConfirm"]');
confirm.click()
}, 1000)
}, i*1000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment