Skip to content

Instantly share code, notes, and snippets.

@davidawad
Created March 27, 2024 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidawad/e74e435ff61abec8cc3f04346e99dd0d to your computer and use it in GitHub Desktop.
Save davidawad/e74e435ff61abec8cc3f04346e99dd0d to your computer and use it in GitHub Desktop.
you can run this from the js console on twitter while looking at your likes page to clear them all out. nice and easy
function unlikeAndScroll() {
Array.from(document.querySelectorAll("div[aria-label$='Liked']")).forEach(button => button.click());
console.log('Unliked all visible tweets. Scrolling down...');
// Scroll to the bottom of the page
window.scrollTo(0, document.body.scrollHeight);
// Wait for more tweets to load and then run again
setTimeout(unlikeAndScroll, 3000); // Adjust the time as needed
}
unlikeAndScroll();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment