summaryrefslogtreecommitdiff
path: root/web/static/dartboat.js
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-10 17:49:05 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-10 17:49:05 -0700
commit1980400a619104bdd15b49fcca42ebd0da0da7be (patch)
tree84bb66c65db67a8c830eb7cb9d3827f621a2d4d8 /web/static/dartboat.js
parent29d471c8eea0bcf5d23b9e63180e9f1b7089850c (diff)
downloaddartboat-1980400a619104bdd15b49fcca42ebd0da0da7be.tar.gz
dartboat-1980400a619104bdd15b49fcca42ebd0da0da7be.tar.xz
web: bloody chromium…
Diffstat (limited to 'web/static/dartboat.js')
-rw-r--r--web/static/dartboat.js7
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() {