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
a7f55899
Commit
a7f55899
authored
Sep 27, 2011
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vnc_auto.html: sync with mobile changes.
Also, add path option settable with query string.
parent
6209639f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
vnc_auto.html
vnc_auto.html
+18
-16
No files found.
vnc_auto.html
View file @
a7f55899
...
...
@@ -11,7 +11,7 @@
<head>
<title>
noVNC
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"chrome=1"
>
<link
rel=
"stylesheet"
href=
"include/
plain
.css"
title=
"plain"
>
<link
rel=
"stylesheet"
href=
"include/
base
.css"
title=
"plain"
>
<!--
<script type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
...
...
@@ -19,18 +19,18 @@
<script
src=
"include/vnc.js"
></script>
</head>
<body
style=
"margin: 0px;"
onKeyDown=
"onKeyDown(event);"
>
<div
id=
"VNC_screen"
>
<div
id=
"
VNC_status_bar"
class=
"
VNC_status_bar"
style=
"margin-top: 0px;"
>
<body
style=
"margin: 0px;"
>
<div
id=
"
no
VNC_screen"
>
<div
id=
"
noVNC_status_bar"
class=
"no
VNC_status_bar"
style=
"margin-top: 0px;"
>
<table
border=
0
width=
"100%"
><tr>
<td><div
id=
"VNC_status"
>
Loading
</div></td>
<td
width=
"1%"
><div
id=
"VNC_buttons"
>
<td><div
id=
"
no
VNC_status"
>
Loading
</div></td>
<td
width=
"1%"
><div
id=
"
no
VNC_buttons"
>
<input
type=
button
value=
"Send CtrlAltDel"
id=
"sendCtrlAltDelButton"
>
</div></td>
</tr></table>
</div>
<canvas
id=
"VNC_canvas"
width=
"640px"
height=
"20px"
>
<canvas
id=
"
no
VNC_canvas"
width=
"640px"
height=
"20px"
>
Canvas not supported.
</canvas>
</div>
...
...
@@ -47,10 +47,10 @@
msg
=
'<form onsubmit="return setPassword();"'
;
msg
+=
' style="margin-bottom: 0px">'
;
msg
+=
'Password Required: '
;
msg
+=
'<input type=password size=10 id="password_input" class="VNC_status">'
;
msg
+=
'<input type=password size=10 id="password_input" class="
no
VNC_status">'
;
msg
+=
'<
\
/form>'
;
$D
(
'
VNC_status_bar'
).
setAttribute
(
"class"
,
"
VNC_status_warn"
);
$D
(
'VNC_status'
).
innerHTML
=
msg
;
$D
(
'
noVNC_status_bar'
).
setAttribute
(
"class"
,
"no
VNC_status_warn"
);
$D
(
'
no
VNC_status'
).
innerHTML
=
msg
;
}
function
setPassword
()
{
rfb
.
sendPassword
(
$D
(
'password_input'
).
value
);
...
...
@@ -62,8 +62,8 @@
}
function
updateState
(
rfb
,
state
,
oldstate
,
msg
)
{
var
s
,
sb
,
cad
,
level
;
s
=
$D
(
'VNC_status'
);
sb
=
$D
(
'VNC_status_bar'
);
s
=
$D
(
'
no
VNC_status'
);
sb
=
$D
(
'
no
VNC_status_bar'
);
cad
=
$D
(
'sendCtrlAltDelButton'
);
switch
(
state
)
{
case
'failed'
:
level
=
"error"
;
break
;
...
...
@@ -78,34 +78,36 @@
else
{
cad
.
disabled
=
true
;
}
if
(
typeof
(
msg
)
!==
'undefined'
)
{
sb
.
setAttribute
(
"class"
,
"VNC_status_"
+
level
);
sb
.
setAttribute
(
"class"
,
"
no
VNC_status_"
+
level
);
s
.
innerHTML
=
msg
;
}
}
window
.
onload
=
function
()
{
var
host
,
port
,
password
;
var
host
,
port
,
password
,
path
;
$D
(
'sendCtrlAltDelButton'
).
style
.
display
=
"inline"
;
$D
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
document
.
title
=
unescape
(
WebUtil
.
getQueryVar
(
'title'
,
'noVNC'
));
host
=
WebUtil
.
getQueryVar
(
'host'
,
null
);
port
=
WebUtil
.
getQueryVar
(
'port'
,
null
);
password
=
WebUtil
.
getQueryVar
(
'password'
,
''
);
path
=
WebUtil
.
getQueryVar
(
'path'
,
''
);
if
((
!
host
)
||
(
!
port
))
{
updateState
(
'failed'
,
"Must specify host and port in URL"
);
return
;
}
rfb
=
new
RFB
({
'target'
:
$D
(
'VNC_canvas'
),
rfb
=
new
RFB
({
'target'
:
$D
(
'
no
VNC_canvas'
),
'encrypt'
:
WebUtil
.
getQueryVar
(
'encrypt'
,
false
),
'true_color'
:
WebUtil
.
getQueryVar
(
'true_color'
,
true
),
'local_cursor'
:
WebUtil
.
getQueryVar
(
'cursor'
,
true
),
'shared'
:
WebUtil
.
getQueryVar
(
'shared'
,
true
),
'updateState'
:
updateState
,
'onPasswordRequired'
:
passwordRequired
});
rfb
.
connect
(
host
,
port
,
password
);
rfb
.
connect
(
host
,
port
,
password
,
path
);
};
</script>
...
...
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