diff --git a/emccpre.js b/emccpre.js index ea20771..e2986da 100644 --- a/emccpre.js +++ b/emccpre.js @@ -257,9 +257,16 @@ function initPuzzle() { // Default to giving keyboard focus to the puzzle. onscreen_canvas.focus(); - // And run the C setup function, passing argv[1] as the fragment + // Run the C setup function, passing argv[1] as the fragment // identifier (so that permalinks of the form puzzle.html#game-id // can launch the specified id). Module.arguments = [location.hash]; Module.run(); + + // And if we get here with everything having gone smoothly, i.e. + // we haven't crashed for one reason or another during setup, then + // it's probably safe to hide the 'sorry, no puzzle here' div and + // show the div containing the actual puzzle. + document.getElementById("apology").style.display = "none"; + document.getElementById("puzzle").style.display = "inline"; } diff --git a/html/jspage.pl b/html/jspage.pl index 7172800..376d39a 100755 --- a/html/jspage.pl +++ b/html/jspage.pl @@ -71,6 +71,7 @@ ${unfinishedheading} ${unfinishedpara}