File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/im/v2/lib/timer/dist/timer.bundle.min.js
Back
this.BX=this.BX||{};this.BX.Messenger=this.BX.Messenger||{};this.BX.Messenger.v2=this.BX.Messenger.v2||{};(function(t){"use strict"; /** * Bitrix Messenger * Timer manager * * @package bitrix * @subpackage im * @copyright 2001-2019 Bitrix */class e{constructor(){this.list={};this.updateInterval=1e3;clearInterval(this.updateIntervalId);this.updateIntervalId=setInterval(this.worker.bind(this),this.updateInterval)}start(t,e="default",s=1,i=null,r={}){e=e==null?"default":e;s=parseFloat(s);if(isNaN(s)||s<=0){return false}s=s*1e3;if(typeof this.list[t]==="undefined"){this.list[t]={}}this.list[t][e]={dateStop:(new Date).getTime()+s,callback:typeof i==="function"?i:function(){},callbackParams:r};return true}has(t,e="default"){e=e==null?"default":e;if(e.toString().length<=0||typeof this.list[t]==="undefined"){return false}return!!this.list[t][e]}stop(t,e="default",s){e=e==null?"default":e;if(e.toString().length<=0||typeof this.list[t]==="undefined"){return false}if(!this.list[t][e]){return true}if(s!==true){this.list[t][e]["callback"](e,this.list[t][e]["callbackParams"])}delete this.list[t][e];return true}stopAll(t){for(let e in this.list){if(this.list.hasOwnProperty(e)){for(let s in this.list[e]){if(this.list[e].hasOwnProperty(s)){this.stop(e,s,t)}}}}return true}worker(){for(let t in this.list){if(!this.list.hasOwnProperty(t)){continue}for(let e in this.list[t]){if(!this.list[t].hasOwnProperty(e)||this.list[t][e]["dateStop"]>new Date){continue}this.stop(t,e)}}return true}clean(){clearInterval(this.updateIntervalId);this.stopAll(true);return true}}t.Timer=e})(this.BX.Messenger.v2.Lib=this.BX.Messenger.v2.Lib||{}); //# sourceMappingURL=timer.bundle.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings