Added some polyfills for old browsers
This commit is contained in:
parent
0b78b2885e
commit
07ee5497bc
11 changed files with 69 additions and 13 deletions
|
|
@ -10,8 +10,9 @@ function G(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")
|
|||
function I(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var f=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)f.test(a[b].className)&&c.push(a[b]);return c}
|
||||
B.prototype={constructor:B,parent:null,toString:function(){return this.name?this.name:this.id||this.type},J:function(a,b,c){switch(b){case "clear":return this.A[b]||(this.A[b]=c,c.onclick=function(a){return function(){a.A.print&&(a.A.print.value="")}}(this)),!0;case "print":return this.A[b]||(this.ya=this.A[b]=c,c.value="",this.F=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||
this.ua=function(a){this.F(a,this.wa)}),!0;default:return!1}},log:function(){},F:function(){},status:function(a){this.F(this.wa+": "+a)},ua:function(a,b,c){c=c||this.type;b||t((c?c+": ":"")+a)},N:function(a){this.u.error||(this.u.ready=!1!==a,this.u.ready&&(a=this.va,this.va=null,a&&a()))}};function oa(a,b){if(a.u.xa)return a.u.ta=!1,a.u.xa=!1;if(a.u.error)return a.F(a.toString()+" error"),!1;a.u.ta=b;return a.u.ta}function J(a,b){b&&(a.u.ready?b():a.va=b);return a.u.ready}
|
||||
function pa(a,b){a.u.error=!0;a.ua(b)}function K(a){B.call(this,"C1PPanel",a);this.u.H=!1}D(K);K.prototype.J=function(a,b,c,d){return this.I&&this.I.J(a,b,c,d)||this.f&&this.f.J(a,b,c,d)||this.b&&this.b.J(a,b,c,d)?!0:B.prototype.J.call(this,a,b,c,d)};K.prototype.$=function(a,b){a&&!this.u.H&&(this.u.H=!0,this.I=b,this.f=L(b,"cpu"),this.b=L(b,"keyboard"),qa())};
|
||||
function qa(){for(var a=!1,b=I(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],f=G(d),g=F(f.id);g||(a=!0,g=new K(f));H(g,d);a&&g.N()}}x(qa);
|
||||
function pa(a,b){a.u.error=!0;a.ua(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
|
||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b});function K(a){B.call(this,"C1PPanel",a);this.u.H=!1}D(K);
|
||||
K.prototype.J=function(a,b,c,d){return this.I&&this.I.J(a,b,c,d)||this.f&&this.f.J(a,b,c,d)||this.b&&this.b.J(a,b,c,d)?!0:B.prototype.J.call(this,a,b,c,d)};K.prototype.$=function(a,b){a&&!this.u.H&&(this.u.H=!0,this.I=b,this.f=L(b,"cpu"),this.b=L(b,"keyboard"),qa())};function qa(){for(var a=!1,b=I(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],f=G(d),g=F(f.id);g||(a=!0,g=new K(f));H(g,d);a&&g.N()}}x(qa);
|
||||
function ra(a){B.call(this,"C1PCPU",a);sa(this);this.u.H=!1;this.u.Z=!1;this.sa=a.autoStart;this.ia=0;this.Aa=2;this.speed=this.ia;this.oa=30;this.na=5;this.ea=8;this.qa=["Slow","Fast","Max"];this.ab=["(1Mhz)","(up to "+this.ea+"Mhz)","(unlimited)"];this.O=[];this.K=[];this.ja=65536;this.ka=0;this.Y=65536;this.ca=0;this.v=[this.Hb,this.$c,this.Sd,this.l,this.l,this.bd,this.xb,this.l,this.ed,this.Zc,this.wb,this.l,this.l,this.Wc,this.ub,this.l,this.Gb,this.ad,this.l,this.l,this.l,this.cd,this.yb,this.l,
|
||||
this.Kb,this.Yc,this.l,this.l,this.l,this.Xc,this.vb,this.l,this.xc,this.qb,this.l,this.l,this.Db,this.sb,this.ld,this.l,this.gd,this.pb,this.kd,this.l,this.Cb,this.mb,this.hd,this.l,this.Eb,this.rb,this.l,this.l,this.l,this.tb,this.md,this.l,this.Cd,this.ob,this.l,this.l,this.l,this.nb,this.jd,this.l,this.sd,this.lc,this.l,this.l,this.l,this.nc,this.Tc,this.l,this.dd,this.kc,this.Sc,this.l,this.wc,this.hc,this.Qc,this.l,this.Ib,this.mc,this.l,this.l,this.l,this.oc,this.Uc,this.l,this.Mb,this.jc,
|
||||
this.l,this.l,this.l,this.ic,this.Rc,this.l,this.td,this.La,this.l,this.l,this.l,this.Na,this.qd,this.l,this.fd,this.Ka,this.pd,this.l,this.vc,this.Ha,this.nd,this.l,this.Jb,this.Ma,this.l,this.l,this.l,this.Oa,this.rd,this.l,this.Ed,this.Ja,this.l,this.l,this.l,this.Ia,this.od,this.l,this.l,this.Id,this.l,this.l,this.Qd,this.Kd,this.Nd,this.l,this.gc,this.l,this.Wd,this.l,this.Pd,this.Fd,this.Md,this.l,this.zb,this.Jd,this.l,this.l,this.Rd,this.Ld,this.Od,this.l,this.Yd,this.Hd,this.Xd,this.l,this.l,
|
||||
|
|
|
|||
Loading…
Reference in a new issue