forked from photofroggy/wsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dAmn_example.html
34 lines (32 loc) · 1.09 KB
/
dAmn_example.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
<html>
<head>
<title>Chat Example</title>
<style type="text/css">
.main {
width: 100%;
height: 100%;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="./dist/wsc.min.css" />
<script type="text/javascript" src="./dist/wsc.js"></script>
<script type="text/javascript">
$(function() {
client = $('.main').wsc( 'init', {
"server": 'ws://address',
"username": 'username',
"pk": 'token',
"autojoin": '#Channel'
});
// Enable support for dAmn.
client.add_extension(wsc.dAmn.Extension);
// Start connecting to the WebSocket proxy.
client.connect();
});
</script>
</head>
<body>
<div class="main">
</div>
</body>
</html>