Skip to content

Instantly share code, notes, and snippets.

@obedparla
Created June 20, 2023 20:11
Show Gist options
  • Save obedparla/c49a8e6dfe67b1e5db5306266c861090 to your computer and use it in GitHub Desktop.
Save obedparla/c49a8e6dfe67b1e5db5306266c861090 to your computer and use it in GitHub Desktop.
Delete all your tweets without an API and for free
// Delete ALL your tweets and un-retweet everything
// Just paste this code on the dev tools and leave the tab open. It deletes at [speed]. Make it faster or slower
// I don't know if Twitter has some internal safety to prevent a bunch of deletions from happening to fast, but at 100 it deletes 1000 tweets in under two minutes
// BEWARE you can't undo this action, and it will delete EVERYTHING
const speed = 100;
// do it on repeat. Timeouts are ugly but whatever, it works
setInterval(function (){
const retweets = document.querySelectorAll("[data-testid='unretweet']");
retweets.forEach((item, index) => {
setTimeout(() => {
item.click()
document.querySelector("[data-testid='unretweetConfirm']").click();
}, index * speed);
})
setTimeout(() => {
document.querySelectorAll("[data-testid='caret']").forEach((menu, index) => {
setTimeout(() => {
menu.click()
document.querySelector('[role="menuitem"]').click();
document.querySelector("[data-testid='confirmationSheetConfirm']").click()
}, index * speed)
})
}, retweets.length * (speed + 5));
}, 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment