This commit is contained in:
iFish 2014-08-19 16:07:39 +08:00
parent ea4cda397c
commit c24a3d0e4a
3 changed files with 31 additions and 3 deletions

View File

@ -167,6 +167,8 @@ $(function () {
e.stopPropagation && e.stopPropagation();
});
document.body.dataset["targetExtensionId"] = chrome.runtime.id;
document.body.dataset["targetExtensionVersion"] = chrome.runtime.getManifest().version;
document.body.dataset["mobileSupportInitialized"] = 1;
document.dispatchEvent(new CustomEvent("mobileSupportInitialized"));
});

View File

@ -1218,7 +1218,7 @@ window.cbl = function (u, h) {
return;
}
lastMessages.push(msg);
lastMessages.length > 10 && lastMessages.splice(0, 1);
lastMessages.length > 20 && lastMessages.splice(0, 1);
}
ports.forEach(function (p) {
@ -1228,12 +1228,16 @@ window.cbl = function (u, h) {
if (msg && msg.action === "chatRoomConnected") {
if (lastMessages.length) {
lastMessages.forEach(function (m) {
port.postMessage(maxConnectionsPerServer);
ports.forEach(function (p) {
p.postMessage(m);
});
});
}
if (msgQueue.length) {
msgQueue.forEach(function (m) {
port.postMessage(m);
ports.forEach(function (p) {
p.postMessage(m);
});
});
msgQueue = [];
}
@ -1317,6 +1321,9 @@ window.cbl = function (u, h) {
if (msg.action === "chatRoomSendMsg") {
msg.action = "chatRoomReceiveMsg";
}
if (msg.action === "chatUpdateOnline") {
currentRoom.onlinecount = msg.detail.count;
}
postMessageToPort(msg);
};
socket.onerror = function () {

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Web12306
{
public class TrainSuggestion
{
}
public class RequestInfo
{
}
}