MAPG-61 add onbeforeunload function to prevent accidental leave

This commit is contained in:
bence committed 2020-05-24 14:47:15 +02:00
1 parent 830989dc4c
commit 92408d6f02
1 file changed
+5
+5
View File
@@ -470,4 +470,9 @@
document.getElementById('startNewGameButton').onclick = function () {
Core.startNewGame();
}
window.onbeforeunload = function (e) {
e.preventDefault();
e.returnValue = '';
};
})();