diff --git a/Web12306/js/ui/widget_message_popup.js b/Web12306/js/ui/widget_message_popup.js
index 752b480..8201b9b 100644
--- a/Web12306/js/ui/widget_message_popup.js
+++ b/Web12306/js/ui/widget_message_popup.js
@@ -138,21 +138,20 @@
});
};
exports.showNonExtensionInstall = function () {
- $.showModalDialog("您需要安装猎豹浏览器和最新版12306订票助手扩展才可以使用极速版订票。请安装后刷新此页面 :-)", {
- image: "/images/cat.png",
- buttons: [
- {
- text: "安装猎豹浏览器",
- type: "primary",
- callback: function () {
- window.open("http://dl.liebao.cn/coop/KSBrowser_12306.exe");
- return false;
- }
- },
+ var isLb = navigator.userAgent.indexOf("LBBROWSER") != -1;
+ var btns = [
+ {
+ text: "安装猎豹浏览器",
+ type: "primary",
+ callback: function() {
+ window.open("http://dl.liebao.cn/coop/KSBrowser_12306.exe");
+ return false;
+ }
+ },
{
text: "安装扩展",
type: "primary",
- callback: function () {
+ callback: function() {
window.open("http://12306.fishlee.net/crx");
return false;
}
@@ -160,12 +159,18 @@
{
text: "刷新",
type: "default",
- callback: function () {
+ callback: function() {
self.location.reload();
return false;
}
}
- ],
+ ];
+ if (isLb)
+ btns.unshift(0);
+
+ $.showModalDialog("您需要安装" + (isLb ? "" : "猎豹浏览器和") + "最新版12306订票助手扩展才可以使用极速版订票。请安装后刷新此页面 :-)", {
+ image: "/images/cat.png",
+ buttons: btns,
closeOnAction: false
});
};