More alert suppression changes
This commit is contained in:
parent
3ba6f0e047
commit
a16f0586f4
29 changed files with 663 additions and 636 deletions
|
|
@ -56,8 +56,8 @@ function pb(a,b){b=qb(b.parentNode,"pc8080-control");for(var c=0;c<b.length;c++)
|
|||
function qb(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}
|
||||
function rb(a){for(var b=!0,c=sb[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],f=null;0<=tb.indexOf(e)&&(f=function(){return function(){rb(a)}}());var g=ub[e];if(g)if(!f)b=g(d[1],d[2],d[3]);else{if(!g(f,d[1],d[2],d[3]))break}else{var b=!1,h=mb(d[1],a);if(h)if(g=wb[e])b=g(h,d[2],d[3]);else{var k=h.exports;if(k&&(g=k[e]))if(b=!0,!f)b=g.call(h,d[2],d[3]);else if(!g.call(h,f,d[2],d[3]))break}}if(!b){r("Script error: "+e+(g?" failed":" unrecognized"));break}}c&&!c.length&&delete sb[a];return b}l=t.prototype;
|
||||
l.toString=function(){return this.name?this.name:this.id||this.type};
|
||||
l.da=function(a,b,c){switch(b){case "clear":return this.P[b]||(this.P[b]=c,c.onclick=function(a){return function(){a.P.print&&(a.P.print.value="")}}(this)),!0;case "print":return this.P[b]||(this.ua=this.P[b]=c,c.value="",this.i=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.aa=function(a){this.i(a,this.cb)}),!0;default:return!1}};l.log=function(){};l.i=function(){};
|
||||
l.status=function(a){this.i(this.cb+": "+a)};l.aa=function(a,b,c){if(!b){var d=mb("Computer",this.id);if(d&&d.F.Rb){console.log("ignoring notice during unload: "+a);return}}Ya(a,b,c||this.type)};function xb(a,b){a.F.error=!0;a.aa(b)}function yb(a,b){b&&(a.F.ready?b():a.zb=b);return a.F.ready}function zb(a){if(!a.F.error&&(a.F.ready=!0,a.F.ready)){var b=a.zb;a.zb=null;b&&b()}}function Ab(a,b){a.F.mb&&(b?a.F.Ib=!0:void 0===b&&a.i(a.toString()+" busy"));return a.F.mb}
|
||||
l.da=function(a,b,c){switch(b){case "clear":return this.P[b]||(this.P[b]=c,c.onclick=function(a){return function(){a.P.print&&(a.P.print.value="")}}(this)),!0;case "print":return this.P[b]||(this.ua=this.P[b]=c,c.value="",this.i=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.aa=function(a){this.i(a,this.cb);return!0}),!0;default:return!1}};l.log=function(){};l.i=function(){};
|
||||
l.status=function(a){this.i(this.cb+": "+a)};l.aa=function(a,b,c){if(!b){var d=mb("Computer",this.id);if(d&&d.F.Rb)return console.log("ignoring notice during unload: "+a),!1}Ya(a,b,c||this.type);return!0};function xb(a,b){a.F.error=!0;a.aa(b)}function yb(a,b){b&&(a.F.ready?b():a.zb=b);return a.F.ready}function zb(a){if(!a.F.error&&(a.F.ready=!0,a.F.ready)){var b=a.zb;a.zb=null;b&&b()}}function Ab(a,b){a.F.mb&&(b?a.F.Ib=!0:void 0===b&&a.i(a.toString()+" busy"));return a.F.mb}
|
||||
function Bb(a,b){if(a.F.Ib)return a.F.mb=!1,a.F.Ib=!1;if(a.F.error)return a.i(a.toString()+" error"),!1;a.F.mb=b;return a.F.mb}l.wa=function(){return this.F.ja=!0};l.va=function(a,b){b&&(this.F.ja=!1);return!0};function Cb(a,b){if(a.K){a===a.K?b|=0:b=b||a.ha;var c=a.K.ha&b;return!!b&&c===b||!!(c&a.K.xd)}return!1}function Db(a,b){a.K&&Cb(a,0)&&a.K.message(b,void 0)}function x(a,b,c,d,e,f,g){a.K&&(!0===g?g=0:null==g&&(g=a.ha),Eb(a.K,a,b,c,d,e,f,g))}
|
||||
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
var hb=window?window.PCjs.Machines:{},fb=window?window.PCjs.Components:[],sb=window?window.PCjs.Commands:{},tb=["hold","sleep","wait"],ub={alert:function(a){r(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},wb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -3296,9 +3296,11 @@ class Component {
|
|||
* @param {string} s
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id]
|
||||
* @return {boolean}
|
||||
*/
|
||||
this.notice = function noticePanel(s, fPrintOnly, id) {
|
||||
this.println(s, this.idComponent);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
|
|
@ -3419,6 +3421,7 @@ class Component {
|
|||
* @param {string} s is the message text
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id] is the caller's ID, if any
|
||||
* @return {boolean}
|
||||
*/
|
||||
notice(s, fPrintOnly, id)
|
||||
{
|
||||
|
|
@ -3429,10 +3432,11 @@ class Component {
|
|||
var computer = Component.getComponentByType("Computer", this.id);
|
||||
if (computer && computer.flags.unloading) {
|
||||
console.log("ignoring notice during unload: " + s);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Component.notice(s, fPrintOnly, id || this.type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ function Va(a,b){b=A(b.parentNode,"pc8080-control");for(var c=0;c<b.length;c++)f
|
|||
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}
|
||||
function Xa(a){for(var b=!0,c=Ya[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],f=null;0<=Za.indexOf(e)&&(f=function(){return function(){Xa(a)}}());var g=$a[e];if(g)if(!f)b=g(d[1],d[2],d[3]);else{if(!g(f,d[1],d[2],d[3]))break}else{var b=!1,h=Ua(d[1],a);if(h)if(g=ab[e])b=g(h,d[2],d[3]);else{var m=h.exports;if(m&&(g=m[e]))if(b=!0,!f)b=g.call(h,d[2],d[3]);else if(!g.call(h,f,d[2],d[3]))break}}if(!b){r("Script error: "+e+(g?" failed":" unrecognized"));break}}c&&!c.length&&delete Ya[a];return b}k=t.prototype;
|
||||
k.toString=function(){return this.name?this.name:this.id||this.type};
|
||||
k.S=function(a,b,c){switch(b){case "clear":return this.w[b]||(this.w[b]=c,c.onclick=function(a){return function(){a.w.print&&(a.w.print.value="")}}(this)),!0;case "print":return this.w[b]||(this.pa=this.w[b]=c,c.value="",this.aa=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.G=function(a){this.aa(a,this.Ya)}),!0;default:return!1}};k.log=function(){};k.aa=function(){};
|
||||
k.status=function(a){this.aa(this.Ya+": "+a)};k.G=function(a,b,c){if(!b){var d=Ua("Computer",this.id);if(d&&d.i.rb){console.log("ignoring notice during unload: "+a);return}}Ja(a,b,c||this.type)};function bb(a,b){b&&(a.i.ready?b():a.eb=b);return a.i.ready}function B(a){if(!a.i.error&&(a.i.ready=!0,a.i.ready)){var b=a.eb;a.eb=null;b&&b()}}function cb(a,b){if(a.i.nb)return a.i.ab=!1,a.i.nb=!1;if(a.i.error)return a.aa(a.toString()+" error"),!1;a.i.ab=b;return a.i.ab}k.ca=function(){return this.i.V=!0};
|
||||
k.ba=function(a,b){b&&(this.i.V=!1);return!0};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
k.S=function(a,b,c){switch(b){case "clear":return this.w[b]||(this.w[b]=c,c.onclick=function(a){return function(){a.w.print&&(a.w.print.value="")}}(this)),!0;case "print":return this.w[b]||(this.pa=this.w[b]=c,c.value="",this.aa=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.G=function(a){this.aa(a,this.Ya);return!0}),!0;default:return!1}};k.log=function(){};
|
||||
k.aa=function(){};k.status=function(a){this.aa(this.Ya+": "+a)};k.G=function(a,b,c){if(!b){var d=Ua("Computer",this.id);if(d&&d.i.rb)return console.log("ignoring notice during unload: "+a),!1}Ja(a,b,c||this.type);return!0};function bb(a,b){b&&(a.i.ready?b():a.eb=b);return a.i.ready}function B(a){if(!a.i.error&&(a.i.ready=!0,a.i.ready)){var b=a.eb;a.eb=null;b&&b()}}function cb(a,b){if(a.i.nb)return a.i.ab=!1,a.i.nb=!1;if(a.i.error)return a.aa(a.toString()+" error"),!1;a.i.ab=b;return a.i.ab}
|
||||
k.ca=function(){return this.i.V=!0};k.ba=function(a,b){b&&(this.i.V=!1);return!0};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
var Pa=window?window.PCjs.Machines:{},u=window?window.PCjs.Components:[],Ya=window?window.PCjs.Commands:{},Za=["hold","sleep","wait"],$a={alert:function(a){r(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ab={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
|
||||
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});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||
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});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue