From 1980400a619104bdd15b49fcca42ebd0da0da7be Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 10 May 2022 17:49:05 -0700 Subject: web: bloody chromium… MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/static/dartboat.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'web/static/dartboat.js') 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() { -- cgit v1.2.3-70-g09d2