Updated minified version

This commit is contained in:
turuslan 2015-07-10 20:50:04 +05:00
parent 253439eb85
commit 1177ef0328

2
HackTimer.min.js vendored
View File

@ -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');
(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');