diff --git a/main.css b/main.css index a174aa4..553d0c1 100644 --- a/main.css +++ b/main.css @@ -145,6 +145,39 @@ body.iOS div.hint { visibility: visible; } +#bsodmom { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + text-align: center; + vertical-align: middle; + display: none; +} +#bsod { + width: 500px; + background-color: #008; + color: white; + font-family: courier, monospace; + font-size: 14px; + margin: auto; + margin-top: 100px; + padding: 40px; +} +#bsod p { + text-align: left; + margin: 1em; +} +#bsod p.c { + text-align: center !IMPORTANT; +} +#bsod p.c span { + background: silver; + color: #008; +} + + div#paused { display: none; position: absolute; diff --git a/main.html b/main.html index 27b1826..620f8d5 100644 --- a/main.html +++ b/main.html @@ -186,6 +186,19 @@ +
+
+

 Progress Quest  +

  +

An error has occurred. +

Error: +

+

In at : +

+

Press any key to continue...

+
+
+

PAUSED
diff --git a/main.js b/main.js index e24c26d..1bc40f5 100644 --- a/main.js +++ b/main.js @@ -1156,13 +1156,29 @@ function ToDna(s) { return r; } +window.onerror = function(message, source, lineno, colno, error) { + $("#bsod_message").text(message); + $("#bsod_source").text(source); + $("#bsod_lineno").text(lineno); + $("#bsod_colno").text(colno); + $("#bsod_error").text(error.stack); + + $("#bsodmom").show(); +}; + function FormKeyDown(e) { + $("#bsodmom").hide(); + var key = String.fromCharCode(e.which); if (key === 'd') { alert("Your character's genome is " + ToDna(game.dna + "")); } + // if (key === 'e') { + // simulateanerror(); + // } + if (game.online) { if (key === 'b') { Brag('b', true);