mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 00:34:00 -06:00
Blue screen of death when theres an error
This commit is contained in:
@@ -145,6 +145,39 @@ body.iOS div.hint {
|
|||||||
visibility: visible;
|
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 {
|
div#paused {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -186,6 +186,19 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id=bsodmom>
|
||||||
|
<div id=bsod>
|
||||||
|
<p class=c><span> Progress Quest </span>
|
||||||
|
<p>
|
||||||
|
<p>An error has occurred.
|
||||||
|
<p>Error:
|
||||||
|
<p id=bsod_message>
|
||||||
|
<p>In <span id=bsod_source></span> at <span id=bsod_lineno></span>:<span id=bsod_colno></span>
|
||||||
|
<p id=bsod_error>
|
||||||
|
<p class=c>Press any key to continue...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="paused"><br>PAUSED</div>
|
<div id="paused"><br>PAUSED</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1156,13 +1156,29 @@ function ToDna(s) {
|
|||||||
return r;
|
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) {
|
function FormKeyDown(e) {
|
||||||
|
$("#bsodmom").hide();
|
||||||
|
|
||||||
var key = String.fromCharCode(e.which);
|
var key = String.fromCharCode(e.which);
|
||||||
|
|
||||||
if (key === 'd') {
|
if (key === 'd') {
|
||||||
alert("Your character's genome is " + ToDna(game.dna + ""));
|
alert("Your character's genome is " + ToDna(game.dna + ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (key === 'e') {
|
||||||
|
// simulateanerror();
|
||||||
|
// }
|
||||||
|
|
||||||
if (game.online) {
|
if (game.online) {
|
||||||
if (key === 'b') {
|
if (key === 'b') {
|
||||||
Brag('b', true);
|
Brag('b', true);
|
||||||
|
|||||||
Reference in New Issue
Block a user