Skip to content

Instantly share code, notes, and snippets.

@chrisgoddard
Last active July 25, 2019 12:22
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 chrisgoddard/910d3dba4fd78ff3bebdad193bf360d5 to your computer and use it in GitHub Desktop.
Save chrisgoddard/910d3dba4fd78ff3bebdad193bf360d5 to your computer and use it in GitHub Desktop.
Delete liked tweets
// run in console at twitter.com/username/likes (replace username with your username)
(function(document,window) {
function clearlikes(){
    window.scrollTo(0,document.body.scrollHeight);
    Array.from(document.querySelectorAll('[data-testid="unlike"]')).forEach(function(el){
     el.click();
    })
    setTimeout(clearlikes, 5000);
}
clearlikes();
})(document,window)
// Minified
// (function(a,c){function b(){c.scrollTo(0,a.body.scrollHeight);Array.from(a.querySelectorAll('[data-testid="unlike"]')).forEach(function(d){d.click()});setTimeout(b,5E3)}b()})(document,window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment