Last active
May 1, 2022 14:38
-
-
Save michaelnordmeyer/bf4a8dc038b0c5092d474aabf1573dac to your computer and use it in GitHub Desktop.
Deletes all your Twitter likes when being on your profile page twitter.com/<username>/likes as of early 2022
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
// Deletes all your Twitter likes when being on your profile page twitter.com/<username>/likes | |
// Barebones script: runs every second, unlikes the topmost like, scrolls to the bottom if no more likes on page | |
// It won't stop unless manually reloading the page removes this code. Tested with Twitter web May 2022 | |
setInterval( | |
function() { | |
console.log('Searching for unlike UI...'); | |
var button = document.querySelectorAll('[data-testid=unlike]')[0]; // find unlike menu | |
if (button === undefined) { | |
console.log('No unlike buttons found. Scrolling to load more tweets...'); | |
window.scrollTo(0, document.documentElement.scrollHeight); // scroll to bottom of page to load more | |
} else { | |
console.log('Found unlike button. Clicking...'); | |
button.scrollIntoView(); | |
button.click(); | |
console.log('Unliked'); | |
} | |
}, 1000 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment