Created
December 21, 2010 08:40
-
-
Save vkhater/749670 to your computer and use it in GitHub Desktop.
Automatically refresh Ultimatix pages. Open it in a chrome window and click on raw and install the extension.
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 Ultimatix autorefresh | |
// @description Automatically refresh Ultimatix pages | |
// @include https://www.ultimatix.net/* | |
// @include https://apps.ultimatix.org/pls/ETCS/OracleMyPage.home/* | |
// @author Vinay Khater (http://twitter.com/vkhater) | |
// ==/UserScript== | |
(function() { | |
var refreshPeriod = 1000 * 60 * 2; // every 2 minutes | |
var timer; | |
window.onblur = function() { | |
timer = setTimeout( function() { | |
location.reload(true); | |
}, refreshPeriod); | |
} | |
window.onfocus = function() { | |
clearTimerout(timer); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment