Skip to content

Instantly share code, notes, and snippets.

@duncangh
Last active March 14, 2022 03:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save duncangh/c49d25d9c352fc0bdfaec5d281e6fd29 to your computer and use it in GitHub Desktop.
Save duncangh/c49d25d9c352fc0bdfaec5d281e6fd29 to your computer and use it in GitHub Desktop.
Scroll to bottom of *infinite* timeline Javascript

Autoscroll Twitter Timeline

Want to quickly find your regrettable 10 year old tweets without having to learn how to use the twitter API or scroll manually through the infinite ether of the bad takes you've tweeted throughout the ages?

Then this is for you, ya lazy human. Just paste in the console and watch those hot takes go by.

function autoScrolling() {
   window.scrollTo(0,document.body.scrollHeight);
}

// Specify interval at which you would like to scroll, it will scroll the page to the bottom of the page.
var waitTimeMilliseconds = 5;
setInterval(autoScrolling, waitTimeMilliseconds); 
function autoScrolling() {
window.scrollTo(0,document.body.scrollHeight);
}
// Specify interval at which you would like to scroll, it will scroll the page to the bottom of the page.
var waitTimeMilliseconds = 5;
var refreshIntervalId = setInterval(autoScrolling, waitTimeMilliseconds);
// run to cancel
clearInterval(refreshIntervalId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment