Last active
November 27, 2024 14:49
-
-
Save asgrim/a2f04f29360cc4b926747bb2c7efdadb to your computer and use it in GitHub Desktop.
unlike on twitter
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
// Paste it into your console wile on your likes page (https://twitter.com/<user>/likes) | |
function unlike() { | |
let unlike = document.querySelector('[data-testid="unlike"]'); | |
if (unlike) { | |
console.log('unliking'); | |
unlike.scrollIntoView(); | |
scrollBy(0,-400); | |
unlike.click(); | |
} else { | |
console.log('ran out of unlike buttons'); | |
window.scrollTo(0, document.body.scrollHeight); | |
} | |
} | |
// every 2 secs stays above rate limit (500 every 15 minutes) | |
var interval = setInterval(unlike, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment