Browse Source

fixed but with matching https:// and wss://

Stephen McQuay 3 years ago
parent
commit
ea5a1f902a
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      ui/js/arena.js

+ 6
- 1
ui/js/arena.js View File

@@ -63,7 +63,12 @@ function loadCode() {
63 63
 }
64 64
 
65 65
 function wsurl() {
66
-    return "ws://" + window.location.host + "/ws/";
66
+    var url = "ws://";
67
+    if(window.location.protocol == "https:") {
68
+        url = "wss://";
69
+    }
70
+    url = url + window.location.host + "/ws/";
71
+    return url; 
67 72
 }
68 73
 
69 74
 function getGameID() {

Loading…
Cancel
Save