</head>
<body><div class="container" id="container1">
<div id="advertisement">
</div>
<div id="header">
  <div id="identity"><a href="#" id="email" style="display: none">you@example.com</a>
  <a href="#" onclick="logout(); loginDiv(); return false;" id="logout" style="display: none">Sign Out</a>
  </div>

  <h1 id="title" class="gameTitle"><!-- My First ChoiceScript Game --></h1>
<h2 id="author" class="gameTitle"><!--by INSERTINSERTINSERT --></h2>

  <p id="headerLinks">
      <!-- <a href="credits.html" id="aboutLink" class="spacedLink">About</a> -->
    </p>
  <p id="buttons">
    <button id="statsButton" class="spacedLink" onclick="showStats()">Show Stats</button>
    <button id="achievementsButton" onclick="showAchievements()" class="spacedLink" style="display: none">Achievements</button>
    <button id="bugButton" onclick="reportBug()" class="spacedLink" style="display: none">Report Bug</button>
    <button id="menuButton" onclick="showMenu()" class="spacedLink">Menu</button>
  </p>
</div>
<div id="main">
<div id="text">
</div>
<script>
startLoading();
</script>
</div>
<div id="mobileLinks" class="webOnly">
</div>
<noscript>
<p>This game requires JavaScript; please enable JavaScript and refresh this page.</p>
</noscript>
<p><a id="makeyourowngames" href="https://www.choiceofgames.com/make-your-own-games/choicescript-intro/">Make your own games with ChoiceScript</a></p>
<div id="tools"></div>
<script type="module">
if (window.location.hostname === 'localhost') {
  const links = ['quicktest', 'randomtest', 'compile'];
  await Promise.all(Object.values(links).map(async file => {
    const link = `../../${file}.html`;
    const response = await fetch(link);
    if (!response.ok) throw new Error(`invalid link ${link}: ${response.status} ${response.statusText} ${await response.text()}`);
  }));
  window.tools.innerHTML = `
    <p>Tests: <a href="../../quicktest.html">Quicktest</a> <a href="../../randomtest.html">Randomtest</a></p>
    <p><a href="../../compile.html">Export to HTML</a></p>
  `
}
</script>
<dialog id="keyboardShortcuts" onclick="event.target === this && this.close()">
<header><span>Keyboard Shortcuts</span> <form method=dialog><button>X</button></form></header>
<div class="table">
  <div>Scroll Down</div>
  <div><span class="key">Space</span></div>
  <div>Scroll Up</div>
  <div><span class="key">Shift</span> + <span class="key">Space</span></div>
  <div>Next Option</div>
  <div><span class="key">J</span></div>
  <div>Previous Option</div>
  <div><span class="key">K</span></div>
  <div>Next (Press and Hold)</div>
  <div><span class="key">Enter</span></div>
  <div>Jump to Option</div>
  <div><span class="key">1</span> - <span class="key">9</span></div>
  <div>Show Stats</div>
  <div><span class="key">Q</span></div>
  <div>Menu</div>
  <div><span class="key">W</span></div>
  <div>Show Shortcuts</div>
  <div><span class="key">?</span></div>
</div>
</dialog>
</body>
</html>
