Brendan Abolivier 9 gadus atpakaļ
vecāks
revīzija
99397f16cd
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      web/js/multi.js

+ 2
- 2
web/js/multi.js Parādīt failu

@@ -17,10 +17,10 @@ var againstLoser = false;
17 17
 function init() {
18 18
 
19 19
     var hostname = $('script')[$('script').length-3]['src'].match(/http:\/\/(.+)\:/)[1];
20
-    var hostname = $('script')[$('script').length-3]['src'].match(/http:\/\/(.+)\:(.+)\//)[1];
20
+    var port = $('script')[$('script').length-3]['src'].match(/http:\/\/(.+)\:(.+)\//)[2];
21 21
 
22 22
     // Connexion à socket.io
23
-    socket = io.connect('http://'+hostname+':8000');
23
+    socket = io.connect('http://'+hostname+':'+port);
24 24
 
25 25
     // Gestion des evenements
26 26
     setEventHandlers();