summaryrefslogtreecommitdiff
path: root/2026/framing/index.html
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-08-04 18:32:42 -0400
committerLLLL Colonq <llll@colonq>2026-08-04 18:32:42 -0400
commitee4b068359137edaa5ce6ce6a4e7e880dd65fe03 (patch)
tree0b53319d8f0bb9b1fe772dad078220f6968dffc1 /2026/framing/index.html
parentad2524a89f2a0e29088873b18eb458760fa796b1 (diff)
Fix high score load
Diffstat (limited to '2026/framing/index.html')
-rw-r--r--2026/framing/index.html16
1 files changed, 8 insertions, 8 deletions
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":