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
5a00c9d1
Commit
5a00c9d1
authored
Sep 29, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@github.com:kanaka/noVNC
parents
12d2e7c1
8d5d2c82
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
175 additions
and
121 deletions
+175
-121
default_controls.js
include/default_controls.js
+12
-12
util.js
include/util.js
+3
-100
vnc.js
include/vnc.js
+1
-0
webutil.js
include/webutil.js
+144
-0
base64.html
tests/base64.html
+1
-0
canvas.html
tests/canvas.html
+1
-0
cursor.html
tests/cursor.html
+1
-0
input.html
tests/input.html
+1
-0
vnc_playback.html
tests/vnc_playback.html
+3
-3
ws.html
tests/ws.html
+1
-0
wsencoding.html
tests/wsencoding.html
+1
-0
vnc_auto.html
vnc_auto.html
+6
-6
No files found.
include/default_controls.js
View file @
5a00c9d1
...
@@ -56,8 +56,8 @@ load: function(target) {
...
@@ -56,8 +56,8 @@ load: function(target) {
// Stylesheet selection dropdown
// Stylesheet selection dropdown
html
+=
' <li><select id="VNC_stylesheet" name="vncStyle">'
;
html
+=
' <li><select id="VNC_stylesheet" name="vncStyle">'
;
html
+=
' <option value="default">default</option>'
;
html
+=
' <option value="default">default</option>'
;
sheet
=
Util
.
selectStylesheet
();
sheet
=
Web
Util
.
selectStylesheet
();
sheets
=
Util
.
getStylesheets
();
sheets
=
Web
Util
.
getStylesheets
();
for
(
i
=
0
;
i
<
sheets
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
sheets
.
length
;
i
+=
1
)
{
html
+=
'<option value="'
+
sheets
[
i
].
title
+
'">'
+
sheets
[
i
].
title
+
'</option>'
;
html
+=
'<option value="'
+
sheets
[
i
].
title
+
'">'
+
sheets
[
i
].
title
+
'</option>'
;
}
}
...
@@ -102,11 +102,11 @@ load: function(target) {
...
@@ -102,11 +102,11 @@ load: function(target) {
// Settings with immediate effects
// Settings with immediate effects
DC
.
initSetting
(
'logging'
,
'warn'
);
DC
.
initSetting
(
'logging'
,
'warn'
);
Util
.
init_logging
(
DC
.
getSetting
(
'logging'
));
Web
Util
.
init_logging
(
DC
.
getSetting
(
'logging'
));
DC
.
initSetting
(
'stylesheet'
,
'default'
);
DC
.
initSetting
(
'stylesheet'
,
'default'
);
Util
.
selectStylesheet
(
null
);
// call twice to get around webkit bug
Web
Util
.
selectStylesheet
(
null
);
// call twice to get around webkit bug
Util
.
selectStylesheet
(
DC
.
getSetting
(
'stylesheet'
));
Web
Util
.
selectStylesheet
(
DC
.
getSetting
(
'stylesheet'
));
/* Populate the controls if defaults are provided in the URL */
/* Populate the controls if defaults are provided in the URL */
DC
.
initSetting
(
'host'
,
''
);
DC
.
initSetting
(
'host'
,
''
);
...
@@ -134,7 +134,7 @@ load: function(target) {
...
@@ -134,7 +134,7 @@ load: function(target) {
// Read form control compatible setting from cookie
// Read form control compatible setting from cookie
getSetting
:
function
(
name
)
{
getSetting
:
function
(
name
)
{
var
val
,
ctrl
=
$
(
'VNC_'
+
name
);
var
val
,
ctrl
=
$
(
'VNC_'
+
name
);
val
=
Util
.
readCookie
(
name
);
val
=
Web
Util
.
readCookie
(
name
);
if
(
ctrl
.
type
===
'checkbox'
)
{
if
(
ctrl
.
type
===
'checkbox'
)
{
if
(
val
.
toLowerCase
()
in
{
'0'
:
1
,
'no'
:
1
,
'false'
:
1
})
{
if
(
val
.
toLowerCase
()
in
{
'0'
:
1
,
'no'
:
1
,
'false'
:
1
})
{
val
=
false
;
val
=
false
;
...
@@ -151,7 +151,7 @@ updateSetting: function(name, value) {
...
@@ -151,7 +151,7 @@ updateSetting: function(name, value) {
var
i
,
ctrl
=
$
(
'VNC_'
+
name
);
var
i
,
ctrl
=
$
(
'VNC_'
+
name
);
// Save the cookie for this session
// Save the cookie for this session
if
(
typeof
value
!==
'undefined'
)
{
if
(
typeof
value
!==
'undefined'
)
{
Util
.
createCookie
(
name
,
value
);
Web
Util
.
createCookie
(
name
,
value
);
}
}
// Update the settings control
// Update the settings control
...
@@ -180,7 +180,7 @@ saveSetting: function(name) {
...
@@ -180,7 +180,7 @@ saveSetting: function(name) {
}
else
{
}
else
{
val
=
ctrl
.
value
;
val
=
ctrl
.
value
;
}
}
Util
.
createCookie
(
name
,
val
);
Web
Util
.
createCookie
(
name
,
val
);
//Util.Debug("Setting saved '" + name + "=" + val + "'");
//Util.Debug("Setting saved '" + name + "=" + val + "'");
return
val
;
return
val
;
},
},
...
@@ -190,9 +190,9 @@ initSetting: function(name, defVal) {
...
@@ -190,9 +190,9 @@ initSetting: function(name, defVal) {
var
val
;
var
val
;
// Check Query string followed by cookie
// Check Query string followed by cookie
val
=
Util
.
getQueryVar
(
name
);
val
=
Web
Util
.
getQueryVar
(
name
);
if
(
val
===
null
)
{
if
(
val
===
null
)
{
val
=
Util
.
readCookie
(
name
,
defVal
);
val
=
Web
Util
.
readCookie
(
name
,
defVal
);
}
}
DefaultControls
.
updateSetting
(
name
,
val
);
DefaultControls
.
updateSetting
(
name
,
val
);
//Util.Debug("Setting '" + name + "' initialized to '" + val + "'");
//Util.Debug("Setting '" + name + "' initialized to '" + val + "'");
...
@@ -267,8 +267,8 @@ settingsApply: function() {
...
@@ -267,8 +267,8 @@ settingsApply: function() {
DC
.
saveSetting
(
'logging'
);
DC
.
saveSetting
(
'logging'
);
// Settings with immediate (non-connected related) effect
// Settings with immediate (non-connected related) effect
Util
.
selectStylesheet
(
DC
.
getSetting
(
'stylesheet'
));
Web
Util
.
selectStylesheet
(
DC
.
getSetting
(
'stylesheet'
));
Util
.
init_logging
(
DC
.
getSetting
(
'logging'
));
Web
Util
.
init_logging
(
DC
.
getSetting
(
'logging'
));
//Util.Debug("<< settingsApply");
//Util.Debug("<< settingsApply");
},
},
...
...
include/util.js
View file @
5a00c9d1
...
@@ -62,9 +62,6 @@ Array.prototype.push32 = function (num) {
...
@@ -62,9 +62,6 @@ Array.prototype.push32 = function (num) {
Util
.
_log_level
=
'warn'
;
Util
.
_log_level
=
'warn'
;
Util
.
init_logging
=
function
(
level
)
{
Util
.
init_logging
=
function
(
level
)
{
if
(
typeof
level
===
'undefined'
)
{
if
(
typeof
level
===
'undefined'
)
{
Util
.
_log_level
=
(
document
.
location
.
href
.
match
(
/logging=
([
A-Za-z0-9
\.
_
\-]
*
)
/
)
||
[
''
,
Util
.
_log_level
])[
1
];
level
=
Util
.
_log_level
;
level
=
Util
.
_log_level
;
}
else
{
}
else
{
Util
.
_log_level
=
level
;
Util
.
_log_level
=
level
;
...
@@ -96,39 +93,11 @@ Util.init_logging = function (level) {
...
@@ -96,39 +93,11 @@ Util.init_logging = function (level) {
}
}
};
};
Util
.
get_logging
=
function
()
{
Util
.
get_logging
=
function
()
{
return
Util
.
_log_level
;
return
Util
.
_log_level
;
}
}
// Initialize logging level
// Initialize logging level
Util
.
init_logging
();
Util
.
init_logging
();
Util
.
dirObj
=
function
(
obj
,
depth
,
parent
)
{
var
i
,
msg
=
""
,
val
=
""
;
if
(
!
depth
)
{
depth
=
2
;
}
if
(
!
parent
)
{
parent
=
""
;
}
// Print the properties of the passed-in object
for
(
i
in
obj
)
{
if
((
depth
>
1
)
&&
(
typeof
obj
[
i
]
===
"object"
))
{
// Recurse attributes that are objects
msg
+=
Util
.
dirObj
(
obj
[
i
],
depth
-
1
,
parent
+
"."
+
i
);
}
else
{
//val = new String(obj[i]).replace("\n", " ");
val
=
obj
[
i
].
toString
().
replace
(
"
\n
"
,
" "
);
if
(
val
.
length
>
30
)
{
val
=
val
.
substr
(
0
,
30
)
+
"..."
;
}
msg
+=
parent
+
"."
+
i
+
": "
+
val
+
"
\n
"
;
}
}
return
msg
;
};
// Read a query string variable
Util
.
getQueryVar
=
function
(
name
,
defVal
)
{
var
re
=
new
RegExp
(
'[?][^#]*'
+
name
+
'=([^&#]*)'
);
if
(
typeof
defVal
===
'undefined'
)
{
defVal
=
null
;
}
return
(
document
.
location
.
href
.
match
(
re
)
||
[
''
,
defVal
])[
1
];
};
// Set defaults for Crockford style function namespaces
// Set defaults for Crockford style function namespaces
Util
.
conf_default
=
function
(
cfg
,
api
,
v
,
type
,
defval
,
desc
)
{
Util
.
conf_default
=
function
(
cfg
,
api
,
v
,
type
,
defval
,
desc
)
{
...
@@ -269,70 +238,4 @@ Util.Flash = (function(){
...
@@ -269,70 +238,4 @@ Util.Flash = (function(){
}
}
version
=
v
.
match
(
/
\d
+/g
);
version
=
v
.
match
(
/
\d
+/g
);
return
{
version
:
parseInt
(
version
[
0
]
||
0
+
'.'
+
version
[
1
],
10
)
||
0
,
build
:
parseInt
(
version
[
2
],
10
)
||
0
};
return
{
version
:
parseInt
(
version
[
0
]
||
0
+
'.'
+
version
[
1
],
10
)
||
0
,
build
:
parseInt
(
version
[
2
],
10
)
||
0
};
}());
}());
\ No newline at end of file
/*
* Cookie handling. Dervied from: http://www.quirksmode.org/js/cookies.html
*/
// No days means only for this browser session
Util
.
createCookie
=
function
(
name
,
value
,
days
)
{
var
date
,
expires
;
if
(
days
)
{
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
(
days
*
24
*
60
*
60
*
1000
));
expires
=
"; expires="
+
date
.
toGMTString
();
}
else
{
expires
=
""
;
}
document
.
cookie
=
name
+
"="
+
value
+
expires
+
"; path=/"
;
};
Util
.
readCookie
=
function
(
name
,
defaultValue
)
{
var
i
,
c
,
nameEQ
=
name
+
"="
,
ca
=
document
.
cookie
.
split
(
';'
);
for
(
i
=
0
;
i
<
ca
.
length
;
i
+=
1
)
{
c
=
ca
[
i
];
while
(
c
.
charAt
(
0
)
===
' '
)
{
c
=
c
.
substring
(
1
,
c
.
length
);
}
if
(
c
.
indexOf
(
nameEQ
)
===
0
)
{
return
c
.
substring
(
nameEQ
.
length
,
c
.
length
);
}
}
return
(
typeof
defaultValue
!==
'undefined'
)
?
defaultValue
:
null
;
};
Util
.
eraseCookie
=
function
(
name
)
{
Util
.
createCookie
(
name
,
""
,
-
1
);
};
/*
* Alternate stylesheet selection
*/
Util
.
getStylesheets
=
function
()
{
var
i
,
links
,
sheets
=
[];
links
=
document
.
getElementsByTagName
(
"link"
);
for
(
i
=
0
;
i
<
links
.
length
;
i
+=
1
)
{
if
(
links
[
i
].
title
&&
links
[
i
].
rel
.
toUpperCase
().
indexOf
(
"STYLESHEET"
)
>
-
1
)
{
sheets
.
push
(
links
[
i
]);
}
}
return
sheets
;
};
// No sheet means try and use value from cookie, null sheet used to
// clear all alternates.
Util
.
selectStylesheet
=
function
(
sheet
)
{
var
i
,
link
,
sheets
=
Util
.
getStylesheets
();
if
(
typeof
sheet
===
'undefined'
)
{
sheet
=
'default'
;
}
for
(
i
=
0
;
i
<
sheets
.
length
;
i
+=
1
)
{
link
=
sheets
[
i
];
if
(
link
.
title
===
sheet
)
{
Util
.
Debug
(
"Using stylesheet "
+
sheet
);
link
.
disabled
=
false
;
}
else
{
//Util.Debug("Skipping stylesheet " + link.title);
link
.
disabled
=
true
;
}
}
return
sheet
;
};
include/vnc.js
View file @
5a00c9d1
...
@@ -31,6 +31,7 @@ function get_VNC_uri_prefix() {
...
@@ -31,6 +31,7 @@ function get_VNC_uri_prefix() {
// "firebug-lite-compressed.js'><\/script>";
// "firebug-lite-compressed.js'><\/script>";
extra
+=
start
+
"util.js"
+
end
;
extra
+=
start
+
"util.js"
+
end
;
extra
+=
start
+
"webutil.js"
+
end
;
extra
+=
start
+
"base64.js"
+
end
;
extra
+=
start
+
"base64.js"
+
end
;
extra
+=
start
+
"des.js"
+
end
;
extra
+=
start
+
"des.js"
+
end
;
extra
+=
start
+
"canvas.js"
+
end
;
extra
+=
start
+
"canvas.js"
+
end
;
...
...
include/webutil.js
0 → 100644
View file @
5a00c9d1
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2010 Joel Martin
* Licensed under LGPL-3 (see LICENSE.txt)
*
* See README.md for usage and integration instructions.
*/
"use strict"
;
/*jslint bitwise: false, white: false */
/*global window, console, document, navigator, ActiveXObject*/
// Globals defined here
var
WebUtil
=
{},
$
;
/*
* Simple DOM selector by ID
*/
if
(
!
window
.
$
)
{
$
=
function
(
id
)
{
if
(
document
.
getElementById
)
{
return
document
.
getElementById
(
id
);
}
else
if
(
document
.
all
)
{
return
document
.
all
[
id
];
}
else
if
(
document
.
layers
)
{
return
document
.
layers
[
id
];
}
return
undefined
;
};
}
/*
* ------------------------------------------------------
* Namespaced in WebUtil
* ------------------------------------------------------
*/
// init log level reading the logging HTTP param
WebUtil
.
init_logging
=
function
()
{
Util
.
_log_level
=
(
document
.
location
.
href
.
match
(
/logging=
([
A-Za-z0-9
\.
_
\-]
*
)
/
)
||
[
''
,
Util
.
_log_level
])[
1
];
Util
.
init_logging
()
}
WebUtil
.
init_logging
();
WebUtil
.
dirObj
=
function
(
obj
,
depth
,
parent
)
{
var
i
,
msg
=
""
,
val
=
""
;
if
(
!
depth
)
{
depth
=
2
;
}
if
(
!
parent
)
{
parent
=
""
;
}
// Print the properties of the passed-in object
for
(
i
in
obj
)
{
if
((
depth
>
1
)
&&
(
typeof
obj
[
i
]
===
"object"
))
{
// Recurse attributes that are objects
msg
+=
WebUtil
.
dirObj
(
obj
[
i
],
depth
-
1
,
parent
+
"."
+
i
);
}
else
{
//val = new String(obj[i]).replace("\n", " ");
val
=
obj
[
i
].
toString
().
replace
(
"
\n
"
,
" "
);
if
(
val
.
length
>
30
)
{
val
=
val
.
substr
(
0
,
30
)
+
"..."
;
}
msg
+=
parent
+
"."
+
i
+
": "
+
val
+
"
\n
"
;
}
}
return
msg
;
};
// Read a query string variable
WebUtil
.
getQueryVar
=
function
(
name
,
defVal
)
{
var
re
=
new
RegExp
(
'[?][^#]*'
+
name
+
'=([^&#]*)'
);
if
(
typeof
defVal
===
'undefined'
)
{
defVal
=
null
;
}
return
(
document
.
location
.
href
.
match
(
re
)
||
[
''
,
defVal
])[
1
];
};
/*
* Cookie handling. Dervied from: http://www.quirksmode.org/js/cookies.html
*/
// No days means only for this browser session
WebUtil
.
createCookie
=
function
(
name
,
value
,
days
)
{
var
date
,
expires
;
if
(
days
)
{
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
(
days
*
24
*
60
*
60
*
1000
));
expires
=
"; expires="
+
date
.
toGMTString
();
}
else
{
expires
=
""
;
}
document
.
cookie
=
name
+
"="
+
value
+
expires
+
"; path=/"
;
};
WebUtil
.
readCookie
=
function
(
name
,
defaultValue
)
{
var
i
,
c
,
nameEQ
=
name
+
"="
,
ca
=
document
.
cookie
.
split
(
';'
);
for
(
i
=
0
;
i
<
ca
.
length
;
i
+=
1
)
{
c
=
ca
[
i
];
while
(
c
.
charAt
(
0
)
===
' '
)
{
c
=
c
.
substring
(
1
,
c
.
length
);
}
if
(
c
.
indexOf
(
nameEQ
)
===
0
)
{
return
c
.
substring
(
nameEQ
.
length
,
c
.
length
);
}
}
return
(
typeof
defaultValue
!==
'undefined'
)
?
defaultValue
:
null
;
};
WebUtil
.
eraseCookie
=
function
(
name
)
{
WebUtil
.
createCookie
(
name
,
""
,
-
1
);
};
/*
* Alternate stylesheet selection
*/
WebUtil
.
getStylesheets
=
function
()
{
var
i
,
links
,
sheets
=
[];
links
=
document
.
getElementsByTagName
(
"link"
);
for
(
i
=
0
;
i
<
links
.
length
;
i
+=
1
)
{
if
(
links
[
i
].
title
&&
links
[
i
].
rel
.
toUpperCase
().
indexOf
(
"STYLESHEET"
)
>
-
1
)
{
sheets
.
push
(
links
[
i
]);
}
}
return
sheets
;
};
// No sheet means try and use value from cookie, null sheet used to
// clear all alternates.
WebUtil
.
selectStylesheet
=
function
(
sheet
)
{
var
i
,
link
,
sheets
=
WebUtil
.
getStylesheets
();
if
(
typeof
sheet
===
'undefined'
)
{
sheet
=
'default'
;
}
for
(
i
=
0
;
i
<
sheets
.
length
;
i
+=
1
)
{
link
=
sheets
[
i
];
if
(
link
.
title
===
sheet
)
{
Util
.
Debug
(
"Using stylesheet "
+
sheet
);
link
.
disabled
=
false
;
}
else
{
//Util.Debug("Skipping stylesheet " + link.title);
link
.
disabled
=
true
;
}
}
return
sheet
;
};
tests/base64.html
View file @
5a00c9d1
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<head>
<head>
<title>
Native Base64 Tests
</title>
<title>
Native Base64 Tests
</title>
<script
src=
"include/util.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/webutil.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/base64.js"
></script>
</head>
</head>
<body>
<body>
...
...
tests/canvas.html
View file @
5a00c9d1
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
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>
-->
-->
<script
src=
"include/util.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/webutil.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/canvas.js"
></script>
<script
src=
"include/canvas.js"
></script>
<script
src=
"face.png.js"
></script>
<script
src=
"face.png.js"
></script>
...
...
tests/cursor.html
View file @
5a00c9d1
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
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>
-->
-->
<script
src=
"include/util.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/webutil.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/canvas.js"
></script>
<script
src=
"include/canvas.js"
></script>
</head>
</head>
...
...
tests/input.html
View file @
5a00c9d1
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
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>
-->
-->
<script
src=
"include/util.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/webutil.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/canvas.js"
></script>
<script
src=
"include/canvas.js"
></script>
<script>
<script>
...
...
tests/vnc_playback.html
View file @
5a00c9d1
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
cell
.
scrollTop
=
cell
.
scrollHeight
;
cell
.
scrollTop
=
cell
.
scrollHeight
;
}
}
fname
=
Util
.
getQueryVar
(
'data'
,
null
);
fname
=
Web
Util
.
getQueryVar
(
'data'
,
null
);
if
(
fname
)
{
if
(
fname
)
{
message
(
"Loading "
+
fname
);
message
(
"Loading "
+
fname
);
...
@@ -109,9 +109,9 @@
...
@@ -109,9 +109,9 @@
}
}
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
iterations
=
Util
.
getQueryVar
(
'iterations'
,
3
);
iterations
=
Web
Util
.
getQueryVar
(
'iterations'
,
3
);
$
(
'iterations'
).
value
=
iterations
;
$
(
'iterations'
).
value
=
iterations
;
mode
=
Util
.
getQueryVar
(
'mode'
,
3
);
mode
=
Web
Util
.
getQueryVar
(
'mode'
,
3
);
if
(
mode
===
'realtime'
)
{
if
(
mode
===
'realtime'
)
{
$
(
'mode2'
).
checked
=
true
;
$
(
'mode2'
).
checked
=
true
;
}
else
{
}
else
{
...
...
tests/ws.html
View file @
5a00c9d1
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<title>
WebSockets Test
</title>
<title>
WebSockets Test
</title>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/webutil.js"
></script>
<!-- Uncomment to activate firebug lite -->
<!-- Uncomment to activate firebug lite -->
<!--
<!--
<script type='text/javascript'
<script type='text/javascript'
...
...
tests/wsencoding.html
View file @
5a00c9d1
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
<script
src=
"include/base64.js"
></script>
<script
src=
"include/base64.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/util.js"
></script>
<script
src=
"include/webutil.js"
></script>
<script>
<script>
...
...
vnc_auto.html
View file @
5a00c9d1
...
@@ -91,18 +91,18 @@
...
@@ -91,18 +91,18 @@
$
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
$
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
host
=
Util
.
getQueryVar
(
'host'
,
null
);
host
=
Web
Util
.
getQueryVar
(
'host'
,
null
);
port
=
Util
.
getQueryVar
(
'port'
,
null
);
port
=
Web
Util
.
getQueryVar
(
'port'
,
null
);
password
=
Util
.
getQueryVar
(
'password'
,
''
);
password
=
Web
Util
.
getQueryVar
(
'password'
,
''
);
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
({
'encrypt'
:
Util
.
getQueryVar
(
'encrypt'
,
false
),
rfb
=
new
RFB
({
'encrypt'
:
Web
Util
.
getQueryVar
(
'encrypt'
,
false
),
'true_color'
:
Util
.
getQueryVar
(
'true_color'
,
true
),
'true_color'
:
Web
Util
.
getQueryVar
(
'true_color'
,
true
),
'local_cursor'
:
Util
.
getQueryVar
(
'cursor'
,
true
),
'local_cursor'
:
Web
Util
.
getQueryVar
(
'cursor'
,
true
),
'updateState'
:
updateState
});
'updateState'
:
updateState
});
rfb
.
connect
(
host
,
port
,
password
);
rfb
.
connect
(
host
,
port
,
password
);
};
};
...
...
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