diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index 74d834f9..2e5c86d2 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -740,3 +740,15 @@ Callbacks = { closePoll(); } } + +$.getScript(IO_URL+"/socket.io/socket.io.js", function() { + try { + socket = io.connect(IO_URL); + for(var key in Callbacks) { + socket.on(key, Callbacks[key]); + } + } + catch(e) { + Callbacks.disconnect(); + } +}); diff --git a/www/assets/js/iourl.js b/www/assets/js/iourl.js index a837738b..19f76b90 100644 --- a/www/assets/js/iourl.js +++ b/www/assets/js/iourl.js @@ -11,15 +11,3 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI var IO_URL = "http://localhost:1337"; var WEB_URL = "http://localhost:8080"; - -$.getScript(IO_URL+"/socket.io/socket.io.js", function() { - try { - socket = io.connect(IO_URL); - for(var key in Callbacks) { - socket.on(key, Callbacks[key]); - } - } - catch(e) { - Callbacks.disconnect(); - } -});