From 137cbbf0b9cf765a584b7f1f076d64d66fdb688e Mon Sep 17 00:00:00 2001 From: Azgaar Date: Thu, 25 Feb 2021 15:07:09 +0300 Subject: [PATCH] v1.5.61 - not fire onbeforeunload in electron --- modules/ui/general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/general.js b/modules/ui/general.js index d74bfd00..4e1513ed 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -9,7 +9,7 @@ $(window).resize(function(e) { changeMapSize(); }); -window.onbeforeunload = () => "Are you sure you want to navigate away?"; +if (!navigator.userAgent.includes("Electron")) window.onbeforeunload = () => "Are you sure you want to navigate away?"; // Tooltips const tooltip = document.getElementById("tooltip");