diff --git a/js/prototype/main.js b/js/prototype/main.js index ad6e7ff..ae509b5 100644 --- a/js/prototype/main.js +++ b/js/prototype/main.js @@ -42,6 +42,15 @@ var loader; var coins = []; var previousTime; +window.onbeforeunload = function() { + + if (initMainScene !== initPeach && initMainScene !== initSponza && Coin.total !== 9) { + + return 'Warning : you are going to leave the page and abort the current test !'; + + } + +} init();