Commit e81f3fe030a1d2fcb0ff85efbf1d9aca47e9964b
1 parent
77c858e89f
Exists in
master
and in
1 other branch
hardcode ws listening to cse 110
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
ws_debug.html
View file @
e81f3fe
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | |
10 | 10 | </ul> |
11 | 11 | </body> |
12 | +<script src="//code.jquery.com/jquery-2.1.4.min.js"></script> | |
12 | 13 | <script> |
13 | 14 | var loc = window.location, new_uri; |
14 | 15 | if (loc.protocol === "https:") { |
15 | 16 | |
... | ... | @@ -17,13 +18,13 @@ |
17 | 18 | new_uri = "ws:"; |
18 | 19 | } |
19 | 20 | new_uri += "//" + loc.host; |
20 | - new_uri += "/ws/"; | |
21 | + new_uri += "/ws/feed/496?subscribe-broadcast"; | |
21 | 22 | var ws = new WebSocket(new_uri); |
22 | 23 | ws.onopen = function () { |
23 | 24 | console.log("websocket connected"); |
24 | 25 | }; |
25 | 26 | ws.onmessage = function (e) { |
26 | - $('ul').append('<li>' + e + '</li>'); | |
27 | + $('ul').append('<li>' + e.data + '</li>'); | |
27 | 28 | }; |
28 | 29 | ws.onerror = function (e) { |
29 | 30 | console.error(e); |