Skip to content

Instantly share code, notes, and snippets.

@LoranKloeze
Last active March 6, 2021 09:12
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LoranKloeze/55c94e6c8767351fbe07af94824bdc85 to your computer and use it in GitHub Desktop.
Save LoranKloeze/55c94e6c8767351fbe07af94824bdc85 to your computer and use it in GitHub Desktop.
Automatic scroll of Twitter followers, stop scrolling by hand...
/*
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 - loran@ralon.nl
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);
@ziggyzach4
Copy link

Hey, thanks so much for building this tool. I'm not super tech savvy, I was wondering if there was a way to make this tool work with other Twitter pages? I tried to use it on a public list (I assumed the effect would be the same as a followers page, auto scrolling to the end of a list page) but it only produced errors. Would it be possible to make this work for other pages? Thanks!

@digetry
Copy link

digetry commented Nov 26, 2018

Worked like a charm. Thanks LoranKloeze

@nikolaosilk
Copy link

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.

@Pierreandree
Copy link

Excellent. Many thanks.

@Geograph-us
Copy link

Geograph-us commented Feb 17, 2020

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