Skip to content

Instantly share code, notes, and snippets.

@Isuru-Nanayakkara
Last active November 30, 2015 14:41
Show Gist options
  • Save Isuru-Nanayakkara/b3d8409819a004e4a26a to your computer and use it in GitHub Desktop.
Save Isuru-Nanayakkara/b3d8409819a004e4a26a to your computer and use it in GitHub Desktop.
Automatically loads new tweets in the Twitter timeline.
// ==UserScript==
// @name Twitterflow
// @description Automatically loads new tweets
// @include https://twitter.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @version 1.0
// @license GPL v3 or any later version (http://www.gnu.org/copyleft/gpl.html)
// @grant GM_addStyle
// ==/UserScript==
function letTheTweetsFlow(jNode) {
var newTweets = jNode.attr('data-item-count');
if(newTweets > 0) {
$('div.new-tweets-bar').click();
}
}
waitForKeyElements('div.new-tweets-bar', letTheTweetsFlow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment