Skip to content

Instantly share code, notes, and snippets.

@Eskuero
Created December 18, 2017 17:20
Show Gist options
  • Save Eskuero/7dd1f70e6c031cff0483b26b95df2524 to your computer and use it in GitHub Desktop.
Save Eskuero/7dd1f70e6c031cff0483b26b95df2524 to your computer and use it in GitHub Desktop.
Doing a Twitter search by "from:yourusername keyword" will list all your tweets with an specified keyword. Once the search page has loaded you can run this script to delete all the found tweets. It may fail if the computer doesn't load the button to delete before we attempt to click it.
var tweets = document.getElementsByClassName("js-actionDelete");
for (i = 0; i < tweets.length; i++) {
tweets[i].click();
document.getElementsByClassName("EdgeButton EdgeButton--danger delete-action")[0].click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment