Last active
July 25, 2019 12:22
-
-
Save chrisgoddard/910d3dba4fd78ff3bebdad193bf360d5 to your computer and use it in GitHub Desktop.
Delete liked tweets
This file contains hidden or 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
// 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