Created
August 29, 2010 19:03
-
-
Save sr3d/556573 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Paypal Sandbox autorefresh | |
// @description Automatically refresh paypal sandbox pages | |
// @include https://paypalmanager.sandbox.paypal.com/* | |
// @include https://developer.paypal.com/* | |
// @include https://sandbox.paypal.com/* | |
// @include https://www.sandbox.paypal.com/* | |
// @include http://developer.paypal.com/* | |
// @author Alex Le (http://marrily.com) | |
// ==/UserScript== | |
(function() { | |
var refreshPeriod = 1000 * 60 * 5; // every 5 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