Skip to content

Instantly share code, notes, and snippets.

@baptx
Created October 12, 2014 13:46
Show Gist options
  • Save baptx/3555c1cda4717f362dad to your computer and use it in GitHub Desktop.
Save baptx/3555c1cda4717f362dad to your computer and use it in GitHub Desktop.
Twitter timeline update
var target_tweet = document.getElementsByClassName("stream-container")[0];
var observer = new MutationObserver(function(mutations) {
for (var i = 0; mutations[i]; i++)
document.getElementsByClassName("new-tweets-bar")[0].click();
});
var config = { attributes: true, childList: true, characterData: true }
observer.observe(target_tweet, config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment