Skip to content

Commit 805a166

Browse files
committed
Patch noVNC-1.2.0/vnc_lite.html
Add novnc-vnc_lite.html.patch to make future noVNC upgrades easier
1 parent b4c6eb4 commit 805a166

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<head>
44

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

149152
// | | | | | |
150153
// | | | Connect | | |
@@ -177,7 +180,8 @@
177180

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

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
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
2+
index d17ab9e..a9e3e9b 100644
3+
--- a/jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html
4+
+++ b/jupyter_desktop/share/web/noVNC-1.2.0/vnc_lite.html
5+
@@ -3,6 +3,8 @@
6+
<head>
7+
8+
<!--
9+
+ Modified from novnc_lite.html example in noVNC 1.2.0
10+
+
11+
noVNC example: lightweight example using minimal UI and features
12+
13+
This is a self-contained file which doesn't import WebUtil or external CSS.
14+
@@ -144,7 +146,8 @@
15+
const host = readQueryVariable('host', window.location.hostname);
16+
let port = readQueryVariable('port', window.location.port);
17+
const password = readQueryVariable('password');
18+
- const path = readQueryVariable('path', 'websockify');
19+
+ // MODIFICATION FROM vnc_lite.html
20+
+ const path = readQueryVariable('path', window.location.pathname.replace(/[^/]*$/, '').substring(1) + 'websockify');
21+
22+
// | | | | | |
23+
// | | | Connect | | |
24+
@@ -177,7 +180,8 @@
25+
26+
// Set parameters that can be changed on an active connection
27+
rfb.viewOnly = readQueryVariable('view_only', false);
28+
- rfb.scaleViewport = readQueryVariable('scale', false);
29+
+ // MODIFICATION FROM vnc_lite.html
30+
+ rfb.scaleViewport = readQueryVariable('scale', true);
31+
</script>
32+
</head>
33+

0 commit comments

Comments
 (0)