From 1177ef03282bd36a5e7521a04d2d4f606e91ea3f Mon Sep 17 00:00:00 2001 From: turuslan Date: Fri, 10 Jul 2015 20:50:04 +0500 Subject: [PATCH] Updated minified version --- HackTimer.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HackTimer.min.js b/HackTimer.min.js index ea345bb..9e29a71 100644 --- a/HackTimer.min.js +++ b/HackTimer.min.js @@ -1 +1 @@ -(function(s){var w,f={},o=window,l=console,m=Math,z='postMessage',x='HackTimer.js by turuslan: ',v='Initialisation failed';if(typeof(Worker)!=='undefined'){function g(p){return p+m.floor(m.random()*Number.MAX_VALUE)}try{w=new Worker(s);o.setInterval=function(c,t){var i=g('i-');f[i]=c;w[z]({n:'a',i:i,t:t});return i};o.clearInterval=function(i){delete f[i];w[z]({n:'b',i:i})};o.setTimeout=function(c,t){var i=g('t-');f[i]=c;w[z]({n:'c',i:i,t:t});return i};o.clearTimeout=function(i){delete f[i];w[z]({n:'d',i:i})};w.onmessage=function(e){f[e.data].call(o)};w.onerror=function(e){l.log(e)};l.log(x+'Initialisation succeeded')}catch(e){l.log(x+v);l.error(e)}}else l.log(x+v+' - HTML5 Web Worker is not supported')})('HackTimerWorker.min.js'); \ No newline at end of file +(function(s){var w,f={},o=window,l=console,m=Math,z='postMessage',x='HackTimer.js by turuslan: ',v='Initialisation failed',p=0,r='hasOwnProperty';if(typeof(Worker)!=='undefined'){try{w=new Worker(s);o.setInterval=function(c,t){var i=++p;f[i]=c;w[z]({n:'a',i:i,t:t});return i};o.clearInterval=function(i){if(f[r](i)){delete f[i];w[z]({n:'b',i:i})}};o.setTimeout=function(c,t){var i=++p;f[i]=c;w[z]({n:'c',i:i,t:t});return i};o.clearTimeout=function(i){if(f[r](i)){delete f[i];w[z]({n:'d',i:i})}};w.onmessage=function(e){var n=e.data;if(f[r](n))n=f[n];if(typeof(n)=='string')try{n=new Function(n)}catch(k){l.log(x+'Error parsing callback code string: ',k)}if(typeof(n)=='function')n.call(o)};w.onerror=function(e){l.log(e)};l.log(x+'Initialisation succeeded')}catch(e){l.log(x+v);l.error(e)}}else l.log(x+v+' - HTML5 Web Worker is not supported')})('HackTimerWorker.min.js'); \ No newline at end of file