]> git.proxmox.com Git - novnc-pve.git/blobdiff - debian/patches/0017-make-error-hideable.patch
upgrade novnc and patches to 1.4.0
[novnc-pve.git] / debian / patches / 0017-make-error-hideable.patch
index df0c484ae32113326e24e18f558b806c9067db27..f45c56831eb37db38951cda22ae1958542d269eb 100644 (file)
@@ -7,41 +7,42 @@ by clicking on it
 
 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 ---
- app/error-handler.js | 1+++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
+ 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 f956c22..20233b2 100644
+index 67b6372..b842909 100644
 --- a/app/error-handler.js
 +++ b/app/error-handler.js
-@@ -15,6 +15,18 @@
+@@ -6,6 +6,19 @@
+  * See README.md for usage and integration instructions.
+  */
  
- (function _scope() {
-     "use strict";
-+    function hideError() {
-+      const msg = document.getElementById('noVNC_fallback_errormsg');
++function hideError() {
++    const msg = document.getElementById('noVNC_fallback_errormsg');
 +
-+      // close it
-+      document.getElementById('noVNC_fallback_error')
-+          .classList.remove("noVNC_open");
++    // close it
++    document.getElementById('noVNC_fallback_error')
++      .classList.remove("noVNC_open");
 +
-+      // remove all children
-+      while (msg.firstChild) {
-+          msg.removeChild(msg.firstChild);
-+      }
++    // 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);
+         }
  
-     // Fallback for all uncought errors
-     function handleError(event, err) {
-@@ -58,8 +70,9 @@
-                 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;
  
--            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.");
-         }
+     } catch (exc) {
+         document.write("noVNC encountered an error.");