mirror of
git://git.proxmox.com/git/novnc-pve.git
synced 2025-01-05 13:17:53 +03:00
f422faaeb1
rebase patches for 1.4.0 Signed-off-by: Markus Frank <m.frank@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dominik Csapak <d.csapak@proxmox.com>
|
|
Date: Mon, 20 Dec 2021 09:34:36 +0100
|
|
Subject: [PATCH] make error hideable
|
|
|
|
by clicking on it
|
|
|
|
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
|
|
---
|
|
app/error-handler.js | 18 ++++++++++++++++--
|
|
1 file changed, 16 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/app/error-handler.js b/app/error-handler.js
|
|
index 67b6372..b842909 100644
|
|
--- a/app/error-handler.js
|
|
+++ b/app/error-handler.js
|
|
@@ -6,6 +6,19 @@
|
|
* See README.md for usage and integration instructions.
|
|
*/
|
|
|
|
+function hideError() {
|
|
+ const msg = document.getElementById('noVNC_fallback_errormsg');
|
|
+
|
|
+ // close it
|
|
+ document.getElementById('noVNC_fallback_error')
|
|
+ .classList.remove("noVNC_open");
|
|
+
|
|
+ // remove all children
|
|
+ while (msg.firstChild) {
|
|
+ msg.removeChild(msg.firstChild);
|
|
+ }
|
|
+}
|
|
+
|
|
// Fallback for all uncought errors
|
|
function handleError(event, err) {
|
|
try {
|
|
@@ -48,8 +61,9 @@ function handleError(event, err) {
|
|
msg.appendChild(div);
|
|
}
|
|
|
|
- document.getElementById('noVNC_fallback_error')
|
|
- .classList.add("noVNC_open");
|
|
+ const node = document.getElementById('noVNC_fallback_error');
|
|
+ node.classList.add("noVNC_open");
|
|
+ node.onclick = hideError;
|
|
|
|
} catch (exc) {
|
|
document.write("noVNC encountered an error.");
|