Browse Source

Accidentaly removed websocket ref

master
Joshua Moerman 12 years ago
parent
commit
65ad4d20b0
  1. 3
      index.html
  2. 2
      websocket.js

3
index.html

@ -62,6 +62,7 @@
<script type="text/javascript" src="rendering.js"></script> <script type="text/javascript" src="rendering.js"></script>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
var myName; var myName;
var websocket;
var ballscreen; var ballscreen;
var svgscreen; var svgscreen;
var current_svgline; var current_svgline;
@ -84,7 +85,7 @@
if ("WebSocket" in window){ if ("WebSocket" in window){
init_drawing(ballscreen, drawStart, drawMove, drawEnd, drawRemove); init_drawing(ballscreen, drawStart, drawMove, drawEnd, drawRemove);
init_websocket(statusbar, onOpen, onMessage); websocket = init_websocket(statusbar, onOpen, onMessage);
} else { } else {
statusbar.innerHTML = 'No websockets :(. This means that you either use <em>Internet Explorer</em> or <em>Android</em>. In both cases, I suggest that you use <a href="http://www.google.com/chrome/">Chrome</a> or <a href="http://www.getfirefox.net/">Firefox</a>!'; statusbar.innerHTML = 'No websockets :(. This means that you either use <em>Internet Explorer</em> or <em>Android</em>. In both cases, I suggest that you use <a href="http://www.google.com/chrome/">Chrome</a> or <a href="http://www.getfirefox.net/">Firefox</a>!';
} }

2
websocket.js

@ -12,4 +12,6 @@ function init_websocket(statusbar, open, message){
websocket.onmessage = function (evt) { websocket.onmessage = function (evt) {
message(evt); message(evt);
}; };
return websocket;
} }