Last active
March 6, 2021 09:12
-
-
Save LoranKloeze/55c94e6c8767351fbe07af94824bdc85 to your computer and use it in GitHub Desktop.
Automatic scroll of Twitter followers, stop scrolling by hand...
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
/* | |
You know how Twitter never loads all the followers but you have to keep scrolling? Well, | |
this script automatically keeps scrolling to the end of the follower list. | |
30-05-2017 | |
(c) 2017 - Loran Kloeze - [email protected] | |
Usage | |
- Go to https://www.twitter.com/twitter_handle/followers (change twitter_handle in i.e. realdonaldtrump) | |
- Open up the console (F12) (Firefox users: type 'allow pasting' if you haven't done so yet) | |
- Select the contents of this complete file and copy/paste it to the console and hit enter | |
- Watch it go | |
- When the scrolling is finished or when you want to, click anywhere in the window to stop the automatic scrolling | |
*/ | |
var twitterAwesomeScrollTimerPowerWhatEverBigVar; | |
window.addEventListener( | |
'click', function () { | |
clearInterval(twitterAwesomeScrollTimerPowerWhatEverBigVar); | |
}); | |
twitterAwesomeScrollTimerPowerWhatEverBigVar = window.setInterval( | |
function () { | |
document.getElementsByClassName('GridTimeline-end')[0].scrollIntoView(); | |
}, 10); |
Excellent. Many thanks.
Update:
var ScrollTimer;
window.onclick = function () { clearInterval(ScrollTimer) }
ScrollTimer = setInterval(()=> { scrollTo(0, document.body.scrollHeight);console.log(document.body.scrollHeight) }, 500);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, can I use this script to automatically keep scrolling to the end of the following list instead of the followers? Cause that would be awesome.