Created
March 25, 2019 14:45
-
-
Save mdamien/833c5a20f912c1c455f71194cc8a3cf8 to your computer and use it in GitHub Desktop.
Sort twitter replies by likes
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
[].slice.call(document.querySelectorAll('.replies-to .stream-items:first-child .ProfileTweet-action--favorite .ProfileTweet-actionButton .ProfileTweet-actionCountForPresentation')) | |
.map(x => parseInt(x.textContent)) | |
.filter(x=>x) | |
.sort((a, b) => b - a); | |
// to paste into the dev console when viewing a tweet replies | |
// output is the sorted list of number of likes for each reply |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it doesn't work. It didn't work for me