Skip to Content

JavaScript File

URL: https://sonniyzaliv.ru/bitrix/js/main/core/core_ls.min.js?17618980852683
HTTP Status: 200 OK
MIME Type: application/x-javascript
Last Modified: Fri, 31 Oct 2025 08:08:05 GMT
Download Time: Less than a second
Cookies: None
Size: 3 KB
HTTP Headers:  7 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1(function(e){if(e.BX.localStorage){return}

2const t=e.BX;let o=null;let r=null;t.localStorage=function(){t.bind(e,"storage",t.proxy(this._onchange,this));setInterval(t.delegate(this._clear,this),5e3)}

3;t.localStorage.checkBrowser=function(){return true}

4;t.localStorage.set=function(e,o,r){return t.localStorage.instance().set(e,o,r)}

5;t.localStorage.get=function(e){return t.localStorage.instance().get(e)}

6;t.localStorage.remove=function(e){return t.localStorage.instance().remove(e)}

7;t.localStorage.instance=function(){if(!o){o=new t.localStorage}

8return o}

9;t.localStorage.prototype.prefix=function(){if(!r){r="bx"+t.message("USER_ID")+"-"+(t.message.SITE_ID?t.message("SITE_ID"):"admin")+"-"}

10return r}

11;t.localStorage.prototype._onchange=function(o){o=o||e.event;if(!o.key){return}

12if(!!o.key&&o.key.substring(0,this.prefix().length)==this.prefix()){var r={key:o.key.substring(this.prefix().length,o.key.length),value:!!o.newValue?this._decode(o.newValue.substring(11,o.newValue.length)):null,oldValue:!!o.oldValue?this._decode(o.oldValue.substring(11,o.oldValue.length)):null}

13;switch(r.key){case"BXGCE":if(r.value){t.onCustomEvent(r.value.e,r.value.p)}

14break;default:if(o.newValue){t.onCustomEvent(e,"onLocalStorageSet",[r])}

15if(o.oldValue&&!o.newValue){t.onCustomEvent(e,"onLocalStorageRemove",[r])}

16t.onCustomEvent(e,"onLocalStorageChange",[r]);break}

17}

18}

19;t.localStorage.prototype._clear=function(){var e=+new Date,t,o;for(o=0;o<localStorage.length;o++){t=localStorage.key(o);if(t.substring(0,2)=="bx"){var r=localStorage.getItem(t).split(":",1)*1e3;if(e>=r){localStorage.removeItem(t)}

20}

21}

22}

23;t.localStorage.prototype._encode=function(e){if(typeof e=="object"){e=JSON.stringify(e)}

24else{e=e.toString()}

25return e}

26;t.localStorage.prototype._decode=function(e){var t=null;if(!!e){try{t=JSON.parse(e)}

27catch(o){t=e}

28}

29return t}

30;t.localStorage.prototype._trigger_error=function(e,o,r,n){t.onCustomEvent(this,"onLocalStorageError",[e,{key:o,value:r,ttl:n}

31])}

32;t.localStorage.prototype.set=function(e,t,o){if(!o||o<=0){o=60}

33if(e==undefined||e==null||t==undefined){return false}

34try{localStorage.setItem(this.prefix()+e,Math.round(+new Date/1e3)+o+":"+this._encode(t))}

35catch(r){this._trigger_error(r,e,t,o)}

36}

37;t.localStorage.prototype.get=function(e){var t=localStorage.getItem(this.prefix()+e);if(t){var o=t.split(":",1)*1e3;if(+new Date<=o){t=t.substring(11,t.length);return this._decode(t)}

38}

39return null}

40;t.localStorage.prototype.remove=function(e){localStorage.removeItem(this.prefix()+e)}

...

</html>