同步提交代码
This commit is contained in:
parent
6c2d153f46
commit
94852177f4
@ -201,5 +201,8 @@ $(function () {
|
|||||||
document.body.dataset["targetExtensionId"] = chrome.runtime.id;
|
document.body.dataset["targetExtensionId"] = chrome.runtime.id;
|
||||||
document.body.dataset["targetExtensionVersion"] = chrome.runtime.getManifest().version;
|
document.body.dataset["targetExtensionVersion"] = chrome.runtime.getManifest().version;
|
||||||
document.body.dataset["mobileSupportInitialized"] = 1;
|
document.body.dataset["mobileSupportInitialized"] = 1;
|
||||||
document.dispatchEvent(new CustomEvent("mobileSupportInitialized"));
|
chrome.runtime.sendMessage({ action: "getBv" }, function (m) {
|
||||||
|
document.body.dataset["browserVersion"] = m.bv;
|
||||||
|
document.dispatchEvent(new CustomEvent("mobileSupportInitialized"));
|
||||||
|
});
|
||||||
});
|
});
|
@ -1,6 +1,7 @@
|
|||||||
var MANIFEST = chrome.runtime.getManifest();
|
var MANIFEST = chrome.runtime.getManifest();
|
||||||
var INFOBAR = chrome.infobars || (chrome.experimental && chrome.experimental.infobars);
|
var INFOBAR = chrome.infobars || (chrome.experimental && chrome.experimental.infobars);
|
||||||
var isDebug = (compressFunc + '').indexOf("false") != -1;
|
var isDebug = (compressFunc + '').indexOf("false") != -1;
|
||||||
|
var bv = window.external.LiebaoGetVersion && window.external.LiebaoGetVersion() || /Chrome\/([\d\.]+)/i.exec(navigator.userAgent)[1];
|
||||||
var entry12306 = false;
|
var entry12306 = false;
|
||||||
|
|
||||||
var log = (function () {
|
var log = (function () {
|
||||||
@ -1076,7 +1077,7 @@ window.cbl = function (u, h) {
|
|||||||
trackback(m.detail.type, m.detail.values);
|
trackback(m.detail.type, m.detail.values);
|
||||||
});
|
});
|
||||||
|
|
||||||
trackback(99);
|
trackback(99, [MANIFEST.version, bv]);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
@ -1085,7 +1086,8 @@ window.cbl = function (u, h) {
|
|||||||
//#region 版本更新
|
//#region 版本更新
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
var updateurl = "http://www.fishlee.net/service/update2/44/44/version_v6" + (INFOBAR ? "" : "_1") + ".json?" + Math.random();
|
var cv = parseInt(/Chrome\/(\d+)/i.exec(navigator.userAgent)[1]);
|
||||||
|
var updateurl = "http://www.fishlee.net/service/update2/44/" + (cv < 34 ? "44" : "60") + "/version_v6" + (INFOBAR ? "" : "_1") + ".json?" + Math.random();
|
||||||
var lastCheckUpdate = null;
|
var lastCheckUpdate = null;
|
||||||
var hasUpdate = false, lastVersion = null, lastMessage = null, updateInfo = null;
|
var hasUpdate = false, lastVersion = null, lastMessage = null, updateInfo = null;
|
||||||
|
|
||||||
@ -1118,14 +1120,19 @@ window.cbl = function (u, h) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var msgCallback = function (m, s, r) {
|
var msgCallback = function (m, s, r) {
|
||||||
if (m && m.action === 'getUpdateInfo')
|
if (!m || !m.action)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m.action === 'getUpdateInfo')
|
||||||
r(updateInfo);
|
r(updateInfo);
|
||||||
if (m && m.action === 'getVersionInfo')
|
else if (m.action === 'getVersionInfo')
|
||||||
r({ curVersion: MANIFEST.version, updateInfo: updateInfo });
|
r({ curVersion: MANIFEST.version, updateInfo: updateInfo });
|
||||||
if (m && m.action === 'triggerUpdate') {
|
else if (m.action === 'triggerUpdate') {
|
||||||
if (!lastCheckUpdate || (new Date() - lastCheckUpdate) >= 300000) {
|
if (!lastCheckUpdate || (new Date() - lastCheckUpdate) >= 300000) {
|
||||||
checkUpdate();
|
checkUpdate();
|
||||||
}
|
}
|
||||||
|
} else if (m.action === "getBv") {
|
||||||
|
r({ bv: bv });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
chrome.runtime.onMessage.addListener(msgCallback);
|
chrome.runtime.onMessage.addListener(msgCallback);
|
||||||
@ -1308,6 +1315,13 @@ window.cbl = function (u, h) {
|
|||||||
var callbackQueue = [];
|
var callbackQueue = [];
|
||||||
var lastLoad = null;
|
var lastLoad = null;
|
||||||
|
|
||||||
|
var setRoomCount = function (id, count) {
|
||||||
|
if (!servers)
|
||||||
|
return;
|
||||||
|
var room = _.findWhere(servers, { id: id });
|
||||||
|
if (room) room.onlinecount = count;
|
||||||
|
};
|
||||||
|
|
||||||
var execCallback = function () {
|
var execCallback = function () {
|
||||||
var callback;
|
var callback;
|
||||||
while (callbackQueue.length) {
|
while (callbackQueue.length) {
|
||||||
@ -1350,7 +1364,8 @@ window.cbl = function (u, h) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
loadServers: loadServers
|
loadServers: loadServers,
|
||||||
|
setRoomCount: setRoomCount
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
@ -1403,6 +1418,7 @@ window.cbl = function (u, h) {
|
|||||||
}
|
}
|
||||||
if (msg.action === "chatUpdateOnline") {
|
if (msg.action === "chatUpdateOnline") {
|
||||||
currentRoom.onlinecount = msg.detail.count;
|
currentRoom.onlinecount = msg.detail.count;
|
||||||
|
serverMgr.setRoomCount(currentRoom.id, currentRoom.onlinecount);
|
||||||
}
|
}
|
||||||
postMessageToPort(msg);
|
postMessageToPort(msg);
|
||||||
};
|
};
|
||||||
@ -1423,11 +1439,15 @@ window.cbl = function (u, h) {
|
|||||||
socket.send(JSON.stringify(msg));
|
socket.send(JSON.stringify(msg));
|
||||||
};
|
};
|
||||||
var disconnect = function () {
|
var disconnect = function () {
|
||||||
if (!socket)
|
if (socket) {
|
||||||
return;
|
socket.close();
|
||||||
socket.close();
|
socket = null;
|
||||||
socket = null;
|
}
|
||||||
|
if (currentRoom) {
|
||||||
|
$.post("http://12306.liebao.cn/index.php?r=Api/GetRoomOnlineNum", { roomId: roomId });
|
||||||
|
}
|
||||||
currentRoom = null;
|
currentRoom = null;
|
||||||
|
|
||||||
if (heratBeatTimer) {
|
if (heratBeatTimer) {
|
||||||
clearInterval(heratBeatTimer);
|
clearInterval(heratBeatTimer);
|
||||||
heratBeatTimer = null;
|
heratBeatTimer = null;
|
||||||
@ -1490,7 +1510,7 @@ window.cbl = function (u, h) {
|
|||||||
hasChange = true;
|
hasChange = true;
|
||||||
}
|
}
|
||||||
if (hasChange) {
|
if (hasChange) {
|
||||||
alarms.forEach(function (task) {
|
_.each(alarms, function (task) {
|
||||||
var id = "ALARM-" + task.data.fromCode + "-" + task.data.toCode + new Date().getTime();
|
var id = "ALARM-" + task.data.fromCode + "-" + task.data.toCode + new Date().getTime();
|
||||||
chrome.runtime.sendMessage({ action: "track", detail: { type: 132, values: [task.type || 0, task.point || 0] } });
|
chrome.runtime.sendMessage({ action: "track", detail: { type: 132, values: [task.type || 0, task.point || 0] } });
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
var otsweb = (function () {
|
var otsweb = (function () {
|
||||||
var fun = function () {
|
var fun = function () {
|
||||||
var e = this;
|
var e = this;
|
||||||
|
var queryUrl = "http://kyfw.12306.cn/otn/leftTicket/query";
|
||||||
|
|
||||||
var getTicketInfo = function (v) {
|
var getTicketInfo = function (v) {
|
||||||
var data = {}, info = v.indexOf("#") === -1 ? v : /getSelected\(['"](.*?)['"]\)/i.exec(v)[1].split('#')[11],
|
var data = {}, info = v.indexOf("#") === -1 ? v : /getSelected\(['"](.*?)['"]\)/i.exec(v)[1].split('#')[11],
|
||||||
@ -129,8 +130,19 @@ var otsweb = (function () {
|
|||||||
"leftTicketDTO.to_station": to,
|
"leftTicketDTO.to_station": to,
|
||||||
"purpose_codes": code == "00" ? "ADULT" : code
|
"purpose_codes": code == "00" ? "ADULT" : code
|
||||||
};
|
};
|
||||||
e.ajaxGet("http://kyfw.12306.cn/otn/leftTicket/query", "http://kyfw.12306.cn/otn/leftTicket/init", data, "json", function (response) {
|
e.ajaxGet(queryUrl, "http://kyfw.12306.cn/otn/leftTicket/init", data, "json", function (response) {
|
||||||
if (!response || !response.status) {
|
if (!response) {
|
||||||
|
callback(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.c_url) {
|
||||||
|
queryUrl = "http://kyfw.12306.cn/otn/" + response.c_url;
|
||||||
|
e.queryTicketOtn.apply(e, [].slice.call(arguments));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!response.status) {
|
||||||
callback(null);
|
callback(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -51,12 +51,12 @@
|
|||||||
"browser_action": {
|
"browser_action": {
|
||||||
"default_icon": "icons/icon_32.png",
|
"default_icon": "icons/icon_32.png",
|
||||||
"default_popup": "air/popup.html",
|
"default_popup": "air/popup.html",
|
||||||
"default_title": "猎豹抢票党 (集成12306订票助手V6)"
|
"default_title": "猎豹抢票党/12306订票助手 V7"
|
||||||
},
|
},
|
||||||
"description": "12306订票助手 v6: 帮您订票的小助手 by 木鱼,全力为您的车票购买献计献策!",
|
"description": "12306订票助手 v7: 帮您订票的小助手 by 木鱼,全力为您的车票购买献计献策!",
|
||||||
"key": "7k6gnXVACvUPU2DfslJgSrWJTHqIg5uwd+Kgl/5zSg==",
|
"key": "7k6gnXVACvUPU2DfslJgSrWJTHqIg5uwd+Kgl/5zSg==",
|
||||||
"name": "12306订票助手V6/猎豹抢票党",
|
"name": "猎豹抢票党/12306订票助手 V7",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"icons": {
|
"icons": {
|
||||||
"16": "icons/icon_16.png",
|
"16": "icons/icon_16.png",
|
||||||
@ -70,7 +70,7 @@
|
|||||||
"background": {
|
"background": {
|
||||||
"page": "background.html"
|
"page": "background.html"
|
||||||
},
|
},
|
||||||
"minimum_chrome_version": "28.0",
|
"minimum_chrome_version": "28",
|
||||||
"externally_connectable": {
|
"externally_connectable": {
|
||||||
"ids": [ ],
|
"ids": [ ],
|
||||||
"matches": [
|
"matches": [
|
||||||
|
@ -36,10 +36,10 @@
|
|||||||
<i class="caret"></i>
|
<i class="caret"></i>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="http://kyfw.12306.cn/otn/" id="link_n" target="_blank">新版12306订票 ①</a></li>
|
<li><a href="http://12306.liebao.cn/" target="_blank">极速版订票</a></li>
|
||||||
<li><a href="https://kyfw.12306.cn/otn/" id="link_n" target="_blank">新版12306订票 ②</a></li>
|
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li><a href="http://app.fishlee.net/12306/" target="_blank">极速版订票</a></li>
|
<!--<li><a href="http://dynamic.12306.cn/otsweb/" id="link_o" target="_blank">旧版12306订票</a></li>-->
|
||||||
|
<li><a href="http://kyfw.12306.cn/otn/" id="link_n" target="_blank">官方12306订票</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Web12306
|
namespace Web12306
|
||||||
@ -9,6 +10,8 @@ namespace Web12306
|
|||||||
{
|
{
|
||||||
#region Implementation of IHttpHandler
|
#region Implementation of IHttpHandler
|
||||||
|
|
||||||
|
#if !DEBUG
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通过实现 <see cref="T:System.Web.IHttpHandler"/> 接口的自定义 HttpHandler 启用 HTTP Web 请求的处理。
|
/// 通过实现 <see cref="T:System.Web.IHttpHandler"/> 接口的自定义 HttpHandler 启用 HTTP Web 请求的处理。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -18,9 +21,49 @@ namespace Web12306
|
|||||||
var request = context.Request;
|
var request = context.Request;
|
||||||
var response = context.Response;
|
var response = context.Response;
|
||||||
|
|
||||||
response.Redirect("http://www.fishlee.net/service/download/383");
|
var ua = request.UserAgent;
|
||||||
|
if (string.IsNullOrEmpty(ua))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var m = Regex.Match(ua, @"Chrome/(\d+)", RegexOptions.IgnoreCase);
|
||||||
|
if (!m.Success)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var v = int.Parse(m.Groups[1].Value);
|
||||||
|
|
||||||
|
if (v < 34)
|
||||||
|
{
|
||||||
|
response.Redirect("http://www.fishlee.net/service/dcl/44");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response.Redirect("http://www.fishlee.net/service/dcl/60");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
/// <summary>
|
||||||
|
/// 通过实现 <see cref="T:System.Web.IHttpHandler"/> 接口的自定义 HttpHandler 启用 HTTP Web 请求的处理。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"><see cref="T:System.Web.HttpContext"/> 对象,它提供对用于为 HTTP 请求提供服务的内部服务器对象(如 Request、Response、Session 和 Server)的引用。</param>
|
||||||
|
public void ProcessRequest(HttpContext context)
|
||||||
|
{
|
||||||
|
var request = context.Request;
|
||||||
|
var response = context.Response;
|
||||||
|
|
||||||
|
var ua = request.UserAgent;
|
||||||
|
if (string.IsNullOrEmpty(ua))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var m = Regex.Match(ua, @"Chrome/(\d+)", RegexOptions.IgnoreCase);
|
||||||
|
if (!m.Success)
|
||||||
|
return;
|
||||||
|
|
||||||
|
response.Redirect("crx.crx");
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取一个值,该值指示其他请求是否可以使用 <see cref="T:System.Web.IHttpHandler"/> 实例。
|
/// 获取一个值,该值指示其他请求是否可以使用 <see cref="T:System.Web.IHttpHandler"/> 实例。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// 你可以指定所有值,也可以让修订版本和内部版本号采用默认值,
|
// 你可以指定所有值,也可以让修订版本和内部版本号采用默认值,
|
||||||
// 方法是按如下所示使用 "*":
|
// 方法是按如下所示使用 "*":
|
||||||
[assembly: AssemblyVersion("1.0.15002.62")]
|
[assembly: AssemblyVersion("1.0.14248.66")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
有关如何配置 ASP.NET 应用程序的详细信息,请访问
|
有关如何配置 ASP.NET 应用程序的详细信息,请访问
|
||||||
http://go.microsoft.com/fwlink/?LinkId=301880
|
http://go.microsoft.com/fwlink/?LinkId=301880
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<add key="ClientValidationEnabled" value="true" />
|
<add key="ClientValidationEnabled" value="true" />
|
||||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||||
|
|
||||||
<add key="12306_trainsuggestion_maxradio" value="0.7"/>
|
<add key="12306_trainsuggestion_maxradio" value="0.7" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<system.web>
|
<system.web>
|
||||||
<compilation debug="true" targetFramework="4.5" />
|
<compilation debug="true" targetFramework="4.5" />
|
||||||
@ -25,7 +25,11 @@
|
|||||||
|
|
||||||
<add name="ChatServersHandler" path="ChatHandler.ashx" verb="*" type="Web12306.ChatServers" />
|
<add name="ChatServersHandler" path="ChatHandler.ashx" verb="*" type="Web12306.ChatServers" />
|
||||||
<add name="TrainSuggestHandler" path="ts" verb="*" type="Web12306.TrainSuggestion" />
|
<add name="TrainSuggestHandler" path="ts" verb="*" type="Web12306.TrainSuggestion" />
|
||||||
|
<add name="CrxHandler" path="crx" verb="*" type="Web12306.CrxHandler" />
|
||||||
</handlers>
|
</handlers>
|
||||||
|
<staticContent>
|
||||||
|
<mimeMap fileExtension=".crx" mimeType="application/octet-stream" />
|
||||||
|
</staticContent>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
@ -108,11 +108,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#wx_sell_notification span.hand {
|
#wx_sell_notification span.hand {
|
||||||
background: url(../images/hand.png) no-repeat left top;
|
background: url(../images/handd.gif) no-repeat left top;
|
||||||
width: 93px;
|
width: 93px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
right: -56px;
|
right: -45px;
|
||||||
bottom: -34px;
|
bottom: -24px;
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chat_container .chat-editor > header {
|
#chat_container .chat-editor > header {
|
||||||
|
@ -192,6 +192,11 @@
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#suggestion > footer > span {
|
||||||
|
color: #c23825;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
#suggestion .result {
|
#suggestion .result {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
BIN
Web12306/images/handd.gif
Normal file
BIN
Web12306/images/handd.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -49,13 +49,6 @@
|
|||||||
<p>系统通知</p>
|
<p>系统通知</p>
|
||||||
</a>
|
</a>
|
||||||
<section class="search-tips-container">
|
<section class="search-tips-container">
|
||||||
<h5>
|
|
||||||
重要提示
|
|
||||||
<i class="fa fa-times fr"></i>
|
|
||||||
</h5>
|
|
||||||
<div>
|
|
||||||
铁道部的运营图有重要的调整,请注意查看网站通知
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -515,11 +508,10 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div style="display:block;" class="result">
|
<div style="display:block;" class="result">
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<strong>提示</strong> 跨站购票需要换取纸票,通过人工检票后在您所需要上车的站点(<span></span>)上车,不可直接刷身份证入站。
|
<strong>提示:</strong> 跨站购票需要换取纸票,通过人工检票后在您原来的<span></span>站上车、<span></span>站下车,发车时间以<span></span>站发车时间为准。
|
||||||
</footer>
|
</footer>
|
||||||
</section>
|
</section>
|
||||||
<!-- 月日期选择 -->
|
<!-- 月日期选择 -->
|
||||||
@ -957,7 +949,7 @@
|
|||||||
<script type="text/x-dot-template" id="chat_sys_alert">
|
<script type="text/x-dot-template" id="chat_sys_alert">
|
||||||
<section class="chat-item chat-item-alert">
|
<section class="chat-item chat-item-alert">
|
||||||
<i class="fa fa-exclamation-triangle"></i>
|
<i class="fa fa-exclamation-triangle"></i>
|
||||||
您已经进入了 <span>{{!it.name}}</span>,当前在线 <span class="chat-online-count">{{=it.onlinecount}}</span> 人。请阅读我们的 <a href="">发言规范</a>,请不要出现任何非法信息和倒卖信息,否则您的账号将会被封。
|
您已经进入了 <span>{{!it.name}}</span>,当前在线 <span class="chat-online-count">{{=it.onlinecount}}</span> 人。请不要出现任何非法信息和倒卖信息,否则您的账号将会被封。
|
||||||
</section>
|
</section>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/x-dot-template" id="chat_connect_server">
|
<script type="text/x-dot-template" id="chat_connect_server">
|
||||||
@ -1112,13 +1104,5 @@
|
|||||||
<script src="js/modules/doT.js"></script>
|
<script src="js/modules/doT.js"></script>
|
||||||
<script src="js/modules/seajs/sea.js"></script>
|
<script src="js/modules/seajs/sea.js"></script>
|
||||||
<script src="js/boot.js"></script>
|
<script src="js/boot.js"></script>
|
||||||
<script>
|
|
||||||
var _hmt = _hmt || [];
|
|
||||||
(function () {
|
|
||||||
var hm = document.createElement("script");
|
|
||||||
hm.src = "//hm.baidu.com/hm.js?c7150a056b54f666f90c1a05e0700798";
|
|
||||||
document.getElementsByTagName("head")[0].appendChild(hm);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var profile = storage.obj("12306_user_" + dispname) || { hasNotVerifyedPassenger: false, dispname: dispname, passengers: [], savedProfile: { list: [] }, currentProfile: {}, rawPassenger: [], options: { soundPrompt: true } };
|
var profile = storage.obj("12306_user_" + dispname) || { hasNotVerifyedPassenger: false, dispname: dispname, passengers: [], savedProfile: { list: [] }, currentProfile: {}, rawPassenger: [], options: { soundPrompt: true } };
|
||||||
profile.currentProfile = $.extend({}, that.defaultProfile, profile.currentProfile, cp);
|
profile.currentProfile = $.extend({}, _.clone(that.defaultProfile), profile.currentProfile, cp);
|
||||||
if (!profile.currentProfile.autoRefreshDelay)
|
if (!profile.currentProfile.autoRefreshDelay)
|
||||||
profile.currentProfile.autoRefreshDelay = 5;
|
profile.currentProfile.autoRefreshDelay = 5;
|
||||||
if (username)
|
if (username)
|
||||||
@ -256,7 +256,7 @@
|
|||||||
get: function () {
|
get: function () {
|
||||||
return session && session.currentProfile;
|
return session && session.currentProfile;
|
||||||
}, set: function (value) {
|
}, set: function (value) {
|
||||||
session.currentProfile = $.extend({}, that.defaultProfile, value);
|
session.currentProfile = $.extend({}, _.clone(that.defaultProfile), value);
|
||||||
that.fireEvent("currentProfileChanged");
|
that.fireEvent("currentProfileChanged");
|
||||||
that.save();
|
that.save();
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
seajs.use("ui/noextension");
|
seajs.use("ui/noextension");
|
||||||
};
|
};
|
||||||
window.targetExtensionId = null;
|
window.targetExtensionId = null;
|
||||||
$(function() {
|
$(function () {
|
||||||
//确保内容脚本启动
|
//确保内容脚本启动
|
||||||
var start = $.Deferred();
|
var start = $.Deferred();
|
||||||
start.done(function () {
|
start.done(function () {
|
||||||
@ -112,14 +112,31 @@
|
|||||||
//TODO: 因为压缩需要mark所有的页面名,所以不可以用变量计算。
|
//TODO: 因为压缩需要mark所有的页面名,所以不可以用变量计算。
|
||||||
if (pagename === "index")
|
if (pagename === "index")
|
||||||
seajs.use("ui/index");
|
seajs.use("ui/index");
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
start.fail(function () {
|
start.fail(function () {
|
||||||
notInstallExtension();
|
notInstallExtension();
|
||||||
});
|
});
|
||||||
|
start.always(function () {
|
||||||
|
var page = location.pathname;
|
||||||
|
if (location.search) {
|
||||||
|
page += location.search;
|
||||||
|
} else {
|
||||||
|
page += "?";
|
||||||
|
}
|
||||||
|
page += "bv=" + document.body.dataset["browserVersion"] + "&ev=" + document.body.dataset["targetExtensionVersion"];
|
||||||
|
//加入百度统计
|
||||||
|
window._hmt = window._hmt || [];
|
||||||
|
_hmt.push(['_setAutoPageview', false]);
|
||||||
|
_hmt.push(['_trackPageview', page]);
|
||||||
|
|
||||||
var checkExtensionInfo = function() {
|
var hm = document.createElement("script");
|
||||||
|
hm.src = "//hm.baidu.com/hm.js?c7150a056b54f666f90c1a05e0700798";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(hm);
|
||||||
|
});
|
||||||
|
|
||||||
|
var checkExtensionInfo = function () {
|
||||||
window.targetExtensionId = document.body.dataset["targetExtensionId"];
|
window.targetExtensionId = document.body.dataset["targetExtensionId"];
|
||||||
window.targetExtensionVersion = document.body.dataset["targetExtensionVersion"];
|
window.targetExtensionVersion = document.body.dataset["targetExtensionVersion"];
|
||||||
|
|
||||||
@ -147,3 +164,5 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(window, document);
|
})(window, document);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(function (require, exports, module) {
|
define(function (require, exports, module) {
|
||||||
|
var param = require("../data.js");
|
||||||
exports.targetId = window.targetExtensionId;
|
exports.targetId = window.targetExtensionId;
|
||||||
|
|
||||||
var EventObject = require("./EventObject.js");
|
var EventObject = require("./EventObject.js");
|
||||||
@ -65,7 +66,7 @@
|
|||||||
}, function () { });
|
}, function () { });
|
||||||
|
|
||||||
//百度统计
|
//百度统计
|
||||||
if (window._hmt) {
|
if (window._hmt && type !== param.trackTypes.OPEN_PAGE_INDEX) {
|
||||||
try {
|
try {
|
||||||
var data = "";
|
var data = "";
|
||||||
if (values) {
|
if (values) {
|
||||||
|
@ -77,7 +77,9 @@
|
|||||||
$("#chat_float_tip").click(showServerList);
|
$("#chat_float_tip").click(showServerList);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
servernode.loadServers();
|
setTimeout(function() {
|
||||||
|
servernode.loadServers();
|
||||||
|
}, 1000 * 60 * 11);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
dom.find("div>p:eq(0) span").html(data.orderId);
|
dom.find("div>p:eq(0) span").html(data.orderId);
|
||||||
submitProgress.removeClass().addClass("ticket-submit-status ticket-submit-status-ok");
|
submitProgress.removeClass().addClass("ticket-submit-status ticket-submit-status-ok");
|
||||||
submitProgress.find("span").html("订票成功!订单号为 " + data.orderId);
|
submitProgress.find("span").html("订票成功!订单号为 " + data.orderId);
|
||||||
share.makeWeiboShare(document.getElementById("lnkShareWb"), null, "我刚在#猎豹浏览器#上用#订票助手#抢到了" + pPassengers.length + "张车票!你的车票买到了吗?", null);
|
share.makeWeiboShare(document.getElementById("lnkShareWb"), null, "尝试了各种办法买国庆火车票,差点就要放弃,没想到用 @猎豹浏览器 一下子就抢到了想要的车票,给力啊! #国庆抢票,就用猎豹# ", null);
|
||||||
submitBtn[0].disabled = false;
|
submitBtn[0].disabled = false;
|
||||||
|
|
||||||
//track
|
//track
|
||||||
|
@ -37,9 +37,12 @@
|
|||||||
$(".search-tips-container").html(noticeTemplate(unreadNotice));
|
$(".search-tips-container").html(noticeTemplate(unreadNotice));
|
||||||
$("#index-tip-body").find(".order-num").html(unreadNotice.length).show();
|
$("#index-tip-body").find(".order-num").html(unreadNotice.length).show();
|
||||||
} else {
|
} else {
|
||||||
$("#index-tip-body").find(".order-num").html(0).hide();
|
$("#index-tip-body").find(".order-num").html("0").hide();
|
||||||
//取最新的几条通知
|
//取最新的几条通知
|
||||||
var shownNotice = _.first(savedNotice.items, data.sysNoticeMaxShowCount);
|
var shownNotice = _.first(savedNotice.items, data.sysNoticeMaxShowCount);
|
||||||
|
if (!shownNotice.length) {
|
||||||
|
shownNotice = [{ title: "暂时没有系统公告" }];
|
||||||
|
}
|
||||||
$(".search-tips-container").html(noticeTemplate(shownNotice));
|
$(".search-tips-container").html(noticeTemplate(shownNotice));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -122,6 +122,10 @@
|
|||||||
utility: utility,
|
utility: utility,
|
||||||
getOriginalDepInfo: getOriginalDepInfo
|
getOriginalDepInfo: getOriginalDepInfo
|
||||||
}));
|
}));
|
||||||
|
var infoSpan = $("#suggestion > footer> span");
|
||||||
|
infoSpan.eq(0).html(sessMgr.currentProfile.fromText);
|
||||||
|
infoSpan.eq(1).html(sessMgr.currentProfile.toText);
|
||||||
|
infoSpan.eq(2).html(sessMgr.currentProfile.fromText);
|
||||||
self.location.hash = '#suggestion';
|
self.location.hash = '#suggestion';
|
||||||
|
|
||||||
//track
|
//track
|
||||||
|
@ -21,6 +21,7 @@ rem "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--pack-extens
|
|||||||
rem ren deploy.crx 12306订票助手(猎豹浏览器专版)_打开欢迎页.crx
|
rem ren deploy.crx 12306订票助手(猎豹浏览器专版)_打开欢迎页.crx
|
||||||
|
|
||||||
tools\SourceFileUtility.exe deploy\manifest.json ", ""infobars""" ", ""experimental"""
|
tools\SourceFileUtility.exe deploy\manifest.json ", ""infobars""" ", ""experimental"""
|
||||||
|
tools\SourceFileUtility.exe deploy\manifest.json ".1""," ".0"","
|
||||||
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||||
ren deploy.crx 12306订票助手(猎豹浏览器专版)_B29.crx
|
ren deploy.crx 12306订票助手(猎豹浏览器专版)_B29.crx
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user