Merged in feature/MAPG-61-prevent-leaving-page-accidentall (pull request #41)
MAPG-61 add onbeforeunload function to prevent accidental leave
This commit is contained in:
commit
b32cfacdad
@ -470,4 +470,9 @@
|
|||||||
document.getElementById('startNewGameButton').onclick = function () {
|
document.getElementById('startNewGameButton').onclick = function () {
|
||||||
Core.startNewGame();
|
Core.startNewGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.onbeforeunload = function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.returnValue = '';
|
||||||
|
};
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user