Soft'N'Design Software
/
projects
/
trivabble.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
112b613
)
Avoid restarting the connection when leaving the game
author
Raphaël Jakse
<raphael.trivabble@jakse.fr>
Tue, 14 Apr 2020 22:43:41 +0000
(
00:43
+0200)
committer
Raphaël Jakse
<raphael.trivabble@jakse.fr>
Tue, 14 Apr 2020 22:43:41 +0000
(
00:43
+0200)
trivabble.js
patch
|
blob
|
blame
|
history
diff --git
a/trivabble.js
b/trivabble.js
index caa15626dc78d08dbc83aba910f41d6428aaf650..3a4844110b5e371f528677e1bd35298a9ec0c7d5 100644
(file)
--- 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."));