-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.html
31 lines (31 loc) · 1 KB
/
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
<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.min.js"></script>
<script type="text/javascript">
$(function() {
$('.main').wsc( 'init', {
"domain": 'website.com',
"server": 'ws://address',
"username": 'username',
"pk": 'token',
"autojoin": '#Channel'
});
// Start connecting to the WebSocket proxy.
$('.main').wsc( 'connect' );
});
</script>
</head>
<body>
<div class="main">
</div>
</body>
</html>