diff options
Diffstat (limited to 'web/static/dartboat.js')
-rw-r--r-- | web/static/dartboat.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js index b2b8481..ace2900 100644 --- a/web/static/dartboat.js +++ b/web/static/dartboat.js @@ -123,15 +123,16 @@ function storeOpt(opt, val) { localStorage.setItem(UTF8ToString(opt), UTF8ToString(val)); } -function prevDef(e) { +function exitDialogue(e) { e.preventDefault(); + e.returnValue = ''; // bloody chromium } function enableExitDialogue(enable) { if (enable) - window.addEventListener('beforeunload', prevDef); + window.addEventListener('beforeunload', exitDialogue); else - window.removeEventListener('beforeunload', prevDef); + window.removeEventListener('beforeunload', exitDialogue); } function boatAfloat() { |