Skip to content

Instantly share code, notes, and snippets.

@ezy
Forked from virenratan/twitter-cleanup.js
Created February 7, 2019 05:27
Show Gist options
  • Save ezy/5ed9b1740642e7ffe74a0d46181b6103 to your computer and use it in GitHub Desktop.
Save ezy/5ed9b1740642e7ffe74a0d46181b6103 to your computer and use it in GitHub Desktop.
Delete twitter content
// delete tweets.
[].slice.call(document.getElementsByClassName('js-actionDelete')).map(tweet => {
tweet.childNodes[1].click()
document.getElementsByClassName('delete-action')[0].click()
})
// un-retweet.
[].slice.call(document.getElementsByClassName('ProfileTweet-actionButtonUndo')).map(retweet => {
retweet.click()
document.getElementsByClassName("js-close")[0].click()
})
// unlike tweets.
[].slice.call(document.getElementsByClassName('ProfileTweet-action--unfavorite')).map(fave => {
fave.click()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment