twitter auto-refresh

By Matthias Bauer Last update Mar 24, 2008 — Installed 807 times. Daily Installs: 0, 2, 3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 4, 3, 5, 1, 1, 1, 3, 4, 0, 0, 1, 5, 1, 3
// ==UserScript==
// @name           twitter auto-refresh
// @namespace      net.moeffju.userscripts
// @description    Automatically refresh Twitter.
// @include        http://twitter.com/home
// @include        https://twitter.com/home
// ==/UserScript==

delay=120;

timer=null;
startTimer=function(){timer=window.setTimeout(function(){window.location.reload();}, delay*1000);};
stopTimer=function(){window.clearTimeout(timer);};
restartTimer=function(){stopTimer(); startTimer();};

(document.getElementById('doingForm').getElementsByTagName('input')[0]).addEventListener('click', restartTimer, true);
document.getElementById('status').addEventListener('keydown', restartTimer, true);

startTimer();