Last active
March 14, 2023 18:52
-
-
Save LaruYan/8090c59ee6012b436be8d063b45bfe75 to your computer and use it in GitHub Desktop.
Unfavourite Tweet button clicker (scrolls through and unlike/unfavourite tweets from your own likes/favourites only)
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
var unfavTweetsTimer = null; | |
var doUnfavTweetsFn = () => { | |
clearInterval(unfavTweetsTimer); | |
Array.from(document.querySelectorAll('article[data-testid="tweet"] div[data-testid="unlike"]')) | |
.forEach(unlikeBtn => { | |
unlikeBtn.click(); | |
}) | |
window.scrollTo({ | |
top: document.body.scrollHeight, | |
left: 0, | |
behavior: 'auto' | |
}); | |
unfavTweetsTimer = setInterval(doUnfavTweetsFn, 500); | |
}; | |
unfavTweetsTimer = setInterval(doUnfavTweetsFn, 16); |
Thanks, this is one of the better scripts I've found for this. Still working as of 3/14/23.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fixed a selector error
tweetEntries.queryselectorAll is not a function