Skip to content

Commit a2b2e80

Browse files
committed
Update patch version to 1.0.32 as a mirror of 0.7.32
2 parents 1bf1c73 + d11fc47 commit a2b2e80

File tree

12 files changed

+451
-50
lines changed

12 files changed

+451
-50
lines changed

.github/workflows/run-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: ua-parser-js-run-test
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
run-test:
710
runs-on: ubuntu-latest

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ua-parser-js",
3-
"version": "1.0.2",
3+
"version": "1.0.32",
44
"authors": [
55
"Faisal Salman <[email protected]>"
66
],

dist/ua-parser.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ua-parser.pack.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'faisalman:ua-parser-js',
3-
version: '1.0.2',
3+
version: '1.0.32',
44
summary: 'Lightweight JavaScript-based user-agent string parser',
55
git: 'https://github.com/faisalman/ua-parser-js.git',
66
documentation: 'readme.md'

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "UAParser.js",
33
"name": "ua-parser-js",
4-
"version": "1.0.2",
4+
"version": "1.0.32",
55
"author": "Faisal Salman <[email protected]> (http://faisalman.com)",
66
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment",
77
"keywords": [
@@ -141,6 +141,10 @@
141141
"Zach Bjornson <[email protected]>"
142142
],
143143
"main": "src/ua-parser.js",
144+
"files": [
145+
"dist",
146+
"src"
147+
],
144148
"scripts": {
145149
"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",
146150
"test": "jshint src/ua-parser.js && mocha -R nyan test/test.js",

readme.md

Lines changed: 72 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,60 @@ JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model fro
1919
* Source : https://github.com/faisalman/ua-parser-js
2020

2121
# Documentation
22+
### UAParser([user-agent][,extensions])
23+
typeof `user-agent` "string".
24+
25+
typeof `extensions` "array".
26+
27+
In The Browser environment you dont need to pass the user-agent string to the function, you can just call the funtion and it should automatically get the string from the `window.navigator.userAgent`, but that is not the case in nodejs. The user-agent string must be passed in nodejs for the function to work.
28+
Usually you can find the user agent in:
29+
`request.headers["user-agent"]`.
2230

23-
## Constructor
2431

32+
## Constructor
33+
When you call `UAParser` with the `new` keyword `UAParser` will return a new instance with an empty result object, you have to call one of the available methods to get the information from the user-agent string.
34+
Like so:
2535
* `new UAParser([uastring][,extensions])`
26-
* returns new instance
36+
```js
37+
let parser = new UAParser("user-agent"); // you need to pass the user-agent for nodejs
38+
console.log(parser); // {}
39+
let parserResults = parser.getResults();
40+
console.log(parserResults);
41+
/** {
42+
"ua": "",
43+
"browser": {},
44+
"engine": {},
45+
"os": {},
46+
"device": {},
47+
"cpu": {}
48+
} */
49+
```
2750

51+
When you call UAParser without the `new` keyword, it will automatically call `getResults()` function and return the parsed results.
2852
* `UAParser([uastring][,extensions])`
2953
* returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
3054

3155
## Methods
3256

57+
#### Methods table
58+
The methods are self explanatory, here's a small overview on all the available methods:
59+
* `getResult()` - returns all function object calls, user-agent string, browser info, cpu, device, engine, os:
60+
`{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`.
61+
62+
* `getBrowser()` - returns the browser name and version.
63+
* `getDevice()` - returns the device model, type, vendor.
64+
* `getEngine()` - returns the current browser engine name and version.
65+
* `getOS()` - returns the running operating system name and version.
66+
* `getCPU()` - returns CPU architectural design name.
67+
* `getUA()` - returns the user-agent string.
68+
* `setUA(user-agent)` - set a custom user-agent to be parsed.
69+
70+
71+
---
72+
73+
* `getResult()`
74+
* returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
75+
3376
* `getBrowser()`
3477
* returns `{ name: '', version: '' }`
3578

@@ -38,17 +81,18 @@ JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model fro
3881
2345Explorer, 360 Browser, Amaya, Android Browser, Arora, Avant, Avast, AVG,
3982
BIDUBrowser, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera,
4083
Chrome Headless, Chrome WebView, Chrome, Chromium, Comodo Dragon, Dillo,
41-
Dolphin, Doris, Edge, Electron, Epiphany, Facebook, Falkon, Fennec, Firebird,
42-
Firefox [Reality], Flock, Flow, GSA, GoBrowser, ICE Browser, IE, IEMobile, IceApe,
43-
IceCat, IceDragon, Iceweasel, Instagram, Iridium, Iron, Jasmine, K-Meleon,
44-
Kindle, Klar, Konqueror, LBBROWSER, Line, Links, Lunascape, Lynx, MIUI Browser,
45-
Maemo Browser, Maemo, Maxthon, MetaSr Midori, Minimo, Mobile Safari, Mosaic,
46-
Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Obigo, Oculus Browser,
47-
OmniWeb, Opera Coast, Opera [Mini/Mobi/Tablet], PaleMoon, PhantomJS, Phoenix,
48-
Polaris, Puffin, QQ, QQBrowser, QQBrowserLite, Quark, QupZilla, RockMelt, Safari,
49-
Sailfish Browser, Samsung Browser, SeaMonkey, Silk, Skyfire, Sleipnir, Slim,
50-
SlimBrowser, Swiftfox, Tesla, Tizen Browser, UCBrowser, UP.Browser, Vivaldi,
51-
Waterfox, WeChat, Weibo, Yandex, baidu, iCab, w3m, Whale Browser...
84+
Dolphin, Doris, DuckDuckGo, Edge, Electron, Epiphany, Facebook, Falkon, Fennec,
85+
Firebird, Firefox [Focus/Reality], Flock, Flow, GSA, GoBrowser, Huawei Browser,
86+
ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon, Iceweasel, Instagram,
87+
Iridium, Iron, Jasmine, K-Meleon, Kindle, Klar, Konqueror, LBBROWSER, Line,
88+
LinkedIn, Links, Lunascape, Lynx, MIUI Browser, Maemo Browser, Maemo, Maxthon,
89+
MetaSr Midori, Minimo, Mobile Safari, Mosaic, Mozilla, NetFront, NetSurf, Netfront,
90+
Netscape, NokiaBrowser, Obigo, Oculus Browser, OmniWeb, Opera Coast,
91+
Opera [Mini/Mobi/Tablet], PaleMoon, PhantomJS, Phoenix, Polaris, Puffin, QQ,
92+
QQBrowser, QQBrowserLite, Quark, QupZilla, RockMelt, Safari, Sailfish Browser,
93+
Samsung Browser, SeaMonkey, Silk, Skyfire, Sleipnir, Slim, SlimBrowser, Swiftfox,
94+
Tesla, Tizen Browser, UCBrowser, UP.Browser, Vivaldi, Waterfox, WeChat, Weibo,
95+
Yandex, baidu, iCab, w3m, Whale Browser...
5296

5397
# 'browser.version' determined dynamically
5498
```
@@ -60,6 +104,13 @@ Waterfox, WeChat, Weibo, Yandex, baidu, iCab, w3m, Whale Browser...
60104
# Possible 'device.type':
61105
console, mobile, tablet, smarttv, wearable, embedded
62106

107+
##########
108+
# NOTE: 'desktop' is not a possible device type.
109+
# UAParser only reports info directly available from the UA string, which is not the case for 'desktop' device type.
110+
# If you wish to detect desktop devices, you must handle the needed logic yourself.
111+
# You can read more about it in this issue: https://github.com/faisalman/ua-parser-js/issues/182
112+
##########
113+
63114
# Possible 'device.vendor':
64115
Acer, Alcatel, Amazon, Apple, Archos, ASUS, AT&T, BenQ, BlackBerry, Dell,
65116
Essential, Fairphone, GeeksPhone, Google, HP, HTC, Huawei, Jolla, Lenovo, LG,
@@ -88,11 +139,12 @@ NetSurf, Presto, Tasman, Trident, w3m, WebKit
88139
# Possible 'os.name'
89140
AIX, Amiga OS, Android[-x86], Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
90141
Contiki, Fedora, Firefox OS, FreeBSD, Debian, Deepin, DragonFly, elementary OS,
91-
Fuchsia, Gentoo, GhostBSD, GNU, Haiku, HP-UX, Hurd, iOS, Joli, KaiOS, Linpus, Linspire,
92-
Linux, Mac OS, Maemo, Mageia, Mandriva, Manjaro, MeeGo, Minix, Mint, Morph OS, NetBSD,
93-
Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD, PCLinuxOS, Plan9, PlayStation, QNX,
94-
Raspbian, RedHat, RIM Tablet OS, RISC OS, Sabayon, Sailfish, Series40, Slackware, Solaris,
95-
SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk, ...
142+
Fuchsia, Gentoo, GhostBSD, GNU, Haiku, HarmonyOS, HP-UX, Hurd, iOS, Joli, KaiOS,
143+
Linpus, Linspire,Linux, Mac OS, Maemo, Mageia, Mandriva, Manjaro, MeeGo, Minix,
144+
Mint, Morph OS, NetBSD, Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD, PCLinuxOS,
145+
Plan9, PlayStation, QNX, Raspbian, RedHat, RIM Tablet OS, RISC OS, Sabayon,
146+
Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, Unix,
147+
VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk, ...
96148

97149
# 'os.version' determined dynamically
98150
```
@@ -105,9 +157,6 @@ SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux, WebOS, Windows [Phone/Mobile],
105157
68k, amd64, arm[64/hf], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64]
106158
```
107159

108-
* `getResult()`
109-
* returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
110-
111160
* `getUA()`
112161
* returns UA string of current instance
113162

@@ -191,6 +240,8 @@ SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux, WebOS, Windows [Phone/Mobile],
191240

192241
## Using node.js
193242

243+
Note: Device information is not available in the NodeJS environment.
244+
194245
```sh
195246
$ npm install ua-parser-js
196247
```

src/ua-parser.js

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/////////////////////////////////////////////////////////////////////////////////
2-
/* UAParser.js v1.0.2
2+
/* UAParser.js v1.0.32
33
Copyright © 2012-2021 Faisal Salman <[email protected]>
44
MIT License *//*
55
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
@@ -17,7 +17,7 @@
1717
/////////////
1818

1919

20-
var LIBVERSION = '1.0.2',
20+
var LIBVERSION = '1.0.32',
2121
EMPTY = '',
2222
UNKNOWN = '?',
2323
FUNC_TYPE = 'function',
@@ -37,7 +37,7 @@
3737
SMARTTV = 'smarttv',
3838
WEARABLE = 'wearable',
3939
EMBEDDED = 'embedded',
40-
UA_MAX_LENGTH = 255;
40+
UA_MAX_LENGTH = 350;
4141

4242
var AMAZON = 'Amazon',
4343
APPLE = 'Apple',
@@ -54,6 +54,7 @@
5454
MOTOROLA = 'Motorola',
5555
OPERA = 'Opera',
5656
SAMSUNG = 'Samsung',
57+
SHARP = 'Sharp',
5758
SONY = 'Sony',
5859
XIAOMI = 'Xiaomi',
5960
ZEBRA = 'Zebra',
@@ -231,13 +232,14 @@
231232
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
232233

233234
// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
234-
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,
235+
/(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,
235236
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
236237
/(weibo)__([\d\.]+)/i // Weibo
237238
], [NAME, VERSION], [
238239
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i // UCBrowser
239240
], [VERSION, [NAME, 'UC'+BROWSER]], [
240-
/\bqbcore\/([\w\.]+)/i // WeChat Desktop for Windows Built-in Browser
241+
/microm.+\bqbcore\/([\w\.]+)/i, // WeChat Desktop for Windows Built-in Browser
242+
/\bqbcore\/([\w\.]+).+microm/i
241243
], [VERSION, [NAME, 'WeChat(Win) Desktop']], [
242244
/micromessenger\/([\w\.]+)/i // WeChat
243245
], [VERSION, [NAME, 'WeChat']], [
@@ -265,16 +267,17 @@
265267
], [VERSION, [NAME, FIREFOX]], [
266268
/\bqihu|(qi?ho?o?|360)browser/i // 360
267269
], [[NAME, '360 '+BROWSER]], [
268-
/(oculus|samsung|sailfish)browser\/([\w\.]+)/i
269-
], [[NAME, /(.+)/, '$1 '+BROWSER], VERSION], [ // Oculus/Samsung/Sailfish Browser
270+
/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i
271+
], [[NAME, /(.+)/, '$1 '+BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/Huawei Browser
270272
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
271273
], [[NAME, /_/g, ' '], VERSION], [
272274
/(electron)\/([\w\.]+) safari/i, // Electron-based App
273275
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, // Tesla
274276
/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/Baidu App/2345 Browser
275277
], [NAME, VERSION], [
276278
/(metasr)[\/ ]?([\w\.]+)/i, // SouGouBrowser
277-
/(lbbrowser)/i // LieBao Browser
279+
/(lbbrowser)/i, // LieBao Browser
280+
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
278281
], [NAME], [
279282

280283
// WebView
@@ -299,9 +302,9 @@
299302
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia
300303
], [NAME, VERSION], [
301304

302-
/version\/([\w\.]+) .*mobile\/\w+ (safari)/i // Mobile Safari
305+
/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i // Mobile Safari
303306
], [VERSION, [NAME, 'Mobile Safari']], [
304-
/version\/([\w\.]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile
307+
/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile
305308
], [VERSION, NAME], [
306309
/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i // Safari < 3.0
307310
], [NAME, [VERSION, strMapper, oldSafariMap]], [
@@ -370,7 +373,7 @@
370373
/////////////////////////
371374

372375
// Samsung
373-
/\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
376+
/\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
374377
], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [
375378
/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,
376379
/samsung[- ]([-\w]+)/i,
@@ -389,15 +392,15 @@
389392
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
390393
], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [
391394
/(?:huawei|honor)([-\w ]+)[;\)]/i,
392-
/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i
395+
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
393396
], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [
394397

395398
// Xiaomi
396399
/\b(poco[\w ]+)(?: bui|\))/i, // Xiaomi POCO
397400
/\b; (\w+) build\/hm\1/i, // Xiaomi Hongmi 'numeric' models
398401
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, // Xiaomi Hongmi
399402
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, // Xiaomi Redmi
400-
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i // Xiaomi Mi
403+
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i // Xiaomi Mi
401404
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
402405
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i // Mi Pad tablets
403406
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [
@@ -449,7 +452,7 @@
449452
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [
450453

451454
// Sony
452-
/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
455+
/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
453456
], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [
454457
/sony tablet [ps]/i,
455458
/\b(?:sony)?sgp\w+(?: bui|\))/i
@@ -488,7 +491,7 @@
488491

489492
// ZTE
490493
/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
491-
/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
494+
/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
492495
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [
493496

494497
// Acer
@@ -502,7 +505,7 @@
502505

503506
// Sharp
504507
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
505-
], [MODEL, [VENDOR, 'Sharp'], [TYPE, MOBILE]], [
508+
], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [
506509

507510
// MIXED
508511
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,
@@ -614,8 +617,13 @@
614617
], [[MODEL, CHROME+'cast'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
615618
/droid.+aft(\w)( bui|\))/i // Fire TV
616619
], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [
617-
/\(dtv[\);].+(aquos)/i // Sharp
618-
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [
620+
/\(dtv[\);].+(aquos)/i,
621+
/(aquos-tv[\w ]+)\)/i // Sharp
622+
], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[
623+
/(bravia[\w ]+)( bui|\))/i // Sony
624+
], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [
625+
/(mitv-\w{5}) bui/i // Xiaomi
626+
], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [
619627
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku
620628
/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i // HbbTV devices
621629
], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [
@@ -652,7 +660,7 @@
652660
], [MODEL, [TYPE, TABLET]], [
653661
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
654662
], [[TYPE, TABLET]], [
655-
/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
663+
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
656664
], [[TYPE, MOBILE]], [
657665
/(android[-\w\. ]{0,9});.+buil/i // Generic Android Device
658666
], [MODEL, [VENDOR, 'Generic']]
@@ -698,7 +706,7 @@
698706
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [
699707

700708
// Mobile OSes
701-
/droid ([\w\.]+)\b.+(android[- ]x86)/i // Android-x86
709+
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS
702710
], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
703711
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
704712
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry

0 commit comments

Comments
 (0)