This commit is contained in:
Renan LE CARO 2025-03-14 20:12:02 +01:00
parent cdfe6a4978
commit 934670b2a7
11 changed files with 84 additions and 3 deletions

View file

@ -17,6 +17,7 @@ import {putBallsAtPuck, resetBalls} from "./resetBalls";
import {makeEmptyPerksMap, sumOfKeys} from "./game_utils";
import {baseCombo, decreaseCombo, resetCombo} from "./combo";
import './sw_loader'
const gameCanvas = document.getElementById("game") as HTMLCanvasElement;
const ctx = gameCanvas.getContext("2d", {
@ -2382,6 +2383,7 @@ async function openSettingsPanel() {
});
}
}
actions.push({
text: "Sandbox mode",
help:

View file

@ -46,7 +46,7 @@ export const options = {
disabled() {
return window.location.search.includes("isInWebView=true");
},
},
}
} as const satisfies { [k: string]: OptionDef };
export type OptionDef = {

4
src/sw_loader.ts Normal file
View file

@ -0,0 +1,4 @@
if ("serviceWorker" in navigator &&
window.location.search.includes("isPWA=true")) {
navigator.serviceWorker.register("sw-b71.js");
}