prevent accidental refreshes in production

This commit is contained in:
koneko 2025-01-08 20:40:46 +01:00
parent 368262707c
commit 8ccd33d2b0
2 changed files with 6 additions and 1 deletions

View File

@ -1 +1 @@
2f2a5s
DEVELOPMENT

View File

@ -59,4 +59,9 @@ import { log } from './utils';
Globals.GameMaster.changeScene(new MainScene());
let params = new URLSearchParams(location.href);
if (params.entries().next().value[1] == 'game') Globals.GameMaster.changeScene(new GameScene('Mission 1'));
if (Globals.latestCommit != 'DEVELOPMENT')
window.onbeforeunload = () => {
return 'You are about to leave.';
};
})();