mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Merge branch 'hotfix/1.8.1'
This commit is contained in:
commit
4eaa50b7b0
@ -1,5 +1,8 @@
|
||||
# Bowser Changelog
|
||||
|
||||
### 1.8.1 (October 7, 2017)
|
||||
- [FIX] Fix detection of MS Edge on Android and iOS (#201)
|
||||
|
||||
### 1.8.0 (October 7, 2017)
|
||||
- [ADD] Add `osname` into result object (#200)
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
"ender",
|
||||
"sniff"
|
||||
],
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"homepage": "https://github.com/lancedikson/bowser",
|
||||
"scripts": [
|
||||
"src/bowser.js"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bowser",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"description": "Lightweight browser detector",
|
||||
"keywords": [
|
||||
"browser",
|
||||
|
@ -42,7 +42,7 @@
|
||||
, windows = !windowsphone && /windows/i.test(ua)
|
||||
, mac = !iosdevice && !silk && /macintosh/i.test(ua)
|
||||
, linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)
|
||||
, edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i)
|
||||
, edgeVersion = getSecondMatch(/edg([ea]|ios)\/(\d+(\.\d+)?)/i)
|
||||
, versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i)
|
||||
, tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua)
|
||||
, mobile = !tablet && /[^-]mobi/i.test(ua)
|
||||
@ -157,7 +157,7 @@
|
||||
, chrome: t
|
||||
, version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
|
||||
}
|
||||
} else if (/chrome.+? edge/i.test(ua)) {
|
||||
} else if (/edg([ea]|ios)/i.test(ua)) {
|
||||
result = {
|
||||
name: 'Microsoft Edge'
|
||||
, msedge: t
|
||||
@ -329,10 +329,10 @@
|
||||
}
|
||||
|
||||
// set OS flags for platforms that have multiple browsers
|
||||
if (!result.windowsphone && !result.msedge && (android || result.silk)) {
|
||||
if (!result.windowsphone && (android || result.silk)) {
|
||||
result.android = t
|
||||
result.osname = 'Android'
|
||||
} else if (!result.windowsphone && !result.msedge && iosdevice) {
|
||||
} else if (!result.windowsphone && iosdevice) {
|
||||
result[iosdevice] = t
|
||||
result.ios = t
|
||||
result.osname = 'iOS'
|
||||
|
@ -816,6 +816,25 @@ module.exports.useragents = {
|
||||
, osversion: '10'
|
||||
, a: true
|
||||
}
|
||||
, 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Mobile/14F89 Safari/603.2.4 EdgiOS/41.1.35.1': {
|
||||
osname: 'iOS'
|
||||
, msedge: true
|
||||
, version: '41.1'
|
||||
, ios: true
|
||||
, iphone: true
|
||||
, mobile: true
|
||||
, osversion: '10.3.2'
|
||||
, a: true
|
||||
}
|
||||
, 'Mozilla/5.0 (Linux; Android 8.0; Pixel XL Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.0 Mobile Safari/537.36 EdgA/41.1.35.1': {
|
||||
osname: 'Android'
|
||||
, msedge: true
|
||||
, version: '41.1'
|
||||
, android: true
|
||||
, mobile: true
|
||||
, osversion: '8.0'
|
||||
, a: true
|
||||
}
|
||||
}
|
||||
, Firefox: {
|
||||
'Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0': {
|
||||
|
Loading…
Reference in New Issue
Block a user