Skip to content

Instantly share code, notes, and snippets.

@jasan-s
Forked from duncangh/readme.md
Created March 14, 2022 03:36
Show Gist options
  • Save jasan-s/7276fdca019babf2d4557dc9e3e7d996 to your computer and use it in GitHub Desktop.
Save jasan-s/7276fdca019babf2d4557dc9e3e7d996 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