summaryrefslogtreecommitdiff
path: root/2026/game.html
blob: 8d336050816fb82961406815a851571b5778ab28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>In Between The Iframes</title>
    <style>
      * {
          margin: 0px;
          padding: 0px;
      }
      body {
          font-size: 70px;
      }
      #game-test {
          width: 100%;
          height: 100%;
      }
    </style>
    <script type="module">
      console.log(window.innerWidth);
      window.addEventListener("message", ev => {
          switch (ev.data.op) {
          case "start":
              window.parent.postMessage({op: "started"});
              setTimeout(() => {
                  window.parent.postMessage({op: "done", win: true});
              }, 5000);
              break;
          default: console.log(`unknown event: ${ev}`); break;
          }
      });
      window.parent.postMessage({op: "ready"});
    </script>
  </head>
  <body>
    <img id="game-test" src="./testsmall.png"></img>
  </body>
</html>