Skip to content

Instantly share code, notes, and snippets.

@ElderMael
Last active March 18, 2023 08:34
Show Gist options
  • Save ElderMael/65ddeffa296c891855466ec63fe6e3ae to your computer and use it in GitHub Desktop.
Save ElderMael/65ddeffa296c891855466ec63fe6e3ae to your computer and use it in GitHub Desktop.
Delete Likes From TweetDeck
function nextUnlike() {
return document.querySelector('.icon-favorite-toggle')
}
function wait(ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
async function removeAll() {
let count = 0
let next = nextUnlike()
while (next) {
next.focus()
next.click()
console.log(`Unliked ${++count} tweets`)
await wait(count % 50 === 0 ? 30000 : 2000)
next = nextUnlike()
}
console.log('Out of unlikes, count =', count)
}
removeAll()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment