Assorted application updates
This commit is contained in:
parent
7457e4e44f
commit
49f25f682d
38 changed files with 223 additions and 139 deletions
|
|
@ -43,9 +43,9 @@ e[c]&255,d.I[f++]=e[c]>>8&255,d.I[f++]=e[c]>>16&255,d.I[f++]=e[c]>>24&255;else(e
|
|||
function pa(){return"http://"+(window?window.location.host:"www.pcjs.org")}function va(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function xa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}
|
||||
function ya(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function za(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}
|
||||
function Aa(a){if(!Ba){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}Ba=c}return Ba[a]||Ba[a.toLowerCase()]}function Ca(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Da(a){r.init.push(a)}
|
||||
function Fa(a){if(Ga)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){q(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Ha(a){!Ga&&a?(Ga=!0,Ia&&Ja("init"),Ka&&Ja("show")):Ga=a}function Ja(a){r[a]&&Fa(r[a])}var Ba=null,r={init:[],show:[],exit:[]},Ia=!1,Ka=!1,Ga=!0,wa=null;Ca("onload",function(){Ia=!0;Fa(r.init)});Ca("onpageshow",function(){Ka=!0;Fa(r.show)});Ca(za("Opera")||za("iOS")?"onunload":"onbeforeunload",function(){Fa(r.exit)});
|
||||
function t(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Wa=b.comment;this.jb=b;this.exports={};this.m=this.bindings={};a=this.id.indexOf(".");0>a?this.va=this.id:(this.wa=this.id.substr(0,a),this.va=this.id.substr(a+1));this.h={ready:!1,Ba:!1,Oa:!1,F:!1,Sa:!1,error:!1};this.Da=null;this.h.error=!1;this.w=this.j=this.s=this.v=this.ga=null;v.push(this)}function La(a,b,c){Ma[a]&&b&&(Ma[a][b]=c)}function Na(){return Date.now()||+new Date}
|
||||
function q(a){window&&window.alert(a)}function Oa(a){var b=!1;window&&(b=window.confirm(a));return b}function w(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<v.length;b++){var d=v[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Pa(a){if(void 0!==a){var b;for(b=0;b<v.length;b++)if(v[b].id===a)return v[b]}return null}
|
||||
function Fa(a){if(Ga)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){q(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Ha(a){!Ga&&a?(Ga=!0,Ia&&Ja("init"),Ka&&Ja("show")):Ga=a}function Ja(a){r[a]&&Fa(r[a])}var Ba=null,r={init:[],show:[],exit:[]},Ia=!1,Ka=!1,Ga=!0,wa=null;Ca("onload",function(){Ia=!0;Fa(r.init)});Ca("onpageshow",function(){Ka=!0;Fa(r.show)});
|
||||
Ca(za("iOS")?"onpagehide":za("Opera")?"onunload":"onbeforeunload",function(){Fa(r.exit)});function t(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Wa=b.comment;this.jb=b;this.exports={};this.m=this.bindings={};a=this.id.indexOf(".");0>a?this.va=this.id:(this.wa=this.id.substr(0,a),this.va=this.id.substr(a+1));this.h={ready:!1,Ba:!1,Oa:!1,F:!1,Sa:!1,error:!1};this.Da=null;this.h.error=!1;this.w=this.j=this.s=this.v=this.ga=null;v.push(this)}
|
||||
function La(a,b,c){Ma[a]&&b&&(Ma[a][b]=c)}function Na(){return Date.now()||+new Date}function q(a){window&&window.alert(a)}function Oa(a){var b=!1;window&&(b=window.confirm(a));return b}function w(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<v.length;b++){var d=v[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Pa(a){if(void 0!==a){var b;for(b=0;b<v.length;b++)if(v[b].id===a)return v[b]}return null}
|
||||
function x(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<v.length;d++)if(c)c==v[d]&&(c=null);else if(!(a!=v[d].type||b&&v[d].id.indexOf(b)))return v[d]}return null}function y(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){q(c.message+" ("+a+")")}return b}
|
||||
function Qa(a,b){var c=z;b=A(b.parentNode,c+"-control");for(var d=0;d<b.length;d++)for(var e=b[d].childNodes,f=0;f<e.length;f++){var g=e[f];if(1===g.nodeType){var h=g.getAttribute("class");if(h)for(var m=h.split(" "),u=0;u<m.length;u++)switch(h=m[u],h){case c+"-binding":(h=y(g))&&h.binding&&a.U(h.type,h.binding,g,h.value),u=m.length}}}}
|
||||
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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue