Twitter auto-refresh

Refreshes the timeline items automatically every 10 sec.

目前為 2016-01-26 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Twitter auto-refresh
// @namespace    http://elamperti.com/
// @version      0.1
// @description  Refreshes the timeline items automatically every 10 sec.
// @author       Enrico Lamperti
// @match        https://twitter.com/*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

function updateTimeline() {
  var newTweets = document.querySelector(".new-tweets-bar");
  if (newTweets) {
    newTweets.click();
  }
  return true;
}

setInterval(updateTimeline, 10000);