Skip to content

Instantly share code, notes, and snippets.

@davidlwatsonjr
Created October 9, 2012 05:05
Show Gist options
  • Save davidlwatsonjr/3856727 to your computer and use it in GitHub Desktop.
Save davidlwatsonjr/3856727 to your computer and use it in GitHub Desktop.
This script clicks the "Show New Tweets" button on Twitter whenever it available, allowing you watch your stream without interaction.
var autoRefreshNewTweets = function () {
var newTweetsBar = document.getElementsByClassName('new-tweets-bar');
if ('undefined' !== typeof newTweetsBar[0]) {
newTweetsBar[0].click();
}
setTimeout(autoRefreshNewTweets, 1000);
}
autoRefreshNewTweets();
// Reload the entire page every hour, basically flushing the page so it doesn't become too "heavy"
setTimeout(function () {window.document.location.reload();}, 3600000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment