Added some polyfills for old browsers

This commit is contained in:
Jeff 2016-10-01 14:37:02 -07:00 • committed by Jeff Parsons
commit 07ee5497bc
11 changed files with 69 additions and 13 deletions

View file

@ -18,7 +18,8 @@ function z(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")
function A(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
r.prototype={constructor:r,parent:null,toString:function(){return this.name?this.name:this.id||this.type},V: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.va=this.A[b]=c,c.value="",this.da=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.M=function(a){this.da(a,this.Sa)}),!0;default:return!1}},log:function(){},da:function(){},status:function(a){this.da(this.Sa+": "+a)},M:function(a,b,c){Aa(a,b,c||this.type)},ga:function(){return this.l.Y=!0},ia:function(a,b){b&&(this.l.Y=!1);return!0}};function Qa(a,b){if(a.l.eb)return a.l.Wa=!1,a.l.eb=!1;if(a.l.error)return a.da(a.toString()+" error"),!1;a.l.Wa=b;return a.l.Wa}function B(a){if(!a.l.error&&(a.l.ready=!0,a.l.ready)){var b=a.Za;a.Za=null;b&&b()}}
function Ra(a,b){b&&(a.l.ready?b():a.Za=b);return a.l.ready}
function Ra(a,b){b&&(a.l.ready?b():a.Za=b);return a.l.ready}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 e.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),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
var Sa="undefined"!==typeof ArrayBuffer,Ta=[1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,
0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1];function Ua(a){r.call(this,"Panel",a,Ua)}w(Ua);k=Ua.prototype;k.V=function(a,b,c,d){return this.v&&this.v.V(a,b,c,d)||this.a&&this.a.V(a,b,c,d)||this.m&&this.m.V(a,b,c,d)?!0:this.parent.V.call(this,a,b,c,d)};k.qa=function(a,b,c,d){this.v=a;this.j=b;this.a=c;this.N=d;this.m=Va(a,"Keyboard")};k.ga=function(a,b){b||Wa();return!0};k.ia=function(){return!0};k.Aa=function(){};
function Wa(){for(var a=!1,b=A(document,"pc8080","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=Na(e.id);f||(a=!0,f=new Ua(e));Pa(f,d);a&&B(f)}}ya(Wa);