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 @@
...
@@ -11,7 +11,7 @@
<head>
<head>
<title>
noVNC
</title>
<title>
noVNC
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"chrome=1"
>
<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'
<script type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
...
@@ -19,18 +19,18 @@
...
@@ -19,18 +19,18 @@
<script
src=
"include/vnc.js"
></script>
<script
src=
"include/vnc.js"
></script>
</head>
</head>
<body
style=
"margin: 0px;"
onKeyDown=
"onKeyDown(event);"
>
<body
style=
"margin: 0px;"
>
<div
id=
"VNC_screen"
>
<div
id=
"
no
VNC_screen"
>
<div
id=
"
VNC_status_bar"
class=
"
VNC_status_bar"
style=
"margin-top: 0px;"
>
<div
id=
"
noVNC_status_bar"
class=
"no
VNC_status_bar"
style=
"margin-top: 0px;"
>
<table
border=
0
width=
"100%"
><tr>
<table
border=
0
width=
"100%"
><tr>
<td><div
id=
"VNC_status"
>
Loading
</div></td>
<td><div
id=
"
no
VNC_status"
>
Loading
</div></td>
<td
width=
"1%"
><div
id=
"VNC_buttons"
>
<td
width=
"1%"
><div
id=
"
no
VNC_buttons"
>
<input
type=
button
value=
"Send CtrlAltDel"
<input
type=
button
value=
"Send CtrlAltDel"
id=
"sendCtrlAltDelButton"
>
id=
"sendCtrlAltDelButton"
>
</div></td>
</div></td>
</tr></table>
</tr></table>
</div>
</div>
<canvas
id=
"VNC_canvas"
width=
"640px"
height=
"20px"
>
<canvas
id=
"
no
VNC_canvas"
width=
"640px"
height=
"20px"
>
Canvas not supported.
Canvas not supported.
</canvas>
</canvas>
</div>
</div>
...
@@ -47,10 +47,10 @@
...
@@ -47,10 +47,10 @@
msg
=
'<form onsubmit="return setPassword();"'
;
msg
=
'<form onsubmit="return setPassword();"'
;
msg
+=
' style="margin-bottom: 0px">'
;
msg
+=
' style="margin-bottom: 0px">'
;
msg
+=
'Password Required: '
;
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>'
;
msg
+=
'<
\
/form>'
;
$D
(
'
VNC_status_bar'
).
setAttribute
(
"class"
,
"
VNC_status_warn"
);
$D
(
'
noVNC_status_bar'
).
setAttribute
(
"class"
,
"no
VNC_status_warn"
);
$D
(
'VNC_status'
).
innerHTML
=
msg
;
$D
(
'
no
VNC_status'
).
innerHTML
=
msg
;
}
}
function
setPassword
()
{
function
setPassword
()
{
rfb
.
sendPassword
(
$D
(
'password_input'
).
value
);
rfb
.
sendPassword
(
$D
(
'password_input'
).
value
);
...
@@ -62,8 +62,8 @@
...
@@ -62,8 +62,8 @@
}
}
function
updateState
(
rfb
,
state
,
oldstate
,
msg
)
{
function
updateState
(
rfb
,
state
,
oldstate
,
msg
)
{
var
s
,
sb
,
cad
,
level
;
var
s
,
sb
,
cad
,
level
;
s
=
$D
(
'VNC_status'
);
s
=
$D
(
'
no
VNC_status'
);
sb
=
$D
(
'VNC_status_bar'
);
sb
=
$D
(
'
no
VNC_status_bar'
);
cad
=
$D
(
'sendCtrlAltDelButton'
);
cad
=
$D
(
'sendCtrlAltDelButton'
);
switch
(
state
)
{
switch
(
state
)
{
case
'failed'
:
level
=
"error"
;
break
;
case
'failed'
:
level
=
"error"
;
break
;
...
@@ -78,34 +78,36 @@
...
@@ -78,34 +78,36 @@
else
{
cad
.
disabled
=
true
;
}
else
{
cad
.
disabled
=
true
;
}
if
(
typeof
(
msg
)
!==
'undefined'
)
{
if
(
typeof
(
msg
)
!==
'undefined'
)
{
sb
.
setAttribute
(
"class"
,
"VNC_status_"
+
level
);
sb
.
setAttribute
(
"class"
,
"
no
VNC_status_"
+
level
);
s
.
innerHTML
=
msg
;
s
.
innerHTML
=
msg
;
}
}
}
}
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
var
host
,
port
,
password
;
var
host
,
port
,
password
,
path
;
$D
(
'sendCtrlAltDelButton'
).
style
.
display
=
"inline"
;
$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
);
host
=
WebUtil
.
getQueryVar
(
'host'
,
null
);
port
=
WebUtil
.
getQueryVar
(
'port'
,
null
);
port
=
WebUtil
.
getQueryVar
(
'port'
,
null
);
password
=
WebUtil
.
getQueryVar
(
'password'
,
''
);
password
=
WebUtil
.
getQueryVar
(
'password'
,
''
);
path
=
WebUtil
.
getQueryVar
(
'path'
,
''
);
if
((
!
host
)
||
(
!
port
))
{
if
((
!
host
)
||
(
!
port
))
{
updateState
(
'failed'
,
updateState
(
'failed'
,
"Must specify host and port in URL"
);
"Must specify host and port in URL"
);
return
;
return
;
}
}
rfb
=
new
RFB
({
'target'
:
$D
(
'VNC_canvas'
),
rfb
=
new
RFB
({
'target'
:
$D
(
'
no
VNC_canvas'
),
'encrypt'
:
WebUtil
.
getQueryVar
(
'encrypt'
,
false
),
'encrypt'
:
WebUtil
.
getQueryVar
(
'encrypt'
,
false
),
'true_color'
:
WebUtil
.
getQueryVar
(
'true_color'
,
true
),
'true_color'
:
WebUtil
.
getQueryVar
(
'true_color'
,
true
),
'local_cursor'
:
WebUtil
.
getQueryVar
(
'cursor'
,
true
),
'local_cursor'
:
WebUtil
.
getQueryVar
(
'cursor'
,
true
),
'shared'
:
WebUtil
.
getQueryVar
(
'shared'
,
true
),
'shared'
:
WebUtil
.
getQueryVar
(
'shared'
,
true
),
'updateState'
:
updateState
,
'updateState'
:
updateState
,
'onPasswordRequired'
:
passwordRequired
});
'onPasswordRequired'
:
passwordRequired
});
rfb
.
connect
(
host
,
port
,
password
);
rfb
.
connect
(
host
,
port
,
password
,
path
);
};
};
</script>
</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