Delay function with greasemonkey
- by Riccardo
I need a code that when CheckForZero happens for the first time, after 30 seconds happens again.
var waitForZeroInterval = setInterval (CheckForZero, 0);
function CheckForZero ()
{
if ( (unsafeWindow.seconds == 0) && (unsafeWindow.milisec == 0) )
{
clearInterval (waitForZeroInterval);
var targButton = document.getElementById ('bottone1799');
var clickEvent = document.createEvent ('MouseEvents');
clickEvent.initEvent ('click', true, true);
targButton.dispatchEvent (clickEvent);
}
};