Skip to content

Commit

Permalink
updated 添加部分浏览器判断
Browse files Browse the repository at this point in the history
  • Loading branch information
mumuy committed Mar 19, 2018
1 parent 615dc43 commit bd7c6ba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
'QupZilla': u.indexOf('QupZilla') > -1,
'Coc Coc': u.indexOf('coc_coc_browser') > -1,
'Kindle': u.indexOf('Kindle') > -1 || u.indexOf('Silk/') > -1,
'Iceweasel': u.indexOf('Iceweasel') > -1,
'Konqueror': u.indexOf('Konqueror') > -1,
'Iceape': u.indexOf('Iceape') > -1,
'SeaMonkey': u.indexOf('SeaMonkey') > -1,
'Epiphany': u.indexOf('Epiphany') > -1,
'360': u.indexOf('QihooBrowser') > -1,
'360EE': u.indexOf('360EE') > -1,
'360SE': u.indexOf('360SE') > -1,
Expand Down Expand Up @@ -121,7 +126,7 @@
//基本信息
var hash = {
engine: ['WebKit', 'Trident', 'Gecko', 'Presto'],
browser: ['Safari', 'Chrome', 'Edge', 'IE', 'Firefox', 'Firefox Focus', 'Chromium', 'Opera', 'Vivaldi', 'Yandex', 'Arora', 'Lunascape', 'QupZilla', 'Coc Coc', 'Kindle', '360', '360SE', '360EE', 'UC', 'QQBrowser', 'QQ', 'Baidu', 'Maxthon', 'Sogou', 'LBBROWSER', '2345Explorer', 'TheWorld', 'XiaoMi', 'Quark', 'Qiyu', 'Wechat', 'Taobao', 'Alipay', 'Weibo', 'Douban','Suning', 'iQiYi'],
browser: ['Safari', 'Chrome', 'Edge', 'IE', 'Firefox', 'Firefox Focus', 'Chromium', 'Opera', 'Vivaldi', 'Yandex', 'Arora', 'Lunascape', 'QupZilla', 'Coc Coc', 'Kindle', 'Iceweasel', 'Konqueror', 'Iceape', 'SeaMonkey', 'Epiphany', '360', '360SE', '360EE', 'UC', 'QQBrowser', 'QQ', 'Baidu', 'Maxthon', 'Sogou', 'LBBROWSER', '2345Explorer', 'TheWorld', 'XiaoMi', 'Quark', 'Qiyu', 'Wechat', 'Taobao', 'Alipay', 'Weibo', 'Douban','Suning', 'iQiYi'],
os: ['Windows', 'Linux', 'Mac OS', 'Android', 'Ubuntu', 'FreeBSD', 'Debian', 'iOS', 'Windows Phone', 'BlackBerry', 'MeeGo', 'Symbian', 'Chrome OS', 'WebOS'],
device: ['Mobile', 'Tablet']
};
Expand Down Expand Up @@ -231,6 +236,21 @@
'Kindle': function () {
return u.replace(/^.*Version\/([\d.]+).*$/, '$1');
},
'Iceweasel': function () {
return u.replace(/^.*Iceweasel\/([\d.]+).*$/, '$1');
},
'Konqueror': function () {
return u.replace(/^.*Konqueror\/([\d.]+).*$/, '$1');
},
'Iceape': function () {
return u.replace(/^.*Iceape\/([\d.]+).*$/, '$1');
},
'SeaMonkey': function () {
return u.replace(/^.*SeaMonkey\/([\d.]+).*$/, '$1');
},
'Epiphany': function () {
return u.replace(/^.*Epiphany\/([\d.]+).*$/, '$1');
},
'360': function(){
return u.replace(/^.*QihooBrowser\/([\d.]+).*$/, '$1');
},
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ Coc Coc - 越南搜索引擎浏览器

Kindle

Iceweasel

Konqueror

Iceape

SeaMonkey

Epiphany

360 - 360浏览器(手机版)

360SE - 360安全浏览器
Expand Down

0 comments on commit bd7c6ba

Please sign in to comment.