1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/silis-ModuleJS

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
Клонировать/Скачать
jsc.min.js 2.8 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
十里开源 Отправлено 4 лет назад 1ebc8e3
(function(a){if(!a.Object.assign){a.Object.assign=function(){var c=arguments,d=c[0];for(var e=1;e<c.length;e++){var f=c[e];if(typeof(f)=="object"){for(var g in f){d[g]=f[g];}}}return d;};var b=a.Object.defineProperty||function(d,e,f){d[e]=f.value;};a.Object.defineProperty=function(e,f,g){try{b(e,f,g);}catch(h){e[f]=g.value;}};}if(!a.Array.prototype.forEach){a.Array.prototype.forEach=function(f,g){if(this==null)this.forEach;var h=this.slice();for(var i=0;i<h.length;i++){f.call(g||a,h[i],i);}};a.Array.prototype.map=function(g,h){if(this==null)this.map;var i=[];for(var j=0;j<this.length;j++){i.push(g.call(h||a,this[j],j));}return i;};a.Array.prototype.indexOf=function(h){for(var i=0;i<this.length;i++){if(this[i]===h)return i;}return-1;};}Object.defineProperty(a.Array.prototype,"distinct",{value:function(){var i=this,j=i.slice();i.splice(0);if(a.Set){var k=new a.Set();for(var l=0;l<j.length;l++){var n=j[l];if(!k.has(n)){k.add(n);i.push(n);}}}else{for(var l=0;l<j.length;l++){var n=j[l];if(i.indexOf(n)==-1){i.push(n);}}}},enumerable:false});a.String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");};if(!a.document.addEventListener){a.document.addEventListener=function(k,l){switch(k){case"DOMContentLoaded":a.document.attachEvent("onreadystatechange",l);break;}};a.document.removeEventListener=function(l,m){switch(l){case"DOMContentLoaded":a.document.detachEvent("onreadystatechange",m);break;}};}if(!a.document.getElementsByClassName){a.document.getElementsByClassName=function(m){var n=[],o=new RegExp('(\\s|^)(?:'+m.trim()+')(?=\\s|$)');Array.prototype.forEach.call(a.document.getElementsByTagName('*'),function(p){if(o.test(p.className)){n.push(p);}});return n;};}a.setCookie=function(n,o,p){if(p!=null)a.document.cookie=n+"="+encodeURIComponent(o)+";expires="+new Date(new Date().getTime()+p).toGMTString();else a.document.cookie=n+"="+encodeURIComponent(o);};a.getCookie=function(o){var p=a.document.cookie.match(o+"=([^;]*)");if(p)return decodeURIComponent(p[1]);else return null;};a.removeCookie=function(p){a.document.cookie=p+"=;expires="+new Date(new Date().getTime()-31536000000).toGMTString();};if(!a.localStorage){a.localStorage={setItem:function(q,r){a.setCookie("l_"+q,r,31536000000);},getItem:function(r){return a.getCookie("l_"+r);},removeItem:function(s){a.removeCookie("l_"+s);},clear:function(){var t=a.document.cookie.match(/l_[^=]+=/g);if(t){for(var u=0;u<t.length;u++){var v=t[u];v=v.substring(2,v.length-1);a.localStorage.removeItem(v);}}}};}if(!a.sessionStorage){a.sessionStorage={setItem:function(u,v){a.setCookie("s_"+u,v);},getItem:function(v){return a.getCookie("s_"+v);},removeItem:function(w){a.removeCookie("s_"+w);},clear:function(){var x=a.document.cookie.match(/s_[^=]+=/g);if(x){for(var y=0;y<x.length;y++){var z=x[y];z=z.substring(2,z.length-1);a.sessionStorage.removeItem(z);}}}};}})(window);

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/silis-ModuleJS.git
git@gitlife.ru:oschina-mirror/silis-ModuleJS.git
oschina-mirror
silis-ModuleJS
silis-ModuleJS
v1.0.2