Generate scenario on DOM load, not page load.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 19 Sep 2014 14:58:05 +0000 (16:58 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 19 Sep 2014 14:58:05 +0000 (16:58 +0200)
scenario.html

index 5959411f91ec93ef8575441e149ddf5ebf0bdd9d..f1a72075a3ed6f610625641b93fe004f1dcba9ca 100644 (file)
     <script src="heroik.js" type="text/javascript"></script>
     <script src="names.js" type="text/javascript"></script>
     <script src="scenarios.js" type="text/javascript"></script>
+    <script type='text/javascript'>
+      window.addEventListener('DOMContentLoaded', generateScenario);
+    </script>
     <title>Scenario - Hero: Immortal King</title>
   </head>
-  <body onload="generateScenario()">
+  <body>
     <header>
       <a class=button href="heroik.html">◀ Finished!</a>
       <a class=button style="float: right; text-align: right"