Created
March 17, 2009 06:52
-
-
Save azu/80361 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto-reload Twitter | |
// @namespace http://chris4403.blogspot.com/userscripts | |
// @description Add "Translate!" link and language select pulldown to twitter timeline.Translate feature is using Google AJAX Language API. | |
// @include http://twitter.com/* | |
// @include https://twitter.com/* | |
// @include http://twitter.com/account/archive | |
// @include https://twitter.com/account/archive | |
// @exclude http://twitter.com/account/setting | |
// @exclude https://twitter.com/account/setting | |
// @exclude http://twitter.com/ | |
// @exclude https://twitter.com/ | |
// @exclude http://twitter.com/*/statuses/* | |
// @exclude https://twitter.com/*/statuses/* | |
// @exclude http://twitter.com/*status* | |
// @exclude https://twitter.com/*status* | |
// ==/UserScript== | |
(function(){ | |
var reloadFunc = function(){ | |
window.location.href = window.location.href; | |
} | |
reloadFunc.timerId = setTimeout(reloadFunc,60000); | |
var s = document.getElementById('status'); | |
if(s){ | |
s.addEventListener('click', function(){ | |
clearTimeout(reloadFunc.timerId); | |
}, false); | |
s.addEventListener('mouseover', function(){ | |
clearTimeout(reloadFunc.timerId); | |
}, false); | |
s.addEventListener('blur', function(){ | |
reloadFunc.timerId = setTimeout(reloadFunc,60000); | |
}, false); | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment