Selaa lähdekoodia

allow adding custom message handlers easily.

without disrupting normal operation. now, setting the name would make
this funnier, as would having a separate bot. and possibly a tiny editor
that allows eval in the usual page, stores the scripts, ...

um, yeah.
Lucas Stadler 11 vuotta sitten
vanhempi
commit
0228882781
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      js/babl/public/index.html

+ 2 - 2
js/babl/public/index.html

@ -42,10 +42,10 @@
42 42
				}
43 43
			}
44 44
45
			ws.onmessage = function(ev) {
45
			ws.addEventListener('message', function(ev) {
46 46
				var msg = JSON.parse(ev.data);
47 47
				handleMessage(msg);
48
			}
48
			});
49 49
50 50
			function sendMessage(msg) {
51 51
				var msg = {