|
@@ -67,6 +67,7 @@ var FastChat = {
|
|
|
}, 10000);
|
|
}, 10000);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
if (typeof initSuccess == 'function') {
|
|
if (typeof initSuccess == 'function') {
|
|
|
initSuccess();
|
|
initSuccess();
|
|
|
}
|
|
}
|
|
@@ -76,12 +77,11 @@ var FastChat = {
|
|
|
FastChat.new_message_prompt('#chat_button');
|
|
FastChat.new_message_prompt('#chat_button');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
FastChat.eventReg();
|
|
FastChat.eventReg();
|
|
|
},
|
|
},
|
|
|
ConnectSocket: function () {
|
|
ConnectSocket: function () {
|
|
|
-
|
|
|
|
|
if ("WebSocket" in window) {
|
|
if ("WebSocket" in window) {
|
|
|
var ws = new WebSocket(FastChat.ws.url);
|
|
var ws = new WebSocket(FastChat.ws.url);
|
|
|
FastChat.ws.SocketTask = ws;
|
|
FastChat.ws.SocketTask = ws;
|
|
@@ -723,7 +723,7 @@ var FastChat = {
|
|
|
},
|
|
},
|
|
|
getCookie: function (cname) {
|
|
getCookie: function (cname) {
|
|
|
var name = FastChat.cookie_prefix + cname + "=";
|
|
var name = FastChat.cookie_prefix + cname + "=";
|
|
|
- var decodedCookie = document.cookie
|
|
|
|
|
|
|
+ var decodedCookie = document.cookie;
|
|
|
var ca = decodedCookie.split(';');
|
|
var ca = decodedCookie.split(';');
|
|
|
for (var i = 0; i < ca.length; i++) {
|
|
for (var i = 0; i < ca.length; i++) {
|
|
|
var c = ca[i];
|
|
var c = ca[i];
|
|
@@ -751,7 +751,7 @@ var FastChat = {
|
|
|
if (FastChat.ws.SocketTask && FastChat.ws.SocketTask.readyState == 1) {
|
|
if (FastChat.ws.SocketTask && FastChat.ws.SocketTask.readyState == 1) {
|
|
|
FastChat.ws.SocketTask.send(JSON.stringify(message));
|
|
FastChat.ws.SocketTask.send(JSON.stringify(message));
|
|
|
} else {
|
|
} else {
|
|
|
- console.log('消息发送出错', message)
|
|
|
|
|
|
|
+ console.log('消息发送出错', message);
|
|
|
FastChat.ws.ErrorMsg.push(message);
|
|
FastChat.ws.ErrorMsg.push(message);
|
|
|
}
|
|
}
|
|
|
|
|
|