Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
bd96e919
Commit
bd96e919
authored
Apr 03, 2012
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use page host:port as default for WebSocket host/port.
parent
0139b256
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
ui.js
include/ui.js
+2
-2
vnc_auto.html
vnc_auto.html
+3
-6
No files found.
include/ui.js
View file @
bd96e919
...
@@ -45,8 +45,8 @@ load: function() {
...
@@ -45,8 +45,8 @@ load: function() {
WebUtil
.
selectStylesheet
(
UI
.
getSetting
(
'stylesheet'
));
WebUtil
.
selectStylesheet
(
UI
.
getSetting
(
'stylesheet'
));
/* Populate the controls if defaults are provided in the URL */
/* Populate the controls if defaults are provided in the URL */
UI
.
initSetting
(
'host'
,
''
);
UI
.
initSetting
(
'host'
,
window
.
location
.
hostname
);
UI
.
initSetting
(
'port'
,
''
);
UI
.
initSetting
(
'port'
,
window
.
location
.
port
);
UI
.
initSetting
(
'password'
,
''
);
UI
.
initSetting
(
'password'
,
''
);
UI
.
initSetting
(
'encrypt'
,
(
window
.
location
.
protocol
===
"https:"
));
UI
.
initSetting
(
'encrypt'
,
(
window
.
location
.
protocol
===
"https:"
));
UI
.
initSetting
(
'true_color'
,
true
);
UI
.
initSetting
(
'true_color'
,
true
);
...
...
vnc_auto.html
View file @
bd96e919
...
@@ -90,17 +90,14 @@
...
@@ -90,17 +90,14 @@
$D
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
$D
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
document
.
title
=
unescape
(
WebUtil
.
getQueryVar
(
'title'
,
'noVNC'
));
document
.
title
=
unescape
(
WebUtil
.
getQueryVar
(
'title'
,
'noVNC'
));
host
=
WebUtil
.
getQueryVar
(
'host'
,
null
);
// By default, use the host and port of server that served this file
port
=
WebUtil
.
getQueryVar
(
'port'
,
null
);
host
=
WebUtil
.
getQueryVar
(
'host'
,
window
.
location
.
hostname
);
port
=
WebUtil
.
getQueryVar
(
'port'
,
window
.
location
.
port
);
// 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
.
getQueryVar
(
'token'
,
null
);
if
(
token
)
{
if
(
token
)
{
// If token is set, we are using nova-novncproxy.
// Use host and port of server that served this file.
host
=
window
.
location
.
hostname
;
port
=
window
.
location
.
port
;
WebUtil
.
createCookie
(
'token'
,
token
,
1
)
WebUtil
.
createCookie
(
'token'
,
token
,
1
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment