1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

add support firefox for iOS

This commit is contained in:
Denis Demchenko 2016-05-08 14:24:36 +03:00
parent 197c203e11
commit 62745525df
2 changed files with 13 additions and 3 deletions

View File

@ -47,7 +47,7 @@
, mobile = !tablet && /[^-]mobi/i.test(ua) , mobile = !tablet && /[^-]mobi/i.test(ua)
, result , result
if (/opera|opr/i.test(ua)) { if (/opera|opr|opios/i.test(ua)) {
result = { result = {
name: 'Opera' name: 'Opera'
, opera: t , opera: t
@ -131,11 +131,11 @@
, version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)
} }
} }
else if (/firefox|iceweasel/i.test(ua)) { else if (/firefox|iceweasel|fxios/i.test(ua)) {
result = { result = {
name: 'Firefox' name: 'Firefox'
, firefox: t , firefox: t
, version: getFirstMatch(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i) , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)
} }
if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) {
result.firefoxos = t result.firefoxos = t

View File

@ -715,6 +715,16 @@ module.exports.useragents = {
, linux: true , linux: true
, c: true , c: true
} }
, 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) FxiOS/3.0 Mobile/13E238 Safari/601.1.46': {
firefox: true
, version: '3.0'
, osversion: '9.3.1'
, ios: true
, iphone: true
, mobile: true
, a: true
, webkit: true
}
} }
, SeaMonkey: { , SeaMonkey: {
'Mozilla/5.0 (Windows NT 5.2; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1': { 'Mozilla/5.0 (Windows NT 5.2; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1': {