-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump version 1.0.35 (mirror of v0.7.35)
- Loading branch information
Showing
12 changed files
with
148 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ua-parser-js", | ||
"version": "1.0.34", | ||
"version": "1.0.35", | ||
"authors": [ | ||
"Faisal Salman <[email protected]>" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"title": "UAParser.js", | ||
"name": "ua-parser-js", | ||
"version": "1.0.34", | ||
"version": "1.0.35", | ||
"author": "Faisal Salman <[email protected]> (http://faisalman.com)", | ||
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment", | ||
"keywords": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
///////////////////////////////////////////////////////////////////////////////// | ||
/* UAParser.js v1.0.34 | ||
/* UAParser.js v1.0.35 | ||
Copyright © 2012-2021 Faisal Salman <[email protected]> | ||
MIT License *//* | ||
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. | ||
|
@@ -17,7 +17,7 @@ | |
///////////// | ||
|
||
|
||
var LIBVERSION = '1.0.34', | ||
var LIBVERSION = '1.0.35', | ||
EMPTY = '', | ||
UNKNOWN = '?', | ||
FUNC_TYPE = 'function', | ||
|
@@ -236,8 +236,9 @@ | |
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer | ||
|
||
// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon | ||
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, | ||
/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, | ||
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ | ||
/(heytap|ovi)browser\/([\d\.]+)/i, // Heytap/Ovi | ||
/(weibo)__([\d\.]+)/i // Weibo | ||
], [NAME, VERSION], [ | ||
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i // UCBrowser | ||
|
@@ -251,7 +252,7 @@ | |
], [VERSION, [NAME, 'Konqueror']], [ | ||
/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i // IE11 | ||
], [VERSION, [NAME, 'IE']], [ | ||
/yabrowser\/([\w\.]+)/i // Yandex | ||
/ya(?:search)?browser\/([\w\.]+)/i // Yandex | ||
], [VERSION, [NAME, 'Yandex']], [ | ||
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser | ||
], [[NAME, /(.+)/, '$1 Secure '+BROWSER], VERSION], [ | ||
|
@@ -295,6 +296,8 @@ | |
], [NAME, VERSION], [ | ||
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS | ||
], [VERSION, [NAME, 'GSA']], [ | ||
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i // TikTok | ||
], [VERSION, [NAME, 'TikTok']], [ | ||
|
||
/headlesschrome(?:\/([\w\.]+)| )/i // Chrome Headless | ||
], [VERSION, [NAME, CHROME+' Headless']], [ | ||
|
@@ -390,7 +393,7 @@ | |
], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [ | ||
|
||
// Apple | ||
/\((ip(?:hone|od)[\w ]*);/i // iPod/iPhone | ||
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i // iPod/iPhone | ||
], [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]], [ | ||
/\((ipad);[-\w\),; ]+apple/i, // iPad | ||
/applecoremedia\/[\w\.]+ \((ipad)/i, | ||
|
@@ -480,7 +483,7 @@ | |
|
||
// Amazon | ||
/(alexa)webm/i, | ||
/(kf[a-z]{2}wi)( bui|\))/i, // Kindle Fire without Silk | ||
/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, // Kindle Fire without Silk / Echo Show | ||
/(kf[a-z]+)( bui|\)).+silk\//i // Kindle Fire HD | ||
], [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]], [ | ||
/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i // Fire Phone | ||
|
@@ -665,6 +668,8 @@ | |
|
||
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i // Tesla | ||
], [VENDOR, [TYPE, EMBEDDED]], [ | ||
/(aeobc)\b/i // Echo Dot | ||
], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [ | ||
|
||
//////////////////// | ||
// MIXED (GENERIC) | ||
|
@@ -694,7 +699,8 @@ | |
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna | ||
/ekioh(flow)\/([\w\.]+)/i, // Flow | ||
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links | ||
/(icab)[\/ ]([23]\.[\d\.]+)/i // iCab | ||
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab | ||
/\b(libweb)/i | ||
], [NAME, VERSION], [ | ||
|
||
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko | ||
|
@@ -715,6 +721,7 @@ | |
|
||
// iOS/macOS | ||
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS | ||
/ios;fbsv\/([\d\.]+)/i, | ||
/cfnetwork\/.+darwin/i | ||
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ | ||
/(mac os x) ?([\w\. ]*)/i, | ||
|
@@ -771,7 +778,7 @@ | |
], [[NAME, 'Solaris'], VERSION], [ | ||
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, // Solaris | ||
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i, // AIX | ||
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX | ||
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS | ||
/(unix) ?([\w\.]*)/i // UNIX | ||
], [NAME, VERSION] | ||
] | ||
|
@@ -796,6 +803,7 @@ | |
var _ua = ua || ((_navigator && _navigator.userAgent) ? _navigator.userAgent : EMPTY); | ||
var _uach = (_navigator && _navigator.userAgentData) ? _navigator.userAgentData : undefined; | ||
var _rgxmap = extensions ? extend(regexes, extensions) : regexes; | ||
var _isSelfNav = _navigator && _navigator.userAgent == _ua; | ||
|
||
this.getBrowser = function () { | ||
var _browser = {}; | ||
|
@@ -804,7 +812,7 @@ | |
rgxMapper.call(_browser, _ua, _rgxmap.browser); | ||
_browser[MAJOR] = majorize(_browser[VERSION]); | ||
// Brave-specific detection | ||
if (_navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) { | ||
if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) { | ||
_browser[NAME] = 'Brave'; | ||
} | ||
return _browser; | ||
|
@@ -821,11 +829,11 @@ | |
_device[MODEL] = undefined; | ||
_device[TYPE] = undefined; | ||
rgxMapper.call(_device, _ua, _rgxmap.device); | ||
if (!_device[TYPE] && _uach && _uach.mobile) { | ||
if (_isSelfNav && !_device[TYPE] && _uach && _uach.mobile) { | ||
_device[TYPE] = MOBILE; | ||
} | ||
// iPadOS-specific detection: identified as Mac, but has some iOS-only properties | ||
if (_device[MODEL] == 'Macintosh' && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) { | ||
if (_isSelfNav && _device[MODEL] == 'Macintosh' && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) { | ||
_device[MODEL] = 'iPad'; | ||
_device[TYPE] = TABLET; | ||
} | ||
|
@@ -843,7 +851,7 @@ | |
_os[NAME] = undefined; | ||
_os[VERSION] = undefined; | ||
rgxMapper.call(_os, _ua, _rgxmap.os); | ||
if (!_os[NAME] && _uach && _uach.platform != 'Unknown') { | ||
if (_isSelfNav && !_os[NAME] && _uach && _uach.platform != 'Unknown') { | ||
_os[NAME] = _uach.platform | ||
.replace(/chrome os/i, CHROMIUM_OS) | ||
.replace(/macos/i, MAC_OS); // backward compatibility | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters