X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empires%2Fgame.js;h=746cdfdc943d37d55c6d0f6fb6ce3f8315407a42;hp=896db8fe598498aac9f735db3731ede7646b461f;hb=20c213c065cd264b12f2b7e042e0b2fe7443b656;hpb=77bec9f573e029d7e9ca7e566460569e15061aca diff --git a/empires/game.js b/empires/game.js index 896db8f..746cdfd 100644 --- a/empires/game.js +++ b/empires/game.js @@ -17,7 +17,6 @@ function register(form) { request.open("POST", "register"); request.setRequestHeader("Content-Type", "application/json; charset=UTF-8"); var data = { - "name": form.name.value, "character": form.character.value }; request.send(JSON.stringify(data)); @@ -57,7 +56,7 @@ function post_reset() { request.send(); } -const events = new EventSource("events"); +const events = new EventSource(window.location + "events"); events.onerror = function(event) { if (event.target.readyState === EventSource.CLOSED) {