Skip to content

Instantly share code, notes, and snippets.

@asgrim
Last active November 27, 2024 14:49
Show Gist options
  • Save asgrim/a2f04f29360cc4b926747bb2c7efdadb to your computer and use it in GitHub Desktop.
Save asgrim/a2f04f29360cc4b926747bb2c7efdadb to your computer and use it in GitHub Desktop.
unlike on twitter
// 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