]> git.proxmox.com Git - mirror_novnc.git/blobdiff - vnc.html
JSLint. RFB obj to rfb.js; vnc.js the 'loader'.
[mirror_novnc.git] / vnc.html
index bc984167007bc07941f2e236ea801407f6c915e8..9a4596a5484dcfe83634cc02259aeea12176761e 100644 (file)
--- a/vnc.html
+++ b/vnc.html
@@ -1,43 +1,27 @@
+<!-- 
+noVNC example: simple example using default controls
+-->
 <html>
-
-    <head><title>VNC Client</title></head>
-
-    <body onload="draw();">
-
-        VNC Window:<br>
-        <canvas id="vnc" width="800" height="600">
-            Canvas not supported.
-        </canvas>
-
-        <br>
-        Debug:<br>
-        <textarea id="debug" style="font-size: 9;" cols=80 rows=25></textarea>
+    <head>
+        <title>VNC Client</title>
+        <link rel="stylesheet" href="include/plain.css">
+        <link rel="alternate stylesheet" href="include/black.css" TITLE="Black">
+        <!--
+        <script type='text/javascript' 
+            src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
+        -->
+        <script src="include/vnc.js"></script>
+        <script src="include/default_controls.js"></script>
+    </head>
+
+    <body>
+        <div id='vnc'>Loading</div>
     </body>
 
-    <script src="include/mootools.js"></script>
-    <script src="include/mootools-more.js"></script>
-    <script src="include/base64a.js"></script>
-    <script src="include/des3.js"></script>
-    <script src="canvas.js"></script>
-    <script src="vnc.js"></script>
-
     <script>
-        function connect() {
-            debug(">> connect");
-            var uri = new URI(window.location);
-            var host = uri.getData("host");
-            var port = uri.getData("port");
-            if ((!host) || (!port)) {
-                debug("must set host and port");
-                return;
-            }
-            RFB.init_ws(host, port);
-            debug("<< connect");
-        }
-
-        window.onload = function() {
-            connect();
+        window.onload = function () {
+            DefaultControls.load('vnc');
+            RFB.load();
         }
     </script>
-
 </html>