Skip to content

Instantly share code, notes, and snippets.

@yauri-io
Last active October 23, 2021 20:13
Show Gist options
  • Save yauri-io/1b7815ea945b9e20463d8d0af886dc03 to your computer and use it in GitHub Desktop.
Save yauri-io/1b7815ea945b9e20463d8d0af886dc03 to your computer and use it in GitHub Desktop.
Stupid way for Twitter unfollow
// open: https://twitter.com/{username}/following
// open browser console and execute the script
// use your creativity to extend the script
// list all Unfollow button, usually this will contain 6 - 15 buttons
var buttons = document.querySelectorAll("[aria-label^='Following']");
for(var i = 0; i < buttons.length; i++) {
buttons[i].click(); // click the Unfollow button
// for clicking Unfollow button in dialog
document.querySelector('[data-testid="confirmationSheetConfirm"]').click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment