mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
Merge pull request #333 from brave/master
add Brave to list of browsers
This commit is contained in:
commit
41ccecadea
@ -86,6 +86,7 @@
|
||||
"sgautrea <shanegautreau@gmail.com>",
|
||||
"Shane Gautreau <sgautrea@opentext.com>",
|
||||
"Shane Thacker <shane@steadymade.com>",
|
||||
"shchotse <topal@mail.ua>",
|
||||
"Simon Eisenmann <simon@longsleep.org>",
|
||||
"Simon Lang <me@simonlang.org>",
|
||||
"Stiekel <histkc@gmail.com>",
|
||||
|
24
readme.md
24
readme.md
@ -1,6 +1,6 @@
|
||||
# UAParser.js
|
||||
|
||||
<img align="right" src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/logo.png"> A JavaScript-based User-Agent string parser. Can be used either in browser (client-side) or in node.js (server-side) environment. Also available as jQuery/Zepto plugin, Bower/Meteor package, & RequireJS/AMD module. This library aims to identify detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model, entirely from user-agent string with a relatively small footprint (~11KB when minified / ~4KB gzipped). Written in vanilla JavaScript, which means it doesn't require any other library and can be used independently. However, it's not recommended to use this library as browser detection since the result may not be more accurate than using feature detection.
|
||||
<img align="right" src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/logo.png"> A JavaScript-based User-Agent string parser. Can be used either in browser (client-side) or in node.js (server-side) environment. Also available as jQuery/Zepto plugin, Bower/Meteor package, & RequireJS/AMD module. This library aims to identify detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model, entirely from user-agent string with a relatively small footprint (~17KB when minified / ~6KB gzipped). Written in vanilla JavaScript, which means it doesn't require any other library and can be used independently. However, it's not recommended to use this library as browser detection since the result may not be more accurate than using feature detection.
|
||||
|
||||
[](https://travis-ci.org/faisalman/ua-parser-js)
|
||||
[](https://www.npmjs.com/package/ua-parser-js)
|
||||
@ -27,15 +27,19 @@
|
||||
|
||||
```
|
||||
# Possible 'browser.name':
|
||||
Amaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Bowser, Camino, Chimera,
|
||||
Chrome [WebView], Chromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge,
|
||||
Epiphany, Fennec, Firebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe,
|
||||
IceCat, IceDragon, Iceweasel, IE[Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle,
|
||||
Links, Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari,
|
||||
Mosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet],
|
||||
PhantomJS, Phoenix, Polaris, QQBrowser, QQBrowserLite, Quark, RockMelt, Silk, Skyfire,
|
||||
SeaMonkey, Sleipnir, SlimBrowser, Swiftfox, Tizen, UCBrowser, Vivaldi, w3m, Waterfox,
|
||||
WeChat, Yandex
|
||||
2345Explorer, Amaya, Android Browser, Arora, Avant, BIDUBrowser, Baidu,
|
||||
Basilisk, Blazer, Bolt, Bowser, Camino, Chimera, Chrome Headless,
|
||||
Chrome WebView, Chrome, Chromium, Comodo Dragon, Dillo, Dolphin, Doris, Edge,
|
||||
Epiphany, Facebook, Fennec, Firebird, Firefox, Flock, GSA, GoBrowser,
|
||||
ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon, Iceape, Iceweasel,
|
||||
Iridium, Iron, Jasmine, K-Meleon, Kindle, Konqueror, LBBROWSER Line, Links,
|
||||
Lunascape, Lynx, MIUI Browser, Maemo Browser, Maemo, Maxthon, MetaSr Midori,
|
||||
Minimo, Mobile Safari, Mosaic, Mozilla, NetFront, NetSurf, Netfront, Netscape,
|
||||
NokiaBrowser, Oculus Browser, OmniWeb, Opera Coast, Opera Mini, Opera Mobi,
|
||||
Opera Tablet, Opera, PaleMoon, PhantomJS, Phoenix, Polaris, Puffin, QQ,
|
||||
QQBrowser, QQBrowserLite, Quark, RockMelt, Safari, Samsung Browser, SeaMonkey,
|
||||
Silk, Skyfire, Sleipnir, Slim, SlimBrowser, Swiftfox, Tizen Browser, UCBrowser,
|
||||
Vivaldi, Waterfox, WeChat, Yandex, baidu, iCab, w3m
|
||||
|
||||
# 'browser.version' determined dynamically
|
||||
```
|
||||
|
@ -280,6 +280,9 @@
|
||||
/(micromessenger)\/([\w\.]+)/i // WeChat
|
||||
], [[NAME, 'WeChat'], VERSION], [
|
||||
|
||||
/(brave)\/([\w\.]+)/i // Brave browser
|
||||
], [[NAME, 'Brave'], VERSION], [
|
||||
|
||||
/(qqbrowserlite)\/([\w\.]+)/i // QQBrowserLite
|
||||
], [NAME, VERSION], [
|
||||
|
||||
@ -681,6 +684,8 @@
|
||||
],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [
|
||||
/android.+;\s(m[1-5]\snote)\sbuild/i // Meizu Tablet
|
||||
], [MODEL, [VENDOR, 'Meizu'], [TYPE, TABLET]], [
|
||||
/(mz)-([\w-]{2,})/i // Meizu Phone
|
||||
], [[VENDOR, 'Meizu'], MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
/android.+a000(1)\s+build/i, // OnePlus
|
||||
/android.+oneplus\s(a\d{4})\s+build/i
|
||||
|
@ -1051,7 +1051,7 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "BIDUBrowser",
|
||||
"version" : "8.7",
|
||||
"version" : "8.7",
|
||||
"major" : "8"
|
||||
}
|
||||
},
|
||||
@ -1074,5 +1074,15 @@
|
||||
"version" : "1.1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Brave Browser",
|
||||
"ua" : "Brave/4.5.16 CFNetwork/893.13.1 Darwin/17.3.0 (x86_64)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Brave",
|
||||
"version" : "4.5.16",
|
||||
"major" : "4"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -133,6 +133,26 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Meizu M3S",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux; Android 5.1; MZ-M3s Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrom/45.0.2454.94 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "Meizu",
|
||||
"model" : "M3s",
|
||||
"type" : "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Lumia 950",
|
||||
"ua" : "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "Microsoft",
|
||||
"model" : "Lumia 950",
|
||||
"type" : "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Nexus 6",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.20 Mobile Safari/537.36",
|
||||
|
Loading…
x
Reference in New Issue
Block a user