-
-
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.
Update patch version to 1.0.32 as a mirror of 0.7.32
- Loading branch information
Showing
12 changed files
with
451 additions
and
50 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
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.2", | ||
"version": "1.0.32", | ||
"authors": [ | ||
"Faisal Salman <[email protected]>" | ||
], | ||
|
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.2", | ||
"version": "1.0.32", | ||
"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": [ | ||
|
@@ -141,6 +141,10 @@ | |
"Zach Bjornson <[email protected]>" | ||
], | ||
"main": "src/ua-parser.js", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"scripts": { | ||
"build": "uglifyjs src/ua-parser.js -o dist/ua-parser.min.js --comments '/^ UA/' && uglifyjs src/ua-parser.js -o dist/ua-parser.pack.js --comments '/^ UA/' --compress --mangle", | ||
"test": "jshint src/ua-parser.js && mocha -R nyan test/test.js", | ||
|
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.2 | ||
/* UAParser.js v1.0.32 | ||
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.2', | ||
var LIBVERSION = '1.0.32', | ||
EMPTY = '', | ||
UNKNOWN = '?', | ||
FUNC_TYPE = 'function', | ||
|
@@ -37,7 +37,7 @@ | |
SMARTTV = 'smarttv', | ||
WEARABLE = 'wearable', | ||
EMBEDDED = 'embedded', | ||
UA_MAX_LENGTH = 255; | ||
UA_MAX_LENGTH = 350; | ||
|
||
var AMAZON = 'Amazon', | ||
APPLE = 'Apple', | ||
|
@@ -54,6 +54,7 @@ | |
MOTOROLA = 'Motorola', | ||
OPERA = 'Opera', | ||
SAMSUNG = 'Samsung', | ||
SHARP = 'Sharp', | ||
SONY = 'Sony', | ||
XIAOMI = 'Xiaomi', | ||
ZEBRA = 'Zebra', | ||
|
@@ -231,13 +232,14 @@ | |
/(?: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|qqbrowserlite|qq)\/([-\w\.]+)/i, | ||
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, | ||
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ | ||
/(weibo)__([\d\.]+)/i // Weibo | ||
], [NAME, VERSION], [ | ||
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i // UCBrowser | ||
], [VERSION, [NAME, 'UC'+BROWSER]], [ | ||
/\bqbcore\/([\w\.]+)/i // WeChat Desktop for Windows Built-in Browser | ||
/microm.+\bqbcore\/([\w\.]+)/i, // WeChat Desktop for Windows Built-in Browser | ||
/\bqbcore\/([\w\.]+).+microm/i | ||
], [VERSION, [NAME, 'WeChat(Win) Desktop']], [ | ||
/micromessenger\/([\w\.]+)/i // WeChat | ||
], [VERSION, [NAME, 'WeChat']], [ | ||
|
@@ -265,16 +267,17 @@ | |
], [VERSION, [NAME, FIREFOX]], [ | ||
/\bqihu|(qi?ho?o?|360)browser/i // 360 | ||
], [[NAME, '360 '+BROWSER]], [ | ||
/(oculus|samsung|sailfish)browser\/([\w\.]+)/i | ||
], [[NAME, /(.+)/, '$1 '+BROWSER], VERSION], [ // Oculus/Samsung/Sailfish Browser | ||
/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i | ||
], [[NAME, /(.+)/, '$1 '+BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/Huawei Browser | ||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon | ||
], [[NAME, /_/g, ' '], VERSION], [ | ||
/(electron)\/([\w\.]+) safari/i, // Electron-based App | ||
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, // Tesla | ||
/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/Baidu App/2345 Browser | ||
], [NAME, VERSION], [ | ||
/(metasr)[\/ ]?([\w\.]+)/i, // SouGouBrowser | ||
/(lbbrowser)/i // LieBao Browser | ||
/(lbbrowser)/i, // LieBao Browser | ||
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android | ||
], [NAME], [ | ||
|
||
// WebView | ||
|
@@ -299,9 +302,9 @@ | |
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia | ||
], [NAME, VERSION], [ | ||
|
||
/version\/([\w\.]+) .*mobile\/\w+ (safari)/i // Mobile Safari | ||
/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i // Mobile Safari | ||
], [VERSION, [NAME, 'Mobile Safari']], [ | ||
/version\/([\w\.]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile | ||
/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile | ||
], [VERSION, NAME], [ | ||
/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i // Safari < 3.0 | ||
], [NAME, [VERSION, strMapper, oldSafariMap]], [ | ||
|
@@ -370,7 +373,7 @@ | |
///////////////////////// | ||
|
||
// Samsung | ||
/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i | ||
/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i | ||
], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [ | ||
/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i, | ||
/samsung[- ]([-\w]+)/i, | ||
|
@@ -389,15 +392,15 @@ | |
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i | ||
], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [ | ||
/(?:huawei|honor)([-\w ]+)[;\)]/i, | ||
/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i | ||
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i | ||
], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [ | ||
|
||
// Xiaomi | ||
/\b(poco[\w ]+)(?: bui|\))/i, // Xiaomi POCO | ||
/\b; (\w+) build\/hm\1/i, // Xiaomi Hongmi 'numeric' models | ||
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, // Xiaomi Hongmi | ||
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, // Xiaomi Redmi | ||
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i // Xiaomi Mi | ||
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i // Xiaomi Mi | ||
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [ | ||
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i // Mi Pad tablets | ||
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [ | ||
|
@@ -449,7 +452,7 @@ | |
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [ | ||
|
||
// Sony | ||
/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i | ||
/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i | ||
], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [ | ||
/sony tablet [ps]/i, | ||
/\b(?:sony)?sgp\w+(?: bui|\))/i | ||
|
@@ -488,7 +491,7 @@ | |
|
||
// ZTE | ||
/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, | ||
/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony | ||
/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony | ||
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [ | ||
|
||
// Acer | ||
|
@@ -502,7 +505,7 @@ | |
|
||
// Sharp | ||
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i | ||
], [MODEL, [VENDOR, 'Sharp'], [TYPE, MOBILE]], [ | ||
], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [ | ||
|
||
// MIXED | ||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, | ||
|
@@ -614,8 +617,13 @@ | |
], [[MODEL, CHROME+'cast'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [ | ||
/droid.+aft(\w)( bui|\))/i // Fire TV | ||
], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [ | ||
/\(dtv[\);].+(aquos)/i // Sharp | ||
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [ | ||
/\(dtv[\);].+(aquos)/i, | ||
/(aquos-tv[\w ]+)\)/i // Sharp | ||
], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[ | ||
/(bravia[\w ]+)( bui|\))/i // Sony | ||
], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [ | ||
/(mitv-\w{5}) bui/i // Xiaomi | ||
], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [ | ||
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku | ||
/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i // HbbTV devices | ||
], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [ | ||
|
@@ -652,7 +660,7 @@ | |
], [MODEL, [TYPE, TABLET]], [ | ||
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet | ||
], [[TYPE, TABLET]], [ | ||
/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile | ||
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile | ||
], [[TYPE, MOBILE]], [ | ||
/(android[-\w\. ]{0,9});.+buil/i // Generic Android Device | ||
], [MODEL, [VENDOR, 'Generic']] | ||
|
@@ -698,7 +706,7 @@ | |
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [ | ||
|
||
// Mobile OSes | ||
/droid ([\w\.]+)\b.+(android[- ]x86)/i // Android-x86 | ||
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS | ||
], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS | ||
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, | ||
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry | ||
|
Oops, something went wrong.