Skip to content

Commit

Permalink
Patch noVNC-1.2.0/vnc_lite.html
Browse files Browse the repository at this point in the history
Add novnc-vnc_lite.html.patch to make future noVNC upgrades easier
  • Loading branch information
manics committed Apr 23, 2021
1 parent 1205813 commit bc2265a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<head>

<!--
Modified from novnc_lite.html example in noVNC 1.2.0
noVNC example: lightweight example using minimal UI and features
This is a self-contained file which doesn't import WebUtil or external CSS.
Expand Down Expand Up @@ -144,7 +146,8 @@
const host = readQueryVariable('host', window.location.hostname);
let port = readQueryVariable('port', window.location.port);
const password = readQueryVariable('password');
const path = readQueryVariable('path', 'websockify');
// MODIFICATION FROM vnc_lite.html
const path = readQueryVariable('path', window.location.pathname.replace(/[^/]*$/, '').substring(1) + 'websockify');

// | | | | | |
// | | | Connect | | |
Expand Down Expand Up @@ -177,7 +180,8 @@

// Set parameters that can be changed on an active connection
rfb.viewOnly = readQueryVariable('view_only', false);
rfb.scaleViewport = readQueryVariable('scale', false);
// MODIFICATION FROM vnc_lite.html
rfb.scaleViewport = readQueryVariable('scale', true);
</script>
</head>

Expand Down
33 changes: 33 additions & 0 deletions jupyter_desktop/share/web/novnc-vnc_lite.html.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html b/jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html
index d17ab9e..a9e3e9b 100644
--- a/jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html
+++ b/jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html
@@ -3,6 +3,8 @@
<head>

<!--
+ Modified from novnc_lite.html example in noVNC 1.2.0
+
noVNC example: lightweight example using minimal UI and features

This is a self-contained file which doesn't import WebUtil or external CSS.
@@ -144,7 +146,8 @@
const host = readQueryVariable('host', window.location.hostname);
let port = readQueryVariable('port', window.location.port);
const password = readQueryVariable('password');
- const path = readQueryVariable('path', 'websockify');
+ // MODIFICATION FROM vnc_lite.html
+ const path = readQueryVariable('path', window.location.pathname.replace(/[^/]*$/, '').substring(1) + 'websockify');

// | | | | | |
// | | | Connect | | |
@@ -177,7 +180,8 @@

// Set parameters that can be changed on an active connection
rfb.viewOnly = readQueryVariable('view_only', false);
- rfb.scaleViewport = readQueryVariable('scale', false);
+ // MODIFICATION FROM vnc_lite.html
+ rfb.scaleViewport = readQueryVariable('scale', true);
</script>
</head>

0 comments on commit bc2265a

Please sign in to comment.