From 930993012561c4b9554167359b117c33629342c6 Mon Sep 17 00:00:00 2001 From: iFish Date: Tue, 9 Sep 2014 11:00:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E7=8C=8E=E8=B1=B9?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E5=88=A4=E6=96=AD=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=98=AF=E7=8C=8E=E8=B1=B9=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E5=88=99=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=AE=89=E8=A3=85=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web12306/js/ui/widget_message_popup.js | 33 +++++++++++++++----------- 1 file changed, 19 insertions(+), 14 deletions(-) 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 }); };