From 16f5711c98041aa59e8c4fe9d4f22754ee99833c Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Sat, 11 Feb 2023 11:49:32 +0100 Subject: [PATCH] fix beforeunload warning if peer on transfer --- public/scripts/network.js | 1 - public_included_ws_fallback/scripts/network.js | 1 - 2 files changed, 2 deletions(-) diff --git a/public/scripts/network.js b/public/scripts/network.js index 71ee034..f59c74f 100644 --- a/public/scripts/network.js +++ b/public/scripts/network.js @@ -7,7 +7,6 @@ class ServerConnection { constructor() { this._connect(); - Events.on('beforeunload', _ => this._disconnect()); Events.on('pagehide', _ => this._disconnect()); document.addEventListener('visibilitychange', _ => this._onVisibilityChange()); if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect()); diff --git a/public_included_ws_fallback/scripts/network.js b/public_included_ws_fallback/scripts/network.js index aa622e7..3f8e9db 100644 --- a/public_included_ws_fallback/scripts/network.js +++ b/public_included_ws_fallback/scripts/network.js @@ -5,7 +5,6 @@ class ServerConnection { constructor() { this._connect(); - Events.on('beforeunload', _ => this._disconnect()); Events.on('pagehide', _ => this._disconnect()); document.addEventListener('visibilitychange', _ => this._onVisibilityChange()); if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect());