Skip to content

Instantly share code, notes, and snippets.

@duncangh
Last active Mar 14, 2022
Embed
What would you like to do?
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