From ee4b068359137edaa5ce6ce6a4e7e880dd65fe03 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 4 Aug 2026 18:32:42 -0400 Subject: Fix high score load --- 2026/framing/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to '2026/framing/index.html') diff --git a/2026/framing/index.html b/2026/framing/index.html index b91b89a..60efac4 100644 --- a/2026/framing/index.html +++ b/2026/framing/index.html @@ -19,17 +19,17 @@ console.log("initialized, starting..."); window.wasmBindings.main_js(); }); - window.fetch("https://api.colonq.computer/api/leaderboard/jam2026?n=1").then(async (resp) => { - const top = await resp.json(); - const score = top?.[0]?.[2]; - if (typeof score === "number") { - console.log(`high score: ${score}`); - window.wasmBindings.set_leaderboard_highscore(score); - } - }); window.addEventListener("message", ev => { switch (ev.data.op) { case "titlescreenclick": + window.fetch("https://api.colonq.computer/api/leaderboard/jam2026?n=1").then(async (resp) => { + const top = await resp.json(); + const score = top?.[0]?.[2]; + if (typeof score === "number") { + console.log(`high score: ${score}`); + window.wasmBindings.set_leaderboard_highscore(score); + } + }); window.wasmBindings.titlescreen_click(); break; case "startgame": -- cgit v1.3.1