|
@@ -11,6 +11,8 @@
|
|
|
|
|
|
Connect parameters are provided in query string:
|
|
Connect parameters are provided in query string:
|
|
http://example.com/?host=HOST&port=PORT&encrypt=1&true_color=1
|
|
http://example.com/?host=HOST&port=PORT&encrypt=1&true_color=1
|
|
|
|
+ or the fragment:
|
|
|
|
+ http://example.com/#host=HOST&port=PORT&encrypt=1&true_color=1
|
|
-->
|
|
-->
|
|
<title>noVNC</title>
|
|
<title>noVNC</title>
|
|
|
|
|
|
@@ -84,7 +86,7 @@
|
|
|
|
|
|
|
|
|
|
function UIresize() {
|
|
function UIresize() {
|
|
- if (WebUtil.getQueryVar('resize', false)) {
|
|
|
|
|
|
+ if (WebUtil.getConfigVar('resize', false)) {
|
|
var innerW = window.innerWidth;
|
|
var innerW = window.innerWidth;
|
|
var innerH = window.innerHeight;
|
|
var innerH = window.innerHeight;
|
|
var controlbarH = $D('noVNC_status_bar').offsetHeight;
|
|
var controlbarH = $D('noVNC_status_bar').offsetHeight;
|
|
@@ -183,11 +185,11 @@
|
|
$D('xvpRebootButton').onclick = xvpReboot;
|
|
$D('xvpRebootButton').onclick = xvpReboot;
|
|
$D('xvpResetButton').onclick = xvpReset;
|
|
$D('xvpResetButton').onclick = xvpReset;
|
|
|
|
|
|
- WebUtil.init_logging(WebUtil.getQueryVar('logging', 'warn'));
|
|
|
|
- document.title = unescape(WebUtil.getQueryVar('title', 'noVNC'));
|
|
|
|
|
|
+ WebUtil.init_logging(WebUtil.getConfigVar('logging', 'warn'));
|
|
|
|
+ document.title = unescape(WebUtil.getConfigVar('title', 'noVNC'));
|
|
// By default, use the host and port of server that served this file
|
|
// By default, use the host and port of server that served this file
|
|
- host = WebUtil.getQueryVar('host', window.location.hostname);
|
|
|
|
- port = WebUtil.getQueryVar('port', window.location.port);
|
|
|
|
|
|
+ host = WebUtil.getConfigVar('host', window.location.hostname);
|
|
|
|
+ port = WebUtil.getConfigVar('port', window.location.port);
|
|
|
|
|
|
// if port == 80 (or 443) then it won't be present and should be
|
|
// if port == 80 (or 443) then it won't be present and should be
|
|
// set manually
|
|
// set manually
|
|
@@ -202,13 +204,13 @@
|
|
|
|
|
|
// If a token variable is passed in, set the parameter in a cookie.
|
|
// If a token variable is passed in, set the parameter in a cookie.
|
|
// This is used by nova-novncproxy.
|
|
// This is used by nova-novncproxy.
|
|
- token = WebUtil.getQueryVar('token', null);
|
|
|
|
|
|
+ token = WebUtil.getConfigVar('token', null);
|
|
if (token) {
|
|
if (token) {
|
|
WebUtil.createCookie('token', token, 1)
|
|
WebUtil.createCookie('token', token, 1)
|
|
}
|
|
}
|
|
|
|
|
|
- password = WebUtil.getQueryVar('password', '');
|
|
|
|
- path = WebUtil.getQueryVar('path', 'websockify');
|
|
|
|
|
|
+ password = WebUtil.getConfigVar('password', '');
|
|
|
|
+ path = WebUtil.getConfigVar('path', 'websockify');
|
|
|
|
|
|
if ((!host) || (!port)) {
|
|
if ((!host) || (!port)) {
|
|
updateState(null, 'fatal', null, 'Must specify host and port in URL');
|
|
updateState(null, 'fatal', null, 'Must specify host and port in URL');
|
|
@@ -217,13 +219,13 @@
|
|
|
|
|
|
try {
|
|
try {
|
|
rfb = new RFB({'target': $D('noVNC_canvas'),
|
|
rfb = new RFB({'target': $D('noVNC_canvas'),
|
|
- 'encrypt': WebUtil.getQueryVar('encrypt',
|
|
|
|
|
|
+ 'encrypt': WebUtil.getConfigVar('encrypt',
|
|
(window.location.protocol === "https:")),
|
|
(window.location.protocol === "https:")),
|
|
- 'repeaterID': WebUtil.getQueryVar('repeaterID', ''),
|
|
|
|
- 'true_color': WebUtil.getQueryVar('true_color', true),
|
|
|
|
- 'local_cursor': WebUtil.getQueryVar('cursor', true),
|
|
|
|
- 'shared': WebUtil.getQueryVar('shared', true),
|
|
|
|
- 'view_only': WebUtil.getQueryVar('view_only', false),
|
|
|
|
|
|
+ 'repeaterID': WebUtil.getConfigVar('repeaterID', ''),
|
|
|
|
+ 'true_color': WebUtil.getConfigVar('true_color', true),
|
|
|
|
+ 'local_cursor': WebUtil.getConfigVar('cursor', true),
|
|
|
|
+ 'shared': WebUtil.getConfigVar('shared', true),
|
|
|
|
+ 'view_only': WebUtil.getConfigVar('view_only', false),
|
|
'onUpdateState': updateState,
|
|
'onUpdateState': updateState,
|
|
'onXvpInit': xvpInit,
|
|
'onXvpInit': xvpInit,
|
|
'onPasswordRequired': passwordRequired,
|
|
'onPasswordRequired': passwordRequired,
|