aboutsummaryrefslogtreecommitdiffstats
path: root/res/client.js
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-02-24 15:07:37 +0300
committerRblSb <msrblsb@gmail.com>2020-02-24 15:07:37 +0300
commit2d2fe59eca303e2fe0ea36f831482bf10d8bb058 (patch)
tree9d11b7db916c9bf1aeef48b3fac0fec68f58acea /res/client.js
parent5ff624a196b3603983052b2139eefe788413e2f1 (diff)
Wow, same port for ws
Diffstat (limited to 'res/client.js')
-rw-r--r--res/client.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/res/client.js b/res/client.js
index 4c3a8a5..9f46639 100644
--- a/res/client.js
+++ b/res/client.js
@@ -459,9 +459,6 @@ client_Buttons.initChatInput = function(main) {
};
};
var client_Main = function(host,port) {
- if(port == null) {
- port = 4201;
- }
this.matchNumbers = new EReg("^-?[0-9]+$","");
this.onTimeGet = new haxe_Timer(2000);
this.isConnected = false;
@@ -479,6 +476,12 @@ var client_Main = function(host,port) {
host = "localhost";
}
this.host = host;
+ if(port == null) {
+ port = window.location.port;
+ }
+ if(port == "") {
+ port = "80";
+ }
this.initListeners();
this.onTimeGet.run = function() {
if(_gthis.player.isListEmpty()) {
@@ -641,7 +644,7 @@ client_Main.prototype = {
var data = JSON.parse(e.data);
var t = data.type;
var t1 = t.charAt(0).toLowerCase() + HxOverrides.substr(t,1,null);
- haxe_Log.trace("Event: " + data.type,{ fileName : "src/client/Main.hx", lineNumber : 193, className : "client.Main", methodName : "onMessage", customParams : [data[t1]]});
+ haxe_Log.trace("Event: " + data.type,{ fileName : "src/client/Main.hx", lineNumber : 195, className : "client.Main", methodName : "onMessage", customParams : [data[t1]]});
switch(data.type) {
case "AddVideo":
if(this.player.isListEmpty()) {
@@ -834,6 +837,7 @@ client_Main.prototype = {
,hideGuestLoginPanel: function() {
window.document.querySelector("#guestlogin").style.display = "none";
window.document.querySelector("#chatline").style.display = "block";
+ window.dispatchEvent(new Event("resize"));
}
,updateClients: function(newClients) {
this.clients.length = 0;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage