-
Notifications
You must be signed in to change notification settings - Fork 58
/
index.html
52 lines (44 loc) · 1.26 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<!-- this project is not maintained -->
<head>
<title>Webterm</title>
<script src="js/jquery-min.js"></script>
<script src="js/underscore-min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="js/des.js"></script>
<script src="js/base64.js"></script>
<script src="js/uievents.js"></script>
<script src="js/RFB.js"></script>
<script src="js/RFBCanvas.js"></script>
<script src="js/VNCClient.js"></script>
<script src="JSTCP/jstcp.js"></script>
</head>
<script>
$(document).ready(function() {
var host = "localhost";
var port = 5900;
var canvas = document.getElementById("vnc-canvas");
var vnc = new VNCClient(canvas);
vnc.connect(host, port);
var parseKeyAndSend = function(evt) {
var data = parseKeyEvent(evt);
vnc.send(data);
return false;
};
var parseMouseAndSend = function(evt) {
var data = parseMouseEvent(evt);
vnc.send(data);
return false;
};
$(document).keydown (parseKeyAndSend);
$(document).keyup (parseKeyAndSend);
// $(document).keypress(parseKeyAndSend);
// $(document).click(parseMouseAndSend);
});
</script>
<body>
<div id="vnc-container">
<canvas id="vnc-canvas">Unable to render VNC Client</canvas>
</div>
</body>
</html>