Last active
March 18, 2023 08:34
-
-
Save ElderMael/65ddeffa296c891855466ec63fe6e3ae to your computer and use it in GitHub Desktop.
Delete Likes From TweetDeck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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