Commit 96a6eaad authored by Joel Martin's avatar Joel Martin

Move vnc.js into include directory.

Also, allow 'include/' to be overridden in VNC_uri_prefix.
parent 2152a88f
...@@ -91,7 +91,7 @@ scripts and call their load() functions. For example: ...@@ -91,7 +91,7 @@ scripts and call their load() functions. For example:
<body> <body>
<div id='vnc'>Loading</div> <div id='vnc'>Loading</div>
</body> </body>
<script src='vnc.js'></script> <script src='include/vnc.js'></script>
<script src="include/default_controls.js"></script> <script src="include/default_controls.js"></script>
<script> <script>
window.onload = function () { window.onload = function () {
......
...@@ -18,7 +18,9 @@ var VNC_native_ws, RFB; ...@@ -18,7 +18,9 @@ var VNC_native_ws, RFB;
(function () { (function () {
var extra, start, end; var extra, start, end;
if (typeof VNC_uri_prefix === "undefined") { VNC_uri_prefix=""; } if (typeof VNC_uri_prefix === "undefined") {
VNC_uri_prefix="include/";
}
extra = ""; extra = "";
start = "<script src='" + VNC_uri_prefix; start = "<script src='" + VNC_uri_prefix;
end = "'><\/script>"; end = "'><\/script>";
...@@ -27,20 +29,20 @@ var VNC_native_ws, RFB; ...@@ -27,20 +29,20 @@ var VNC_native_ws, RFB;
//extra += start + "http://getfirebug.com/releases/lite/1.2/" + //extra += start + "http://getfirebug.com/releases/lite/1.2/" +
// "firebug-lite-compressed.js" + end; // "firebug-lite-compressed.js" + end;
extra += start + "include/mootools.js" + end; extra += start + "mootools.js" + end;
extra += start + "include/base64.js" + end; extra += start + "base64.js" + end;
extra += start + "include/des.js" + end; extra += start + "des.js" + end;
extra += start + "include/util.js" + end; extra += start + "util.js" + end;
extra += start + "include/canvas.js" + end; extra += start + "canvas.js" + end;
/* If no builtin websockets then load web_socket.js */ /* If no builtin websockets then load web_socket.js */
if (window.WebSocket) { if (window.WebSocket) {
VNC_native_ws = true; VNC_native_ws = true;
} else { } else {
VNC_native_ws = false; VNC_native_ws = false;
extra += start + "include/web-socket-js/swfobject.js" + end; extra += start + "web-socket-js/swfobject.js" + end;
extra += start + "include/web-socket-js/FABridge.js" + end; extra += start + "web-socket-js/FABridge.js" + end;
extra += start + "include/web-socket-js/web_socket.js" + end; extra += start + "web-socket-js/web_socket.js" + end;
} }
document.write(extra); document.write(extra);
}()); }());
...@@ -117,7 +119,7 @@ load: function () { ...@@ -117,7 +119,7 @@ load: function () {
"'file://' URL is incompatible with Adobe Flash"); "'file://' URL is incompatible with Adobe Flash");
} else { } else {
WebSocket.__swfLocation = VNC_uri_prefix + WebSocket.__swfLocation = VNC_uri_prefix +
"include/web-socket-js/WebSocketMain.swf"; "web-socket-js/WebSocketMain.swf";
WebSocket.__initialize(); WebSocket.__initialize();
RFB.use_seq = true; RFB.use_seq = true;
RFB.updateState('disconnected', 'Disconnected'); RFB.updateState('disconnected', 'Disconnected');
......
...@@ -11,7 +11,7 @@ noVNC example: simple example using default controls ...@@ -11,7 +11,7 @@ noVNC example: simple example using default controls
<div id='vnc'>Loading</div> <div id='vnc'>Loading</div>
</body> </body>
<script src="vnc.js"></script> <script src="include/vnc.js"></script>
<script src="include/default_controls.js"></script> <script src="include/default_controls.js"></script>
<script> <script>
window.onload = function () { window.onload = function () {
......
...@@ -19,7 +19,7 @@ Connect parameters are provided in query string: ...@@ -19,7 +19,7 @@ Connect parameters are provided in query string:
</div> </div>
</body> </body>
<script src="vnc.js"></script> <script src="include/vnc.js"></script>
<script> <script>
function setPassword() { function setPassword() {
RFB.setPassword($('password_input').value); RFB.setPassword($('password_input').value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment