Skip to content

Instantly share code, notes, and snippets.

@vkhater
Created December 21, 2010 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkhater/749670 to your computer and use it in GitHub Desktop.
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.
// ==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