summaryrefslogtreecommitdiff
path: root/2026/framing/dist/snippets/game_lib-09da6449fcb9d06e/src
diff options
context:
space:
mode:
Diffstat (limited to '2026/framing/dist/snippets/game_lib-09da6449fcb9d06e/src')
-rw-r--r--2026/framing/dist/snippets/game_lib-09da6449fcb9d06e/src/bindings.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/2026/framing/dist/snippets/game_lib-09da6449fcb9d06e/src/bindings.js b/2026/framing/dist/snippets/game_lib-09da6449fcb9d06e/src/bindings.js
index e9c2655..222b74d 100644
--- a/2026/framing/dist/snippets/game_lib-09da6449fcb9d06e/src/bindings.js
+++ b/2026/framing/dist/snippets/game_lib-09da6449fcb9d06e/src/bindings.js
@@ -5,3 +5,14 @@ export function js_update_lifetotal(lives) {
export function js_ready_to_reset() {
window.parent.postMessage({op: "readytoreset"});
}
+
+export function js_upload_highscore(score) {
+ if (typeof score === "number") {
+ let form = FormData();
+ form.append("score", score);
+ fetch("https://api.colonq.computer/api/jam/2026/score", {
+ method: "POST",
+ body: form,
+ });
+ }
+}