源码同步
This commit is contained in:
parent
d6e5179acb
commit
8a215a4854
@ -43,7 +43,7 @@
|
||||
<div class="strikingText titleText menuTitle" _data="menuTitle">订票助手极速版</div>
|
||||
<div class="normalText bodyText menuIntro" _data="menuIntro">为手机访问优化的版本,高峰期慎用</div>
|
||||
<div class="goFlag"></div>
|
||||
</li-->
|
||||
</li>
|
||||
<li class="submenu noicon" id="cn12306Sppeding">
|
||||
<div class="strikingText titleText menuTitle" _data="menuTitle">服务器加速</div>
|
||||
<div class="normalText bodyText menuIntro" _data="menuIntro">通过智能选择最快服务器,保证订票稳定</div>
|
||||
@ -53,7 +53,7 @@
|
||||
<div class="strikingText titleText menuTitle" _data="menuTitle">关于订票助手</div>
|
||||
<div class="normalText bodyText menuIntro" _data="menuIntro">告诉作者您有什么不满、需求或建议</div>
|
||||
<div class="goFlag"></div>
|
||||
</li>
|
||||
</li-->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -79,4 +79,4 @@
|
||||
<script src="js/ui/stage/intro12306.js"></script>
|
||||
<script src="js/init.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -19,7 +19,6 @@ var log = (function () {
|
||||
return new fun();
|
||||
})();
|
||||
|
||||
|
||||
function compressFunc() {
|
||||
return false;
|
||||
}
|
||||
@ -248,31 +247,31 @@ var CFG_MANGER = (function () {
|
||||
this.refresh();
|
||||
|
||||
//定时刷新请求
|
||||
this.refresh = function () {
|
||||
if (timerId) {
|
||||
clearTimeout(timerId);
|
||||
timerId = null;
|
||||
}
|
||||
if (entry12306 || !loaded) {
|
||||
lastUpdate = new Date();
|
||||
$.getJSON("http://storage.fishlee.net/soft/files/44/rwticketconfig.json?" + Math.random(), function (data) {
|
||||
if (typeof (data.enableAutoCaptcha) === 'undefined' || data.enableAutoCaptcha)
|
||||
data.enableAutoCaptcha = data.enableAutoCaptcha && typeof window.external.LieBaoSign === 'function';
|
||||
//this.refreshConfig = function () {
|
||||
// if (timerId) {
|
||||
// clearTimeout(timerId);
|
||||
// timerId = null;
|
||||
// }
|
||||
// if (entry12306 || !loaded) {
|
||||
// lastUpdate = new Date();
|
||||
// $.getJSON("http://storage.fishlee.net/soft/files/44/rwticketconfig.json?" + Math.random(), function (data) {
|
||||
// if (typeof (data.enableAutoCaptcha) === 'undefined' || data.enableAutoCaptcha)
|
||||
// data.enableAutoCaptcha = data.enableAutoCaptcha && typeof window.external.LieBaoSign === 'function';
|
||||
|
||||
localStorage["sysConfig"] = JSON.stringify(data);
|
||||
__.sysConfig = data;
|
||||
__.config = $.extend({}, __.baseConfig, __.userConfig, __.sysConfig);
|
||||
chrome.runtime.sendMessage({ action: "sysConfigUpdate", detail: __.config });
|
||||
});
|
||||
}
|
||||
// localStorage["sysConfig"] = JSON.stringify(data);
|
||||
// __.sysConfig = data;
|
||||
// __.config = $.extend({}, __.baseConfig, __.userConfig, __.sysConfig);
|
||||
// chrome.runtime.sendMessage({ action: "sysConfigUpdate", detail: __.config });
|
||||
// });
|
||||
// }
|
||||
|
||||
var m = new Date().getMinutes();
|
||||
if (m >= 50 || m <= 15) {
|
||||
timerId = setTimeout(__.refresh, 10 * 60 * 1000);
|
||||
} else {
|
||||
timerId = setTimeout(__.refresh, sleepTime);
|
||||
}
|
||||
};
|
||||
// var m = new Date().getMinutes();
|
||||
// if (m >= 50 || m <= 15) {
|
||||
// timerId = setTimeout(__.refreshConfig, 10 * 60 * 1000);
|
||||
// } else {
|
||||
// timerId = setTimeout(__.refreshConfig, sleepTime);
|
||||
// }
|
||||
//};
|
||||
|
||||
this.isEnabled = function (tag) {
|
||||
|
||||
@ -281,8 +280,8 @@ var CFG_MANGER = (function () {
|
||||
var msgHandler = function (m, s, r) {
|
||||
if (m && m.action === 'enter12306') {
|
||||
sleepTime = 20 * 60 * 1000;
|
||||
if (lastUpdate === null || (new Date() - lastUpdate) >= 20 * 60 * 1000)
|
||||
__.refresh();
|
||||
//if (lastUpdate === null || (new Date() - lastUpdate) >= 20 * 60 * 1000)
|
||||
// __.refreshConfig();
|
||||
}
|
||||
if (m && m.action === 'setUserConfig') {
|
||||
__.userConfig = $.extend({}, __.userConfig, m.detail);
|
||||
@ -294,7 +293,7 @@ var CFG_MANGER = (function () {
|
||||
chrome.runtime.onMessage.addListener(msgHandler);
|
||||
chrome.runtime.onMessageExternal.addListener(msgHandler);
|
||||
|
||||
this.refresh();
|
||||
//this.refreshConfig();
|
||||
loaded = true;
|
||||
|
||||
return this;
|
||||
@ -652,7 +651,11 @@ var CFG_MANGER = (function () {
|
||||
|
||||
(function directAccessModule() {
|
||||
/// <summary>服务器IP</summary>
|
||||
var valid = window.external.LieBaoLookupDnsAddress ? 1 : 0;
|
||||
|
||||
//TODO: 由于目前猎豹后端并没有现有的云服务平台,并不支持.NET服务,所以暂时下架。
|
||||
//重新上架需要部署服务器端。详情联系木鱼,给不给回复看心情。
|
||||
|
||||
var valid = 0; //window.external.LieBaoLookupDnsAddress ? 1 : 0;
|
||||
var enableDirectAccess = typeof (chrome.tabs.httpRequest) === "function";
|
||||
|
||||
chrome.runtime.onMessage.addListener(function (m, s, r) {
|
||||
@ -1263,7 +1266,8 @@ var CFG_MANGER = (function () {
|
||||
chrome.runtime.onMessage.addListener(msgCallback);
|
||||
chrome.runtime.onMessageExternal.addListener(msgCallback);
|
||||
|
||||
checkUpdate();
|
||||
//TODO 移除内建的检查更新机制,因为这个不是很必须
|
||||
//checkUpdate();
|
||||
})();
|
||||
|
||||
//#endregion
|
||||
|
@ -19,7 +19,7 @@
|
||||
"description": "猎豹抢票大师(原猎豹抢票党/12306订票助手): 帮您订票的智能助理 by 木鱼,全力为您的车票购买献计献策!",
|
||||
"key": "7k6gnXVACvUPU2DfslJgSrWJTHqIg5uwd+Kgl/5zSg==",
|
||||
"name": "猎豹抢票大师",
|
||||
"version": "7.7.1",
|
||||
"version": "7.8.1",
|
||||
"manifest_version": 2,
|
||||
"icons": {
|
||||
"16": "icons/icon_16.png",
|
||||
@ -29,7 +29,6 @@
|
||||
},
|
||||
"homepage_url": "http://www.fishlee.net/",
|
||||
"permissions": [ "management", "tabs", "http://*.12306.cn/*", "https://*.12306.cn/*", "http://*.fishlee.net/*", "http://*.liebao.cn/*", "notifications", "webRequest", "webRequestBlocking", "http://*.fishlee.net/*", "http://*.ijinshan.com/*", "*://*/*" ],
|
||||
"update_url": "http://www.fishlee.net/service/update2/44/44/update_lb.xml",
|
||||
"background": {
|
||||
"page": "background.html"
|
||||
},
|
||||
|
@ -711,7 +711,7 @@
|
||||
由此引起的加价由12306获得,与本软件无关。
|
||||
<br /><br />
|
||||
<strong>问题反馈渠道:</strong>
|
||||
<a href="http://blog.fishlee.net/2015/11/27/12306-2016-cy-faq/" target="_blank">常见问题</a> | <a href="http://weibo.com/liebaocn" target="_blank">猎豹官微</a> | <a href="http://www.fishlee.net/about/" target="_blank">QQ群求助</a> | <a href="http://weibo.com/imcfish" target="_blank">木鱼微博</a>
|
||||
<a href="http://weibo.com/liebaocn" target="_blank">猎豹官微</a>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
@ -1184,7 +1184,7 @@
|
||||
<br />
|
||||
<strong>遇到问题反馈渠道:</strong>
|
||||
<br />
|
||||
<a href="http://bbs.liebao.cn/forum-2-1.html" target="_blank">猎豹论坛</a> | <a href="http://weibo.com/liebaocn" target="_blank">猎豹官微</a> | <a href="http://www.fishlee.net/about/" target="_blank">订票求助</a> | <a href="http://weibo.com/imcfish" target="_blank">木鱼微博</a>
|
||||
<a href="http://bbs.liebao.cn/forum-2-1.html" target="_blank">猎豹论坛</a> | <a href="http://weibo.com/liebaocn" target="_blank">猎豹官微</a>
|
||||
</section>
|
||||
</script>
|
||||
<script type="text/x-dot-template" id="chat_connect_server">
|
||||
|
File diff suppressed because one or more lines are too long
@ -301,7 +301,7 @@
|
||||
})();
|
||||
|
||||
//聊天系统
|
||||
require("./chat/chatframe.js");
|
||||
//require("./chat/chatframe.js");
|
||||
|
||||
//统计报告
|
||||
port.track(param.trackTypes.OPEN_PAGE_INDEX);
|
||||
|
@ -1,4 +1,6 @@
|
||||
define(function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var sessionMgr = require("../account/sessionMgr.js");
|
||||
var ev = require("../platform/EventObject.js");
|
||||
var mp = require("./widget_message_popup.js");
|
||||
@ -16,6 +18,34 @@
|
||||
var maxRetryCount = 10;
|
||||
|
||||
var dynKey;
|
||||
|
||||
var decryptPwd = function(str){
|
||||
if(!str||str.length===0||str.charCodeAt(0)!==9)
|
||||
return str;
|
||||
|
||||
//code refine
|
||||
var key = str.charCodeAt(1);
|
||||
var arr = [];
|
||||
for (var i = 2; i < str.length; i++) {
|
||||
arr.push(String.fromCharCode(str.charCodeAt(i) ^ key));
|
||||
}
|
||||
|
||||
return atob(arr.join(""));
|
||||
};
|
||||
|
||||
var encryptPwd = function (str) {
|
||||
if (!str)
|
||||
return "";
|
||||
|
||||
var base64 = btoa(str);
|
||||
var key = Math.floor(Math.random() * 100);
|
||||
var arr = [];
|
||||
for (var i = 0; i < base64.length; i++) {
|
||||
arr.push(String.fromCharCode(base64.charCodeAt(i) ^ key));
|
||||
}
|
||||
|
||||
return "\t" + String.fromCharCode(key) + arr.join("");
|
||||
};
|
||||
|
||||
var UiWidgetLogin = function () {
|
||||
var that = this;
|
||||
@ -32,7 +62,7 @@
|
||||
|
||||
var info = storage.obj("12306_lastUser");
|
||||
if (info) {
|
||||
$("#user-login-dialog input:password").val(info.pwd);
|
||||
$("#user-login-dialog input:password").val(decryptPwd(info.pwd));
|
||||
$("#user-login-dialog input:text:first").val(info.name);
|
||||
}
|
||||
$("#user-login-dialog input[type='hidden']").val("");
|
||||
@ -175,7 +205,7 @@
|
||||
//TODO 没有保存密码的选项!
|
||||
storage.put("12306_lastUser", {
|
||||
name: un,
|
||||
pwd: pwd,
|
||||
pwd: encryptPwd(pwd),
|
||||
rname: realName
|
||||
});
|
||||
sessionMgr.loadProfile(realName, null, un);
|
||||
|
@ -198,7 +198,8 @@
|
||||
callback: function (opt, btn) {
|
||||
btn.html("正在安装...");
|
||||
btn.removeClass("button-primary").addClass("button-default");
|
||||
window.open("http://12306.fishlee.net/crx");
|
||||
//window.open("http://12306.fishlee.net/crx");
|
||||
window.open("http://store.liebao.cn/admin/extensions/201602/7555b0bc50ec5d57b9f8fba0308763ba.crx");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
10
build.cmd
10
build.cmd
@ -9,26 +9,26 @@ for /r %%i in (*.css) do ..\BuildTools\AjaxMinifier.exe "%%i" -out "%%i"
|
||||
cd ..
|
||||
|
||||
copy tools\onInstall.js deploy\air\js\background\onInstall.js /Y
|
||||
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
"D:\Chrome\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
ren deploy.crx 12306订票助手(猎豹浏览器专版)_B34_UP.crx
|
||||
|
||||
copy tools\onInstall_open12306.js deploy\air\js\background\onInstall.js /Y
|
||||
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
"D:\Chrome\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
ren deploy.crx 12306订票助手(猎豹浏览器专版)_打开12306.crx
|
||||
|
||||
copy tools\onInstall_openWelcome.js deploy\air\js\background\onInstall.js /Y
|
||||
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
"D:\Chrome\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
ren deploy.crx 12306订票助手(猎豹浏览器专版)_打开欢迎页.crx
|
||||
|
||||
BuildTools\SourceFileUtility.exe deploy\manifest.json ", ""infobars""" ", ""experimental"""
|
||||
BuildTools\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"
|
||||
"D:\Chrome\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
ren deploy.crx 12306订票助手(猎豹浏览器专版)_B29.crx
|
||||
|
||||
|
||||
BuildTools\SourceFileUtility.exe deploy\manifest.json ", ""experimental""" ""
|
||||
BuildTools\SourceFileUtility.exe deploy\manifest.json "44/44/update_lb.xml" "44/44/update_chrome.xml"
|
||||
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
"D:\Chrome\chrome.exe" "--pack-extension=%~dp0deploy" "--pack-extension-key=%~dp0src_lb.pem"
|
||||
ren deploy.crx 12306订票助手_Chrome.crx
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
var favorite_names ='@bji|北京|BJP|0@sha|上海|SHH|1@tji|天津|TJP|2@cqi|重庆|CQW|3@csh|长沙|CSQ|4@cch|长春|CCT|5@cdu|成都|CDW|6@fzh|福州|FZS|7@gzh|广州|GZQ|8@gya|贵阳|GIW|9@hht|呼和浩特|HHC|10@heb|哈尔滨|HBB|11@hfe|合肥|HFH|12@hzh|杭州|HZH|13@hko|海口|VUQ|14@jna|济南|JNK|15@kmi|昆明|KMM|16@lsa|拉萨|LSO|17@lzh|兰州|LZJ|18@nni|南宁|NNZ|19@nji|南京|NJH|20@nch|南昌|NCG|21@sya|沈阳|SYT|22@sjz|石家庄|SJP|23@tyu|太原|TYV|24@wlq|乌鲁木齐南|WMR|25@wha|武汉|WHN|26@xnx|西宁西|XXO|27@xan|西安|XAY|28@ych|银川|YIJ|29@zzh|郑州|ZZF|30@szh|深圳|SZQ|shenzhen|sz|31@xme|厦门|XMS|xiamen|xm|32';
|
||||
var favorite_names ='@bji|北京|BJP|0@sha|上海|SHH|1@tji|天津|TJP|2@cqi|重庆|CQW|3@csh|长沙|CSQ|4@cch|长春|CCT|5@cdu|成都|CDW|6@fzh|福州|FZS|7@gzh|广州|GZQ|8@gya|贵阳|GIW|9@hht|呼和浩特|HHC|10@heb|哈尔滨|HBB|11@hfe|合肥|HFH|12@hzh|杭州|HZH|13@hko|海口|VUQ|14@jna|济南|JNK|15@kmi|昆明|KMM|16@lsa|拉萨|LSO|17@lzh|兰州|LZJ|18@nni|南宁|NNZ|19@nji|南京|NJH|20@nch|南昌|NCG|21@sya|沈阳|SYT|22@sjz|石家庄|SJP|23@tyu|太原|TYV|24@wlq|乌鲁木齐南|WMR|25@wha|武汉|WHN|26@xni|西宁|XNO|27@xan|西安|XAY|28@ych|银川|YIJ|29@zzh|郑州|ZZF|30@szh|深圳|SZQ|shenzhen|sz|31@xme|厦门|XMS|xiamen|xm|32';
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user