From 4aeb1c709e4612baf84ebd89e2bbf3dcfe38758a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Jakse?= Date: Wed, 15 Apr 2020 00:43:41 +0200 Subject: [PATCH] Avoid restarting the connection when leaving the game --- trivabble.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trivabble.js b/trivabble.js index caa1562..3a48441 100644 --- a/trivabble.js +++ b/trivabble.js @@ -1425,6 +1425,8 @@ window.addEventListener("DOMContentLoaded", initLang); + window.addEventListener("beforeunload", stopConnection); + window.addEventListener("offline", function () { stopConnection(); showConnectionLost(_("It seems your browser went offline. Please reconnect to continue playing.")); -- 2.30.2