mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 22:52:16 +03:00
Compare commits
114 Commits
device-uti
...
2.0.5-pro-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b5e33681f | ||
|
|
4e8c13cbb4 | ||
|
|
3ea5721e86 | ||
|
|
a4342b01d4 | ||
|
|
31bf36c36d | ||
|
|
9bef871e41 | ||
|
|
b1d9dcafcd | ||
|
|
146f182533 | ||
|
|
ce242a362f | ||
|
|
2078b1ec92 | ||
|
|
7dcbb8def3 | ||
|
|
f810a6d1d9 | ||
|
|
0e05332609 | ||
|
|
48a1f34c28 | ||
|
|
fb1ed5cf6b | ||
|
|
3e65196b57 | ||
|
|
4e421e72fe | ||
|
|
98cf19c8c5 | ||
|
|
c9badeb345 | ||
|
|
9003fe5724 | ||
|
|
975c4860f4 | ||
|
|
647b6232bd | ||
|
|
95485f7b5d | ||
|
|
74ef71cf63 | ||
|
|
9e6dff6dc3 | ||
|
|
bf5155ec8a | ||
|
|
ecbc0336b6 | ||
|
|
ab299a23b7 | ||
|
|
3fe137e533 | ||
|
|
0bb6e24837 | ||
|
|
a19977ce4c | ||
|
|
088383b9bd | ||
|
|
c9d008e97a | ||
|
|
86b3cd37e2 | ||
|
|
a9378427ed | ||
|
|
f9836f1981 | ||
|
|
f300478bdc | ||
|
|
ee88f16620 | ||
|
|
d28d74fea7 | ||
|
|
1282175bac | ||
|
|
e312298283 | ||
|
|
5e7d0b25a3 | ||
|
|
5f1e498bec | ||
|
|
72d0c2acb3 | ||
|
|
a3549efc22 | ||
|
|
29677bcd3d | ||
|
|
64a933bae8 | ||
|
|
f51ed79118 | ||
|
|
72c59b5351 | ||
|
|
466a8b26be | ||
|
|
3d6e326f49 | ||
|
|
be16c04a33 | ||
|
|
6a2a3a61b6 | ||
|
|
14a51039aa | ||
|
|
944c1fb260 | ||
|
|
b9a710978e | ||
|
|
e069133f51 | ||
|
|
848cd1d1e4 | ||
|
|
e1216ff36b | ||
|
|
598c51c69c | ||
|
|
8ae88b6aa5 | ||
|
|
cd3bef7405 | ||
|
|
6ea2df63dc | ||
|
|
af8acf9078 | ||
|
|
6a41513df4 | ||
|
|
f93cb043f5 | ||
|
|
c6f8ba3788 | ||
|
|
f7f64a31ea | ||
|
|
8f545f9e3f | ||
|
|
2d26eada9a | ||
|
|
30c0b20c20 | ||
|
|
0cf44773b1 | ||
|
|
367eae4c85 | ||
|
|
a9b31c0f7b | ||
|
|
8a05328ce0 | ||
|
|
baeac63ebe | ||
|
|
3d41647a55 | ||
|
|
d1105ce4b3 | ||
|
|
3fccce26d0 | ||
|
|
178e678b15 | ||
|
|
056e66f6a0 | ||
|
|
d8057bcd8a | ||
|
|
837d319630 | ||
|
|
6f0191c11b | ||
|
|
5413a9888d | ||
|
|
4ea03a587d | ||
|
|
98e0708f25 | ||
|
|
51dce55e65 | ||
|
|
3ca23193dd | ||
|
|
9e64f34e72 | ||
|
|
10ab810568 | ||
|
|
e8a301265a | ||
|
|
20e874085b | ||
|
|
852520fafe | ||
|
|
6c6ff97e0c | ||
|
|
93552e0172 | ||
|
|
13d069f1c4 | ||
|
|
9cdf560e60 | ||
|
|
de871b3d37 | ||
|
|
4601953326 | ||
|
|
594b6b1399 | ||
|
|
5d603dacd7 | ||
|
|
84b41f5be7 | ||
|
|
f854f26cd6 | ||
|
|
bb1daf4e13 | ||
|
|
592bfdd33c | ||
|
|
d024fe2006 | ||
|
|
db06606acd | ||
|
|
138e6b7e55 | ||
|
|
99d59f7e4c | ||
|
|
768b622603 | ||
|
|
6f02da06e0 | ||
|
|
e6a085f710 | ||
|
|
37c61736c3 |
13
.github/workflows/test-ci.yml
vendored
13
.github/workflows/test-ci.yml
vendored
@@ -10,14 +10,19 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [amd64, ppc64le]
|
||||
arch: [amd64]
|
||||
node-version: ['22.13', 'lts/*']
|
||||
include:
|
||||
- arch: ppc64le
|
||||
node-version: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Run the test
|
||||
run: |
|
||||
echo "Running on ubuntu-latest-${{ matrix.arch }} with node version set as ${{ matrix.node-version }}"
|
||||
npm ci
|
||||
npx playwright install --with-deps
|
||||
npm test
|
||||
|
||||
122
CHANGELOG.md
122
CHANGELOG.md
@@ -65,6 +65,109 @@
|
||||
|
||||
---
|
||||
|
||||
## Version 2.0.5
|
||||
|
||||
- Add new browser: Zalo
|
||||
- Add new CPU arch: alpha
|
||||
- Add new device vendor: Philips
|
||||
- Improve device detection: Pico
|
||||
- Fix parsing error on pages with modified Array prototypes
|
||||
- Improve type declarations:
|
||||
- Replace `node-fetch` dependency with `undici`
|
||||
- Replace hardcoded string values with enum from `enum` submodule
|
||||
- `enums` submodule:
|
||||
- Add `Extension` enum for `extensions` submodule
|
||||
- Type declaration file now automatically generated using build script
|
||||
- Naming adjustments:
|
||||
- `Browser` => `BrowserName`
|
||||
- `CPU` => `CPUArch`
|
||||
- `Device` => `DeviceType`
|
||||
- `Vendor` => `DeviceVendor`
|
||||
- `Engine` => `EngineName`
|
||||
- `OS` => `OSName`
|
||||
- `extensions` submodule:
|
||||
- Add new crawlers:
|
||||
APIs-Google, Algolia Crawler, Algolia Crawler Renderscript, Baidu-ADS, BLEXBot, botify, Bravebot, Claude-Web, cohere-training-data-crawler, contxbot, Cotoyogi, Coveobot, CriteoBot, DeepSeekBot, DuckDuckGo-Favicons-Bot, Elastic, FirecrawlAgent, Freespoke, Google-CloudVertexBot, HuggingFace-Bot, Kagibot, Kangaroo Bot, marginalia, msnbot, OnCrawl, Replicate-Bot, RunPod-Bot, SBIntuitionsBot, SeekportBot, Siteimprove, Sogou Pic Spider, TikTokSpider, TwinAgent, v0bot, webzio, Webzio-Extended, xAI-Bot, YandexAccessibilityBot, YandexAdditionalBot, YandexAdNet, YandexBot MirrorDetector, YandexBlogs, YandexComBot, YandexFavicons, YandexImageResizer, YandexImages, YandexMarket, YandexMetrika, YandexMedia, YandexMobileBot, YandexMobileScreenShotBot, YandexNews, YandexOntoDB, YandexOntoDBAPI, YandexPartner, YandexRCA, YandexRenderResourcesBot, YandexScreenshotBot, YandexSpravBot, YandexTracker, YandexVertis, YandexVerticals, YandexVideo, YandexVideoParser, YandexWebmaster, YepBot, ZumBot
|
||||
- Add new fetchers:
|
||||
Asana, bitlybot, Blueno, BufferLinkPreviewBot, Chrome-Lighthouse, Gemini-Deep-Research, HubSpot Page Fetcher, kakaotalk-scrap, vercel-favicon-bot, vercel-screenshot-bot, vercelflags, verceltracing, YaDirectFetcher, YandexCalendar, YandexDirect, YandexDirectDyn, YandexForDomain, YandexPagechecker, YandexSearchShop, YandexSitelinks, YandexUserproxy
|
||||
- `helpers` submodule:
|
||||
- Add some crawler to `isAIBot()`:
|
||||
Bravebot, cohere-training-data-crawler, FirecrawlAgent, HuggingFace-Bot, Kangaroo Bot, PanguBot, Replicate-Bot, RunPod-Bot, TikTokSpider, Together-Bot, v0bot, xAI-Bot
|
||||
|
||||
## Version 2.0.4
|
||||
|
||||
- Add new browser: Edge WebView, Edge WebView2
|
||||
- Add new device vendor: Lava, Retroid, Vizio
|
||||
- Add new OS: ArcaOS, Knoppix, Xubuntu, Windows CE, Windows RT
|
||||
- Improve device detection: Google Pixel & Pixelbook Series, HMD, Infinix, LG WebOS TV, Motorola, Nothing, OnePlus, Sony, Tecno
|
||||
- Improve OS detection: AIX, Arch, Fuchsia, Haiku, HarmonyOS, Mint, MorphOS, Solaris, Windows
|
||||
- Improve `withClientHints()` browser naming adjustments: `Microsoft Edge WebView2` => `Edge WebView2`
|
||||
- Identify device that uses Firefox Reality / Wolvic as `xr`
|
||||
- Identify device with large screen as `smarttv`
|
||||
- Identify Windows CE & Windows RT as distinct OS variants
|
||||
- `extensions` submodule:
|
||||
- Remove lookbehind assertion to ensure regex compatibility
|
||||
- Add new crawlers: ChatGLM, Daum, iAskBot, Onespot, Qwantbot, Startpage
|
||||
- Add new emails: Apple's Mail, DaumMail, Polymail, ProtonMail, SparkDesktop, Zimbra, ZohoMail-Desktop
|
||||
- Add new fetchers: Iframely, MistralAI-User, Perplexity-User
|
||||
- Add new inApps: Discord, Evernote, Figma, Flipboard, Mattermost, Notion, Postman, Rambox, Rocket.Chat, Microsoft Teams, TikTok Lite, VS Code
|
||||
- Add new libraries: AdobeAIR, aiohttp, nutch, httpx, urllib3
|
||||
- `enum` submodule:
|
||||
- Fix mistakenly placed `BLU` categorized as browser name instead of device vendor
|
||||
|
||||
## Version 2.0.3
|
||||
|
||||
- Add new browser: Dooble, Ecosia, LG Browser, Otter, qutebrowser, Surf
|
||||
- Add new device: BLU, Facebook Portal TV
|
||||
- Improve device detection: Archos, LG, Meta Quest
|
||||
- Remove jazzer.js fuzz test
|
||||
- Improve `withClientHints()`:
|
||||
- Browser naming adjustments:
|
||||
- `HuaweiBrowser` => `Huawei Browser`
|
||||
- `Miui Browser` => `MIUI Browser`
|
||||
- `OperaMobile` => `Opera Mobi`
|
||||
- `YaBrowser` => `Yandex`
|
||||
- `extensions` submodule:
|
||||
- Add new Crawler: AdIdxBot, Linespider, LinkedInBot, OpenAI Image Downloader, SemrushBot, Yahoo! Slurp
|
||||
- Add new Fetcher: Better Uptime Bot, Google-PageRenderer, GoogleImageProxy, MicrosoftPreview, Snap URL Preview, SkypeUriPreview, TelegramBot
|
||||
- Add new Vehicles: BMW, Jeep
|
||||
- Add OS detection of WhatsApp user-agent
|
||||
|
||||
## Version 2.0.2
|
||||
|
||||
- Fix TypeScript dependency issue
|
||||
|
||||
## Version 2.0.1
|
||||
|
||||
- Add new browser: Ladybird, Daum
|
||||
- Add new device: Apple HomePod
|
||||
- Add new device vendor: HMD
|
||||
- Add new OS: Ubuntu Touch, Windows IoT
|
||||
- Improve CPU detection: ARM, x86
|
||||
- Improve device detection: Lenovo, Nokia, Nvidia, Xiaomi
|
||||
- Tablet: Google, Honor, Huawei, Infinix, Nokia, OnePlus, Xiaomi
|
||||
- Wearable: Asus, Google, LG, Motorola, OnePlus, Oppo, Samsung, Sony
|
||||
- Smart-TV: Xiaomi, unidentified vendors
|
||||
- Improve detection for unknown VR devices
|
||||
- Improve device model detection for Generic devices
|
||||
- Improve OS detection: Linux, Symbian
|
||||
- Improve TypeScript definitions for Headers
|
||||
- Improve `withClientHints()`:
|
||||
- `engine.version` also get updated
|
||||
- Infer `device.vendor` & `device.type` by guessing from `device.model`
|
||||
- Browser naming adjustments:
|
||||
- `Google Chrome` => `Chrome`
|
||||
- `Microsoft Edge` => `Edge`
|
||||
- `Android WebView` => `Chrome WebView`
|
||||
- `HeadlessChrome` => `Chrome Headless`
|
||||
- `enums` submodule:
|
||||
- Add TypeScript definitions
|
||||
- `extensions` submodule:
|
||||
- Add new list:
|
||||
- `Vehicles`: BYD, Rivian, Volvo
|
||||
- Add new Fetcher: Bluesky
|
||||
- Add new Library: Apache-HttpClient, go-http-client, got, GuzzleHttp, Java-http-client, libwww-perl, lua-resty-http, Needle, OkHttp, node-fetch, PHP-SOAP, PostmanRuntime, superagent
|
||||
|
||||
## Version 2.0.0
|
||||
|
||||
- `ua-parser-js/extensions` submodule:
|
||||
@@ -166,6 +269,25 @@
|
||||
|
||||
---
|
||||
|
||||
## Version 0.7.41 / 1.0.41
|
||||
- Add new browser: Daum, Ladybird
|
||||
- Add new device vendor: HMD
|
||||
- Add new engine: LibWeb
|
||||
- Add new os: Windows IoT, Ubuntu Touch
|
||||
- Improve cpu detection: ARM, x86
|
||||
- Improve device vendor detection: Apple, Archos, Generic, Google, Honor, Huawei, Infinix, Nvidia, Lenovo, Nokia, OnePlus, Xiaomi
|
||||
- Improve device type detection: smarttv, wearables
|
||||
- Improve os detection: Linux, Symbian
|
||||
|
||||
## Version 0.7.40 / 1.0.40
|
||||
- Add new browser: 115, LibreWolf, Slimboat, Slimjet
|
||||
- Add new device: Advan, Cat, Energizer, IMO, Micromax, Smartfren
|
||||
- Add new engine: ArkWeb, Servo
|
||||
- Add new os: OpenHarmony
|
||||
- Improve browser detection: 2345, 360, Dragon, Iron, Maxthon
|
||||
- Recognize Honor as a separate device vendor from Huawei
|
||||
- Fix Python Request mistakenly identified as Meta Quest
|
||||
|
||||
## Version 0.7.39 / 1.0.39
|
||||
- Add new feature: executable command using `npx ua-parser-js "[INSERT-UA-HERE]"`
|
||||
- Add new browser: Helio, Pico Browser, Wolvic
|
||||
|
||||
685
LICENSE.md
685
LICENSE.md
@@ -1,616 +1,73 @@
|
||||
# GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
## Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains
|
||||
free software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing
|
||||
under this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
## TERMS AND CONDITIONS
|
||||
|
||||
### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
### 13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your
|
||||
version supports such interaction) an opportunity to receive the
|
||||
Corresponding Source of your version by providing access to the
|
||||
Corresponding Source from a network server at no charge, through some
|
||||
standard or customary means of facilitating copying of software. This
|
||||
Corresponding Source shall include the Corresponding Source for any
|
||||
work covered by version 3 of the GNU General Public License that is
|
||||
incorporated pursuant to the following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Affero General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever
|
||||
published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
# UAPARSER.JS PRO PERSONAL LICENSE
|
||||
|
||||
Version 2, July 2024
|
||||
|
||||
Copyright (C) 2023-2024 Faisal Salman <f+ua-parser-js@faisalman.com>
|
||||
|
||||
---
|
||||
|
||||
## Definitions
|
||||
|
||||
"We" are the team behind UAParser.js.
|
||||
|
||||
"You" are the individual who is responsible for purchasing this license.
|
||||
|
||||
"The Code" is UAParser.js.
|
||||
|
||||
"Project" is what you built with The Code.
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
We retain all title, intellectual property, and ownership rights to The Code.
|
||||
|
||||
The Code is licensed, not sold, to You for use solely subject to the terms and conditions detailed here.
|
||||
|
||||
We grant You (and only You) a personal, limited, non-exclusive, non-transferable, non-sublicensable, royalty-free right to use, copy, and modify The Code.
|
||||
|
||||
This license is only valid for You as one (1) individual and cannot be transferred to another individual or organization.
|
||||
|
||||
---
|
||||
|
||||
## Rights
|
||||
|
||||
You may use and modify The Code to create as many personal, hobby, educational, and other non-profit projects as you want for yourself.
|
||||
|
||||
You may create any number of copies of The Code for yourself.
|
||||
|
||||
You have the right to get lifetime updates and one (1) year of support, starting from the time you make the purchase.
|
||||
|
||||
---
|
||||
|
||||
## Restrictions
|
||||
|
||||
You may not use or modify The Code in such a way that it may be used directly for commercial purposes.
|
||||
|
||||
You may not redistribute The Code, as-is or modified, except as a part of a Project that you made for yourself.
|
||||
|
||||
You may not deliver a Project that contains The Code as an open-source Project that might be used for commercial purposes by the general public, except with our written consent.
|
||||
|
||||
You may not use The Code for unlawful, inappropriate, illegal, or offensive purposes.
|
||||
|
||||
---
|
||||
|
||||
## Limitations
|
||||
|
||||
The Code is provided 'as is' without warranty of any kind, expressed or implied.
|
||||
|
||||
We shall not be liable for any damages, including but not limited to, direct, indirect, special, incidental, or consequential damages or losses that occur by the use of The Code.
|
||||
|
||||
We reserve the right to discontinue the lifetime updates for The Code at any time, with or without notice.
|
||||
|
||||
We offer support only for questions within the scope of The Code's functionality or related issues at our sole discretion.
|
||||
|
||||
---
|
||||
|
||||
## Termination
|
||||
|
||||
This license is effective indefinitely but can be revoked at any time if there is a violation of any of the terms.
|
||||
|
||||
---
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
247
README.md
247
README.md
@@ -1,242 +1,29 @@
|
||||
[](https://uaparser.dev)
|
||||
[](https://uaparser.dev)
|
||||
[](https://uaparser.dev)
|
||||
[](https://uaparser.dev)
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/dw/ua-parser-js?color=red&logo=npm&label=NPM%20DOWNLOADS&style=for-the-badge"></a>
|
||||
<a href="https://www.jsdelivr.com/package/npm/ua-parser-js"><img src="https://img.shields.io/jsdelivr/gh/hw/faisalman/ua-parser-js?logo=jsdelivr&style=for-the-badge"></a>
|
||||
<a href="https://github.com/faisalman/ua-parser-js"><img src="https://img.shields.io/github/stars/faisalman/ua-parser-js?color=yellow&logo=github&style=for-the-badge"></a>
|
||||
<a href="https://bundlephobia.com/package/ua-parser-js@1.0.35"><img src="https://img.shields.io/bundlephobia/minzip/ua-parser-js?logo=hackthebox&logoColor=white&style=for-the-badge"/></a>
|
||||
<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors"><img src="https://img.shields.io/github/contributors/faisalman/ua-parser-js?color=purple&logo=githubsponsors&style=for-the-badge"></a>
|
||||
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/v/ua-parser-js.svg?logo=npm&color=red&style=for-the-badge"></a>
|
||||
<a href="https://cdnjs.com/libraries/UAParser.js"><img src="https://img.shields.io/cdnjs/v/UAParser.js.svg?color=orange&style=for-the-badge"></a>
|
||||
<img src="https://img.shields.io/ossf-scorecard/github.com/faisalman/ua-parser-js?label=openssf%20scorecard&style=for-the-badge">
|
||||
</p>
|
||||
# UAParser.js PRO Personal License
|
||||
|
||||
# UAParser.js
|
||||
Thank you for choosing the UAParser.js PRO Personal License.
|
||||
|
||||
The most comprehensive, compact, & up-to-date isomorphic JavaScript library to detect
|
||||
user's Browser, Engine, OS, CPU, and Device type/model. Runs either in browser
|
||||
(client-side) or node.js (server-side).
|
||||
Please be aware that using this package without a valid license purchase is strictly prohibited and constitutes a violation of applicable copyright laws.
|
||||
|
||||
# Demo
|
||||
An exception applies if the package is used solely as a part of a product developed by a valid license holder, in accordance with their license terms.
|
||||
|
||||
* Live demo: https://uaparser.dev
|
||||
If you have not yet purchased a license, you may do so at https://store.faisalman.com.
|
||||
|
||||
# Download
|
||||
|
||||
```sh
|
||||
npm install @ua-parser-js/pro-personal
|
||||
```
|
||||
|
||||
# Documentation
|
||||
|
||||
* `version 1.x` : https://github.com/faisalman/ua-parser-js/tree/1.0.x#documentation
|
||||
* `version 2.x` : https://docs.uaparser.dev
|
||||
https://docs.uaparser.dev
|
||||
|
||||
Before upgrading from `v0.7` / `v1.0`, please read [CHANGELOG](CHANGELOG.md) to
|
||||
see what's new & breaking.
|
||||
```js
|
||||
import { UAParser } from '@ua-parser-js/pro-personal';
|
||||
```
|
||||
|
||||
# License Options
|
||||
# License
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="2">Open-Source Editions</th>
|
||||
<th colspan="3">PRO / Commercial Editions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>License options</td>
|
||||
<td>MIT (v0.7~v1.0)</td>
|
||||
<td>AGPL (>=v2.0)</td>
|
||||
<td>PRO Personal</td>
|
||||
<td>PRO Business</td>
|
||||
<td>PRO Enterprise</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Browser detection</td>
|
||||
<td><a href="#demo" title="Basic detection">⚠️</a></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CPU detection</td>
|
||||
<td><a href="#demo" title="Basic detection">⚠️</a></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Device detection</td>
|
||||
<td><a href="#demo" title="Basic detection">⚠️</a></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Engine detection</td>
|
||||
<td><a href="#demo" title="Basic detection">⚠️</a></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OS detection</td>
|
||||
<td><a href="#demo" title="Basic detection">⚠️</a></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bot detection</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AI Bot detection</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extras (Apps, Libs, Emails, Media Players, etc) detection</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Enhanced detection result</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Client Hints support</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CommonJS support</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ES modules support</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>npm module</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TypeScript declarations</td>
|
||||
<td><a href="#demo" title="Community version">⚠️</a></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Allows commercial use</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Permissive (non-copyleft) license</td>
|
||||
<td>✅</td>
|
||||
<td><strong title="Copyleft license">❌</strong></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unlimited use per 1 license</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td><strong title="1 project per 1 license">❌</strong></td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1-year product support</td>
|
||||
<td>❌</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lifetime updates</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Price</td>
|
||||
<td><strong title="Pay as you want">FREE (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/1.0.x/license.md">License</a>)</strong></td>
|
||||
<td><strong title="Pay as you want">FREE (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/master/LICENSE.md">License</a>)</strong></td>
|
||||
<td><strong title="$14 (one-time fee)">$14 (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/pro-personal/LICENSE.md">License</a>)</strong></td>
|
||||
<td><strong title="$29 (one-time fee)">$29 (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/pro-business/LICENSE.md">License</a>)</strong></td>
|
||||
<td><strong title="$599 (one-time fee)">$599 (<a target="_blank" href="https://raw.githubusercontent.com/faisalman/ua-parser-js/pro-enterprise/LICENSE.md">License</a>)</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th align="right" colspan="6">
|
||||
<h3><a target="_blank" href="https://store.faisalman.com/checkout/buy/e236ea87-9b2b-400e-9683-24367f731b35"> GET THE PRO PACKAGES 📥</a></h3>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
UAParser.js PRO Personal
|
||||
|
||||
# Development
|
||||
|
||||
## Contributors
|
||||
|
||||
Please read [CONTRIBUTING](CONTRIBUTING.md) guide first for the instruction details.
|
||||
|
||||
<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=faisalman/ua-parser-js" />
|
||||
</a>
|
||||
|
||||
Made with [contributors-img](https://contrib.rocks).
|
||||
|
||||
## Backers & Sponsors
|
||||
|
||||
<a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/organizations.svg?avatarHeight=64"></a>
|
||||
<a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/individuals.svg?avatarHeight=64"></a>
|
||||
|
||||
Support the open-source editions of UAParser.js on [OpenCollective](https://opencollective.com/ua-parser-js) or [GitHub Sponsors](https://github.com/sponsors/faisalman).
|
||||
Copyright (c) 2023-2024 Faisal Salman <<f@faisalman.com>>
|
||||
|
||||
8
dist/ua-parser.min.js
vendored
8
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/ua-parser.min.mjs
vendored
Normal file
4
dist/ua-parser.min.mjs
vendored
Normal file
File diff suppressed because one or more lines are too long
8
dist/ua-parser.pack.js
vendored
8
dist/ua-parser.pack.js
vendored
File diff suppressed because one or more lines are too long
4
dist/ua-parser.pack.mjs
vendored
Normal file
4
dist/ua-parser.pack.mjs
vendored
Normal file
File diff suppressed because one or more lines are too long
1742
package-lock.json
generated
1742
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"title": "UAParser.js",
|
||||
"name": "ua-parser-js",
|
||||
"version": "2.0.0",
|
||||
"title": "UAParser.js PRO Personal",
|
||||
"name": "@ua-parser-js/pro-personal",
|
||||
"version": "2.0.5",
|
||||
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
|
||||
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment",
|
||||
"keywords": [
|
||||
@@ -25,14 +25,17 @@
|
||||
"contributors": [
|
||||
"Aamir Poonawalla <aamir@urx.com>",
|
||||
"Admas <mollases@users.noreply.github.com>",
|
||||
"Aiyush <aiyushdhar85@gmail.com>",
|
||||
"algenon <m@antonz.ru>",
|
||||
"Alvin Portillo <alvin@8thwall.com>",
|
||||
"Amumu <yoyo837@hotmail.com>",
|
||||
"Andreas Kogler <andreas.kogler@bitmovin.com>",
|
||||
"Andrea Vaghi <andrea.vaghi@jobrapido.com>",
|
||||
"Anton Zhiyanov <m@antonz.ru>",
|
||||
"Arturo Mejia <amejia@blim.com>",
|
||||
"Arun Rama Reddy <arunramareddy@gmail.com>",
|
||||
"Austin Pray <austin@austinpray.com>",
|
||||
"Beat YT <66485277+Beat-YT@users.noreply.github.com>",
|
||||
"Bendeguz <symunona@gmail.com>",
|
||||
"Benjamin Bertrand <bertrand.design@gmail.com>",
|
||||
"Benjamin Urban <benjamin.urban@sueddeutsche.de>",
|
||||
@@ -44,6 +47,8 @@
|
||||
"chenyuan-new <53860479+chenyuan-new@users.noreply.github.com>",
|
||||
"Christopher De Cairos <chris.decairos@gmail.com>",
|
||||
"Cyrille David <cyrille@qonto.eu>",
|
||||
"Dai Jie <daijie@php.net>",
|
||||
"Danila Rodichkin <daniluk4000@outlook.com>",
|
||||
"Dante <duanjl.china@gmail.com>",
|
||||
"Dario Vladovic <d.vladimyr@gmail.com>",
|
||||
"David Annez <david.annez@gmail.com>",
|
||||
@@ -73,11 +78,15 @@
|
||||
"Grigory Dmitrenko <grigory@snsk.ru>",
|
||||
"gulpin <gulping.gulpin@gmail.com>",
|
||||
"Hans Ott <hansott@hotmail.be>",
|
||||
"Harald Reingruber <74898239+haraldreingruber-dedalus@users.noreply.github.com>",
|
||||
"Hendrik Helwich <h.helwich@iplabs.de>",
|
||||
"Hermann Ebert <ebbmo@HE.local>",
|
||||
"hr6r <hedian@gmail.com>",
|
||||
"Hyewon Kang <gpffps369@gmail.com>",
|
||||
"Hyunbin <47051820+hyunbinseo@users.noreply.github.com>",
|
||||
"Igor Topal <i.topal@smartweb.com.ua>",
|
||||
"Ildar Kamalov <i.kamalov@adguard.com>",
|
||||
"Ilya Daraseliya <idarase@gmail.com>",
|
||||
"insanehong <insane.hong@navercorp.com>",
|
||||
"jackpoll <jackpoll123456@gmail.com>",
|
||||
"Jacky Choo <jackychoo@adly-macbook.local>",
|
||||
@@ -98,6 +107,7 @@
|
||||
"Liam Quinn <lquinn@blackberry.com>",
|
||||
"Lithin <lithin@webklipper.com>",
|
||||
"liujunlve <liujunlve@henhaoji.com>",
|
||||
"lj0812 <xoyljlj@163.com>",
|
||||
"ll-syber <670159357@qq.com>",
|
||||
"Loris Guignard <loris.guignard@gmail.com>",
|
||||
"Lukas Drgon <lukas.drgon@gmail.com>",
|
||||
@@ -111,6 +121,7 @@
|
||||
"Max Maurer <maxemanuel.maurer@gmail.com>",
|
||||
"Max Nordlund <max.nordlund@gmail.com>",
|
||||
"Michael Hess <mhess@connectify.me>",
|
||||
"Mike <mikehuebner@me.com>",
|
||||
"MimyyK <michele.marais@hakisa.com>",
|
||||
"Mok <mok@moekm.com>",
|
||||
"nabetama <mao.nabeta@gmail.com>",
|
||||
@@ -124,6 +135,7 @@
|
||||
"o.drapeza <o.drapeza@tinkoff.ru>",
|
||||
"Oscar Becerra <oscarbecerra@google.com>",
|
||||
"otakuSiD <otakusid@gmail.com>",
|
||||
"Pablo Osés <opablo@gmail.com>",
|
||||
"Paris Morgan <paris@8thwall.com>",
|
||||
"patrick-nurt <github@pereira.dk>",
|
||||
"Pavel Studeny <studeny@avast.com>",
|
||||
@@ -209,33 +221,30 @@
|
||||
"test:jshint": "jshint src/main",
|
||||
"test:lockfile-lint": "npx lockfile-lint -p package-lock.json",
|
||||
"test:mocha": "mocha test/unit",
|
||||
"test:playwright": "playwright test test/e2e --browser all"
|
||||
"test:playwright": "npx playwright install && playwright test test/e2e --browser all"
|
||||
},
|
||||
"dependencies": {
|
||||
"detect-europe-js": "^0.1.2",
|
||||
"is-standalone-pwa": "^0.1.1",
|
||||
"ua-is-frozen": "^0.1.2"
|
||||
"ua-is-frozen": "^0.1.2",
|
||||
"undici": "^7.12.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/parser": "7.15.8",
|
||||
"@babel/traverse": "7.23.2",
|
||||
"@jazzer.js/core": "^1.4.0",
|
||||
"@playwright/test": "^1.49.0",
|
||||
"@types/node": "^22.9.1",
|
||||
"@types/node-fetch": "^2.6.12",
|
||||
"jshint": "~2.13.6",
|
||||
"mocha": "~8.2.0",
|
||||
"node-fetch": "^2.7.0",
|
||||
"requirejs": "2.3.2",
|
||||
"safe-regex": "^2.1.1",
|
||||
"tsd": "^0.29.0",
|
||||
"uglify-js": "~3.12.0"
|
||||
"uglify-js": "~3.19.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/faisalman/ua-parser-js.git"
|
||||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
|
||||
@@ -4,10 +4,20 @@ SRC_PATH="src/main/ua-parser.js"
|
||||
MIN_PATH="dist/ua-parser.min.js"
|
||||
PACK_PATH="dist/ua-parser.pack.js"
|
||||
|
||||
SRC_PATH_MJS="src/main/ua-parser.mjs"
|
||||
MIN_PATH_MJS="dist/ua-parser.min.mjs"
|
||||
PACK_PATH_MJS="dist/ua-parser.pack.mjs"
|
||||
|
||||
# minified
|
||||
echo "Generate ${MIN_PATH}"
|
||||
uglifyjs $SRC_PATH -o $MIN_PATH --comments "/^ UA/"
|
||||
|
||||
echo "Generate ${MIN_PATH_MJS}"
|
||||
uglifyjs $SRC_PATH_MJS -o $MIN_PATH_MJS --comments "/^ UA/" --module
|
||||
|
||||
# packed
|
||||
echo "Generate ${PACK_PATH}"
|
||||
uglifyjs $SRC_PATH -o $PACK_PATH --comments "/^ UA/" --compress --mangle
|
||||
uglifyjs $SRC_PATH -o $PACK_PATH --comments "/^ UA/" --compress --mangle
|
||||
|
||||
echo "Generate ${PACK_PATH_MJS}"
|
||||
uglifyjs $SRC_PATH_MJS -o $PACK_PATH_MJS --comments "/^ UA/" --compress --mangle --module
|
||||
@@ -2,15 +2,18 @@
|
||||
/* jshint esversion: 6 */
|
||||
const fs = require('fs');
|
||||
|
||||
const generateMJS = (module) => {
|
||||
let { src, dest, title, replacements } = module;
|
||||
let text = fs.readFileSync(src, 'utf-8');
|
||||
|
||||
replacements.push(
|
||||
const defaultReplacements = {
|
||||
mjs: [
|
||||
[/const (.+?)\s*=\s*require\(\'\.(.+)\'\)/ig, 'import $1 from \'\.$2.mjs\''],
|
||||
[/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2\''],
|
||||
[/module\.exports =/ig, 'export']
|
||||
);
|
||||
]
|
||||
}
|
||||
|
||||
const generateFile = (module) => {
|
||||
let { src, dest, title, replacements } = module;
|
||||
let text = fs.readFileSync(src, 'utf-8');
|
||||
|
||||
replacements.forEach(rep => {
|
||||
text = text.replace(rep[0], rep[1]);
|
||||
});
|
||||
@@ -18,42 +21,54 @@ const generateMJS = (module) => {
|
||||
console.log(`Generate ${dest}`);
|
||||
|
||||
fs.writeFileSync(dest,
|
||||
`// Generated ESM version of ${title}
|
||||
`// ${title}
|
||||
// DO NOT EDIT THIS FILE!
|
||||
// Source: /${src}
|
||||
|
||||
${text}`, 'utf-8');
|
||||
|
||||
};
|
||||
|
||||
const modules = [
|
||||
const files = [
|
||||
{
|
||||
src : 'src/main/ua-parser.js',
|
||||
dest : 'src/main/ua-parser.mjs',
|
||||
title : 'ua-parser-js',
|
||||
title : 'Generated ESM version of ua-parser-js',
|
||||
replacements : [
|
||||
[/\(func[\s\S]+strict\';/ig, ''],
|
||||
[/esversion\: 3/ig, 'esversion: 6'],
|
||||
[/\/[\/\s]+export[\s\S]+/ig,'export {UAParser};']
|
||||
[/\/[\/\s]+export[\s\S]+/ig,'export {UAParser};'],
|
||||
...defaultReplacements.mjs
|
||||
]
|
||||
},{
|
||||
},
|
||||
{
|
||||
src : 'src/enums/ua-parser-enums.js',
|
||||
dest :'src/enums/ua-parser-enums.mjs',
|
||||
title : 'ua-parser-js/enums',
|
||||
replacements : []
|
||||
title : 'Generated ESM version of ua-parser-js/enums',
|
||||
replacements : [...defaultReplacements.mjs]
|
||||
},
|
||||
{
|
||||
src : 'src/enums/ua-parser-enums.js',
|
||||
dest :'src/enums/ua-parser-enums.d.ts',
|
||||
title : 'Generated type declarations of ua-parser-js/enums',
|
||||
replacements : [
|
||||
[/(const .+) = object\.freeze\(/ig, 'export $1: Readonly<'],
|
||||
[/(const .+) =( .+;)/ig, 'export $1: typeof$2'],
|
||||
[/}\);/ig, '}>;'],
|
||||
[/module\.exports =.+/igs, '']
|
||||
]
|
||||
},
|
||||
{
|
||||
src : 'src/extensions/ua-parser-extensions.js',
|
||||
dest : 'src/extensions/ua-parser-extensions.mjs',
|
||||
title : 'ua-parser-js/extensions',
|
||||
replacements : []
|
||||
title : 'Generated ESM version of ua-parser-js/extensions',
|
||||
replacements : [...defaultReplacements.mjs]
|
||||
},
|
||||
{
|
||||
src : 'src/helpers/ua-parser-helpers.js',
|
||||
dest : 'src/helpers/ua-parser-helpers.mjs',
|
||||
title : 'ua-parser-js/helpers',
|
||||
replacements : []
|
||||
title : 'Generated ESM version of ua-parser-js/helpers',
|
||||
replacements : [...defaultReplacements.mjs]
|
||||
}
|
||||
];
|
||||
|
||||
modules.forEach(module => generateMJS(module));
|
||||
files.forEach(module => generateFile(module));
|
||||
731
src/enums/ua-parser-enums.d.ts
vendored
Normal file
731
src/enums/ua-parser-enums.d.ts
vendored
Normal file
@@ -0,0 +1,731 @@
|
||||
// Generated type declarations of ua-parser-js/enums
|
||||
// DO NOT EDIT THIS FILE!
|
||||
// Source: /src/enums/ua-parser-enums.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Enums for UAParser.js v2.0.5
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
UAParser.js PRO Personal License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
export const BrowserName: Readonly<{
|
||||
'115': '115',
|
||||
'2345': '2345',
|
||||
'360': '360',
|
||||
ALIPAY: 'Alipay',
|
||||
AMAYA: 'Amaya',
|
||||
ANDROID: 'Android Browser',
|
||||
ARORA: 'Arora',
|
||||
AVANT: 'Avant',
|
||||
AVAST: 'Avast Secure Browser',
|
||||
AVG: 'AVG Secure Browser',
|
||||
BAIDU: 'Baidu Browser',
|
||||
BASILISK: 'Basilisk',
|
||||
BLAZER: 'Blazer',
|
||||
BOLT: 'Bolt',
|
||||
BOWSER: 'Bowser',
|
||||
BRAVE: 'Brave',
|
||||
CAMINO: 'Camino',
|
||||
CHIMERA: 'Chimera',
|
||||
CHROME: 'Chrome',
|
||||
CHROME_HEADLESS: 'Chrome Headless',
|
||||
CHROME_MOBILE: 'Mobile Chrome',
|
||||
CHROME_WEBVIEW: 'Chrome WebView',
|
||||
CHROMIUM: 'Chromium',
|
||||
COBALT: 'Cobalt',
|
||||
COC_COC: 'Coc Coc',
|
||||
CONKEROR: 'Conkeror',
|
||||
DAUM: 'Daum',
|
||||
DILLO: 'Dillo',
|
||||
DOLPHIN: 'Dolphin',
|
||||
DOOBLE: 'Dooble',
|
||||
DORIS: 'Doris',
|
||||
DRAGON: 'Dragon',
|
||||
DUCKDUCKGO: 'DuckDuckGo',
|
||||
ECOSIA: 'Ecosia',
|
||||
EDGE: 'Edge',
|
||||
EDGE_WEBVIEW: 'Edge WebView',
|
||||
EDGE_WEBVIEW2: 'Edge WebView2',
|
||||
EPIPHANY: 'Epiphany',
|
||||
FACEBOOK: 'Facebook',
|
||||
FALKON: 'Falkon',
|
||||
FIREBIRD: 'Firebird',
|
||||
FIREFOX: 'Firefox',
|
||||
FIREFOX_FOCUS: 'Firefox Focus',
|
||||
FIREFOX_MOBILE: 'Mobile Firefox',
|
||||
FIREFOX_REALITY: 'Firefox Reality',
|
||||
FENNEC: 'Fennec',
|
||||
FLOCK: 'Flock',
|
||||
FLOW: 'Flow',
|
||||
GO: 'GoBrowser',
|
||||
GOOGLE_SEARCH: 'GSA',
|
||||
HELIO: 'Helio',
|
||||
HEYTAP: 'HeyTap',
|
||||
HONOR: 'Honor',
|
||||
HUAWEI: 'Huawei Browser',
|
||||
ICAB: 'iCab',
|
||||
ICE: 'ICE Browser',
|
||||
ICEAPE: 'IceApe',
|
||||
ICECAT: 'IceCat',
|
||||
ICEDRAGON: 'IceDragon',
|
||||
ICEWEASEL: 'IceWeasel',
|
||||
IE: 'IE',
|
||||
INSTAGRAM: 'Instagram',
|
||||
IRIDIUM: 'Iridium',
|
||||
IRON: 'Iron',
|
||||
JASMINE: 'Jasmine',
|
||||
KONQUEROR: 'Konqueror',
|
||||
KAKAO: 'KakaoTalk',
|
||||
KHTML: 'KHTML',
|
||||
K_MELEON: 'K-Meleon',
|
||||
KLAR: 'Klar',
|
||||
KLARNA: 'Klarna',
|
||||
KINDLE: 'Kindle',
|
||||
LENOVO: 'Smart Lenovo Browser',
|
||||
LADYBIRD: 'Ladybird',
|
||||
LG: 'LG Browser',
|
||||
LIBREWOLF: 'LibreWolf',
|
||||
LIEBAO: 'LBBROWSER',
|
||||
LINE: 'Line',
|
||||
LINKEDIN: 'LinkedIn',
|
||||
LINKS: 'Links',
|
||||
LUNASCAPE: 'Lunascape',
|
||||
LYNX: 'Lynx',
|
||||
MAEMO: 'Maemo Browser',
|
||||
MAXTHON: 'Maxthon',
|
||||
MIDORI: 'Midori',
|
||||
MINIMO: 'Minimo',
|
||||
MIUI: 'MIUI Browser',
|
||||
MOZILLA: 'Mozilla',
|
||||
MOSAIC: 'Mosaic',
|
||||
NAVER: 'Naver',
|
||||
NETFRONT: 'NetFront',
|
||||
NETSCAPE: 'Netscape',
|
||||
NETSURF: 'Netsurf',
|
||||
NOKIA: 'Nokia Browser',
|
||||
OBIGO: 'Obigo',
|
||||
OCULUS: 'Oculus Browser',
|
||||
OMNIWEB: 'OmniWeb',
|
||||
OPERA: 'Opera',
|
||||
OPERA_COAST: 'Opera Coast',
|
||||
OPERA_GX: 'Opera GX',
|
||||
OPERA_MINI: 'Opera Mini',
|
||||
OPERA_MOBI: 'Opera Mobi',
|
||||
OPERA_TABLET: 'Opera Tablet',
|
||||
OPERA_TOUCH: 'Opera Touch',
|
||||
OTTER: 'Otter',
|
||||
OVI: 'OviBrowser',
|
||||
PALEMOON: 'PaleMoon',
|
||||
PHANTOMJS: 'PhantomJS',
|
||||
PHOENIX: 'Phoenix',
|
||||
PICOBROWSER: 'Pico Browser',
|
||||
POLARIS: 'Polaris',
|
||||
PUFFIN: 'Puffin',
|
||||
QQ: 'QQBrowser',
|
||||
QQ_LITE: 'QQBrowserLite',
|
||||
QUARK: 'Quark',
|
||||
QUPZILLA: 'QupZilla',
|
||||
QUTEBROWSER: 'qutebrowser',
|
||||
REKONQ: 'rekonq',
|
||||
ROCKMELT: 'Rockmelt',
|
||||
SAFARI: 'Safari',
|
||||
SAFARI_MOBILE: 'Mobile Safari',
|
||||
SAILFISH: 'Sailfish Browser',
|
||||
SAMSUNG: 'Samsung Internet',
|
||||
SEAMONKEY: 'SeaMonkey',
|
||||
SILK: 'Silk',
|
||||
SKYFIRE: 'Skyfire',
|
||||
SLEIPNIR: 'Sleipnir',
|
||||
SLIMBOAT: 'SlimBoat',
|
||||
SLIMBROWSER: 'SlimBrowser',
|
||||
SLIMJET: 'Slimjet',
|
||||
SNAPCHAT: 'Snapchat',
|
||||
SOGOU_EXPLORER: 'Sogou Explorer',
|
||||
SOGOU_MOBILE: 'Sogou Mobile',
|
||||
SURF: 'Surf',
|
||||
SWIFTFOX: 'Swiftfox',
|
||||
TESLA: 'Tesla',
|
||||
TIKTOK: 'TikTok',
|
||||
TIZEN: 'Tizen Browser',
|
||||
TWITTER: 'Twitter',
|
||||
UC: 'UCBrowser',
|
||||
UP: 'UP.Browser',
|
||||
VIVALDI: 'Vivaldi',
|
||||
VIVO: 'Vivo Browser',
|
||||
W3M: 'w3m',
|
||||
WATERFOX: 'Waterfox',
|
||||
WEBKIT: 'WebKit',
|
||||
WECHAT: 'WeChat',
|
||||
WEIBO: 'Weibo',
|
||||
WHALE: 'Whale',
|
||||
WOLVIC: 'Wolvic',
|
||||
YANDEX: 'Yandex',
|
||||
ZALO: 'Zalo'
|
||||
|
||||
// TODO : test!
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Use `BrowserName` instead
|
||||
*/
|
||||
export const Browser: typeof BrowserName;
|
||||
|
||||
export const BrowserType: Readonly<{
|
||||
CRAWLER: 'crawler',
|
||||
CLI: 'cli',
|
||||
EMAIL: 'email',
|
||||
FETCHER: 'fetcher',
|
||||
INAPP: 'inapp',
|
||||
MEDIAPLAYER: 'mediaplayer',
|
||||
LIBRARY: 'library'
|
||||
}>;
|
||||
|
||||
export const CPUArch: Readonly<{
|
||||
'68K': '68k',
|
||||
ALPHA: 'alpha',
|
||||
ARM : 'arm',
|
||||
ARM_64: 'arm64',
|
||||
ARM_HF: 'armhf',
|
||||
AVR: 'avr',
|
||||
AVR_32: 'avr32',
|
||||
IA64: 'ia64',
|
||||
IRIX: 'irix',
|
||||
IRIX_64: 'irix64',
|
||||
MIPS: 'mips',
|
||||
MIPS_64: 'mips64',
|
||||
PA_RISC: 'pa-risc',
|
||||
PPC: 'ppc',
|
||||
SPARC: 'sparc',
|
||||
SPARC_64: 'sparc64',
|
||||
X86: 'ia32',
|
||||
X86_64: 'amd64'
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Use `CPUArch` instead
|
||||
*/
|
||||
export const CPU: typeof CPUArch;
|
||||
|
||||
export const DeviceType: Readonly<{
|
||||
CONSOLE: 'console',
|
||||
DESKTOP: 'desktop',
|
||||
EMBEDDED: 'embedded',
|
||||
MOBILE: 'mobile',
|
||||
SMARTTV: 'smarttv',
|
||||
TABLET: 'tablet',
|
||||
WEARABLE: 'wearable',
|
||||
XR: 'xr'
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Use `DeviceType` instead
|
||||
*/
|
||||
export const Device: typeof DeviceType;
|
||||
|
||||
export const DeviceVendor: Readonly<{
|
||||
ACER: 'Acer',
|
||||
ADVAN: 'Advan',
|
||||
ALCATEL: 'Alcatel',
|
||||
APPLE: 'Apple',
|
||||
AMAZON: 'Amazon',
|
||||
ARCHOS: 'Archos',
|
||||
ASUS: 'ASUS',
|
||||
ATT: 'AT&T',
|
||||
BENQ: 'BenQ',
|
||||
BLACKBERRY: 'BlackBerry',
|
||||
BLU: 'BLU',
|
||||
CAT: 'Cat',
|
||||
DELL: 'Dell',
|
||||
ENERGIZER: 'Energizer',
|
||||
ESSENTIAL: 'Essential',
|
||||
FACEBOOK: 'Facebook',
|
||||
FAIRPHONE: 'Fairphone',
|
||||
GEEKSPHONE: 'GeeksPhone',
|
||||
GENERIC: 'Generic',
|
||||
GOOGLE: 'Google',
|
||||
HMD: 'HMD',
|
||||
HP: 'HP',
|
||||
HTC: 'HTC',
|
||||
HUAWEI: 'Huawei',
|
||||
IMO: 'IMO',
|
||||
INFINIX: 'Infinix',
|
||||
ITEL: 'itel',
|
||||
JOLLA: 'Jolla',
|
||||
KOBO: 'Kobo',
|
||||
LAVA: 'Lava',
|
||||
LENOVO: 'Lenovo',
|
||||
LG: 'LG',
|
||||
MEIZU: 'Meizu',
|
||||
MICROMAX: 'Micromax',
|
||||
MICROSOFT: 'Microsoft',
|
||||
MOTOROLA: 'Motorola',
|
||||
NEXIAN: 'Nexian',
|
||||
NINTENDO: 'Nintendo',
|
||||
NOKIA: 'Nokia',
|
||||
NOTHING: 'Nothing',
|
||||
NVIDIA: 'Nvidia',
|
||||
ONEPLUS: 'OnePlus',
|
||||
OPPO: 'OPPO',
|
||||
OUYA: 'Ouya',
|
||||
PALM: 'Palm',
|
||||
PANASONIC: 'Panasonic',
|
||||
PEBBLE: 'Pebble',
|
||||
PHILIPS: 'Philips',
|
||||
PICO: 'Pico',
|
||||
POLYTRON: 'Polytron',
|
||||
REALME: 'Realme',
|
||||
RETROID: 'Retroid',
|
||||
RIM: 'RIM',
|
||||
ROKU: 'Roku',
|
||||
SAMSUNG: 'Samsung',
|
||||
SHARP: 'Sharp',
|
||||
SIEMENS: 'Siemens',
|
||||
SMARTFREN: 'Smartfren',
|
||||
SONY: 'Sony',
|
||||
SPRINT: 'Sprint',
|
||||
TCL: 'TCL',
|
||||
TECHNISAT: 'TechniSAT',
|
||||
TECNO: 'TECNO',
|
||||
TESLA: 'Tesla',
|
||||
ULEFONE: 'Ulefone',
|
||||
VIVO: 'Vivo',
|
||||
VIZIO: 'Vizio',
|
||||
VODAFONE: 'Vodafone',
|
||||
XBOX: 'Xbox',
|
||||
XIAOMI: 'Xiaomi',
|
||||
ZEBRA: 'Zebra',
|
||||
ZTE: 'ZTE',
|
||||
|
||||
// TODO : test!
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Use `DeviceVendor` instead
|
||||
*/
|
||||
export const Vendor: typeof DeviceVendor;
|
||||
|
||||
export const EngineName: Readonly<{
|
||||
AMAYA: 'Amaya',
|
||||
ARKWEB: 'ArkWeb',
|
||||
BLINK: 'Blink',
|
||||
EDGEHTML: 'EdgeHTML',
|
||||
FLOW: 'Flow',
|
||||
GECKO: 'Gecko',
|
||||
GOANNA: 'Goanna',
|
||||
ICAB: 'iCab',
|
||||
KHTML: 'KHTML',
|
||||
LIBWEB: 'LibWeb',
|
||||
LINKS: 'Links',
|
||||
LYNX: 'Lynx',
|
||||
NETFRONT: 'NetFront',
|
||||
NETSURF: 'NetSurf',
|
||||
PRESTO: 'Presto',
|
||||
SERVO: 'Servo',
|
||||
TASMAN: 'Tasman',
|
||||
TRIDENT: 'Trident',
|
||||
W3M: 'w3m',
|
||||
WEBKIT: 'WebKit'
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Use `EngineName` instead
|
||||
*/
|
||||
export const Engine: typeof EngineName;
|
||||
|
||||
export const OSName: Readonly<{
|
||||
AIX: 'AIX',
|
||||
AMIGA_OS: 'Amiga OS',
|
||||
ANDROID: 'Android',
|
||||
ANDROID_X86: 'Android-x86',
|
||||
ARCAOS: 'ArcaOS',
|
||||
ARCH: 'Arch',
|
||||
BADA: 'Bada',
|
||||
BEOS: 'BeOS',
|
||||
BLACKBERRY: 'BlackBerry',
|
||||
CENTOS: 'CentOS',
|
||||
CHROME_OS: 'Chrome OS',
|
||||
CHROMECAST: 'Chromecast',
|
||||
CHROMECAST_ANDROID: 'Chromecast Android',
|
||||
CHROMECAST_FUCHSIA: 'Chromecast Fuchsia',
|
||||
CHROMECAST_LINUX: 'Chromecast Linux',
|
||||
CHROMECAST_SMARTSPEAKER: 'Chromecast SmartSpeaker',
|
||||
CONTIKI: 'Contiki',
|
||||
DEBIAN: 'Debian',
|
||||
DEEPIN: 'Deepin',
|
||||
DRAGONFLY: 'DragonFly',
|
||||
ELEMENTARY_OS: 'elementary OS',
|
||||
FEDORA: 'Fedora',
|
||||
FIREFOX_OS: 'Firefox OS',
|
||||
FREEBSD: 'FreeBSD',
|
||||
FUCHSIA: 'Fuchsia',
|
||||
GENTOO: 'Gentoo',
|
||||
GHOSTBSD: 'GhostBSD',
|
||||
GNU: 'GNU',
|
||||
HAIKU: 'Haiku',
|
||||
HARMONYOS: 'HarmonyOS',
|
||||
HP_UX: 'HP-UX',
|
||||
HURD: 'Hurd',
|
||||
IOS: 'iOS',
|
||||
JOLI: 'Joli',
|
||||
KAIOS: 'KaiOS',
|
||||
KNOPPIX: 'Knoppix',
|
||||
KUBUNTU: 'Kubuntu',
|
||||
LINPUS: 'Linpus',
|
||||
LINSPIRE: 'Linspire',
|
||||
LINUX: 'Linux',
|
||||
MACOS: 'macOS',
|
||||
MAEMO: 'Maemo',
|
||||
MAGEIA: 'Mageia',
|
||||
MANDRIVA: 'Mandriva',
|
||||
MANJARO: 'Manjaro',
|
||||
MEEGO: 'MeeGo',
|
||||
MINIX: 'Minix',
|
||||
MINT: 'Mint',
|
||||
MORPH_OS: 'Morph OS',
|
||||
NETBSD: 'NetBSD',
|
||||
NETRANGE: 'NetRange',
|
||||
NETTV: 'NetTV',
|
||||
NINTENDO: 'Nintendo',
|
||||
OPENHARMONY: 'OpenHarmony',
|
||||
OPENBSD: 'OpenBSD',
|
||||
OPENVMS: 'OpenVMS',
|
||||
OS2: 'OS/2',
|
||||
PALM: 'Palm',
|
||||
PC_BSD: 'PC-BSD',
|
||||
PCLINUXOS: 'PCLinuxOS',
|
||||
PICO: 'Pico',
|
||||
PLAN9: 'Plan9',
|
||||
PLAYSTATION: 'PlayStation',
|
||||
QNX: 'QNX',
|
||||
RASPBIAN: 'Raspbian',
|
||||
REDHAT: 'RedHat',
|
||||
RIM_TABLET_OS: 'RIM Tablet OS',
|
||||
RISC_OS: 'RISC OS',
|
||||
SABAYON: 'Sabayon',
|
||||
SAILFISH: 'Sailfish',
|
||||
SERENITYOS: 'SerenityOS',
|
||||
SERIES40: 'Series40',
|
||||
SLACKWARE: 'Slackware',
|
||||
SOLARIS: 'Solaris',
|
||||
SUSE: 'SUSE',
|
||||
SYMBIAN: 'Symbian',
|
||||
TIZEN: 'Tizen',
|
||||
UBUNTU: 'Ubuntu',
|
||||
UBUNTU_TOUCH: 'Ubuntu Touch',
|
||||
UNIX: 'Unix',
|
||||
VECTORLINUX: 'VectorLinux',
|
||||
WATCHOS: 'watchOS',
|
||||
WEBOS: 'WebOS',
|
||||
WINDOWS: 'Windows',
|
||||
WINDOWS_CE: 'Windows CE',
|
||||
WINDOWS_IOT: 'Windows IoT',
|
||||
WINDOWS_MOBILE: 'Windows Mobile',
|
||||
WINDOWS_PHONE: 'Windows Phone',
|
||||
WINDOWS_RT: 'Windows RT',
|
||||
XBOX: 'Xbox',
|
||||
XUBUNTU: 'Xubuntu',
|
||||
ZENWALK: 'Zenwalk'
|
||||
|
||||
// TODO : test!
|
||||
}>;
|
||||
/**
|
||||
* @deprecated Use `OSName` instead
|
||||
*/
|
||||
export const OS: typeof OSName;
|
||||
|
||||
/*////////////////////////////////
|
||||
* Enums for Extensions submodule
|
||||
*///////////////////////////////
|
||||
|
||||
export const Extension: Readonly<{
|
||||
BrowserName: {
|
||||
CLI: {
|
||||
CURL: 'curl',
|
||||
ELINKS: 'ELinks',
|
||||
HTTPIE: 'HTTPie',
|
||||
LYNX: 'Lynx',
|
||||
WGET: 'Wget'
|
||||
},
|
||||
Crawler: {
|
||||
AHREFS_BOT: 'AhrefsBot',
|
||||
AI2_BOT: 'AI2Bot',
|
||||
AIHIT_BOT: 'aiHitBot',
|
||||
ALGOLIA_CRAWLER: 'Algolia Crawler',
|
||||
APPLE_BOT: 'Applebot',
|
||||
APPLE_BOT_EXTENDED: 'Applebot-Extended',
|
||||
ASK_TEOMA: 'Teoma',
|
||||
AMAZON_BOT: 'Amazonbot',
|
||||
AMAZON_CONTXBOT: 'contxbot',
|
||||
ANTHROPIC_AI: 'anthropic-ai',
|
||||
ANTHROPIC_CLAUDE_BOT: 'ClaudeBot',
|
||||
ANTHROPIC_CLAUDE_SEARCHBOT: 'Claude-SearchBot',
|
||||
ANTHROPIC_CLAUDE_WEB: 'Claude-Web',
|
||||
ARCHIVEORG_BOT: 'archive.org_bot',
|
||||
BAIDU_ADS: 'Baidu-ADS',
|
||||
BAIDU_SPIDER: 'Baiduspider',
|
||||
BAIDU_SPIDER_ADS: 'Baiduspider-ads',
|
||||
BAIDU_SPIDER_CPRO: 'Baiduspider-cpro',
|
||||
BAIDU_SPIDER_FAVO: 'Baiduspider-favo',
|
||||
BAIDU_SPIDER_IMAGE: 'Baiduspider-image',
|
||||
BAIDU_SPIDER_NEWS: 'Baiduspider-news',
|
||||
BAIDU_SPIDER_RENDER: 'Baiduspider-render',
|
||||
BAIDU_SPIDER_VIDEO: 'Baiduspider-video',
|
||||
BLEX_BOT: 'BLEXBot',
|
||||
BOTIFY: 'botify',
|
||||
BRAVE_BOT: 'Bravebot',
|
||||
BYTEDANCE_BYTESPIDER: 'Bytespider',
|
||||
BYTEDANCE_TIKTOKSPIDER: 'TikTokSpider',
|
||||
COMMON_CRAWL_CCBOT: 'CCBot',
|
||||
COCCOC_BOT_WEB: 'coccocbot-web',
|
||||
COCCOC_BOT_IMAGE: 'coccocbot-image',
|
||||
COHERE_TRAINING_DATA_CRAWLER: 'cohere-training-data-crawler',
|
||||
COTOYOGI: 'Cotoyogi',
|
||||
COVEO_BOT: 'Coveobot',
|
||||
CRITEO_BOT: 'CriteoBot',
|
||||
DATAFORSEO_BOT: 'DataForSeoBot',
|
||||
DAUM: 'Daum',
|
||||
DAUM_DAUMOA: 'Daumoa',
|
||||
DAUM_DAUMOA_IMAGE: 'Daumoa-image',
|
||||
DEEPSEEK_BOT: 'DeepSeekBot',
|
||||
DIFFBOT: 'Diffbot',
|
||||
DUCKDUCKGO_BOT: 'DuckDuckBot',
|
||||
DUCKDUCKGO_FAVICONS_BOT: 'DuckDuckGo-Favicons-Bot',
|
||||
ELASTIC: 'Elastic',
|
||||
EXALEAD_EXABOT: 'Exabot',
|
||||
FIRECRAWL_AGENT: 'FirecrawlAgent',
|
||||
FREESPOKE: 'Freespoke',
|
||||
GOOGLE_ADSBOT: 'AdsBot-Google',
|
||||
GOOGLE_ADSBOT_MOBILE: 'Adsbot-Google-Mobile',
|
||||
GOOGLE_ADSENSE: 'AdSense',
|
||||
GOOGLE_APIS: 'APIs-Google',
|
||||
GOOGLE_BOT: 'Googlebot',
|
||||
GOOGLE_BOT_IMAGE: 'Googlebot-Image',
|
||||
GOOGLE_BOT_NEWS: 'Googlebot-News',
|
||||
GOOGLE_BOT_VIDEO: 'Googlebot-Video',
|
||||
GOOGLE_CLOUDVERTEXBOT: 'Google-CloudVertexBot',
|
||||
GOOGLE_EXTENDED: 'Google-Extended',
|
||||
GOOGLE_INSPECTIONTOOL: 'Google-InspectionTool',
|
||||
GOOGLE_OTHER: 'GoogleOther',
|
||||
GOOGLE_OTHER_IMAGE: 'GoogleOther-Image',
|
||||
GOOGLE_OTHER_VIDEO: 'GoogleOther-Video',
|
||||
GOOGLE_SAFETY: 'Google-Safety',
|
||||
GOOGLE_STOREBOT: 'Storebot-Google',
|
||||
HIVE_IMAGESIFTBOT: 'ImagesiftBot',
|
||||
HUAWEI_PANGUBOT: 'PanguBot',
|
||||
HUAWEI_PETALBOT: 'PetalBot',
|
||||
HUGGINGFACE_BOT: 'HuggingFace-Bot',
|
||||
HUNTER_VELENPUBLICWEBCRAWLER: 'VelenPublicWebCrawler',
|
||||
IA_ARCHIVER: 'ia_archiver',
|
||||
IASK_BOT: 'iAskBot',
|
||||
KAGI_BOT: 'Kagibot',
|
||||
KANGAROO_BOT: 'Kangaroo Bot',
|
||||
LINE_SPIDER: 'Linespider',
|
||||
LINKEDIN_BOT: 'LinkedInBot',
|
||||
MAGPIE_CRAWLER: 'magpie-crawler',
|
||||
MARGINALIA: 'marginalia',
|
||||
META_EXTERNALAGENT: 'meta-externalagent',
|
||||
META_FACEBOOKBOT: 'FacebookBot',
|
||||
META_FACEBOOKCATALOG: 'facebookcatalog',
|
||||
META_FACEBOOKEXTERNALHIT: 'facebookexternalhit',
|
||||
MAJESTIC_MJ12BOT: 'MJ12bot',
|
||||
MICROSOFT_BINGBOT: 'Bingbot',
|
||||
MICROSOFT_MSNBOT: 'msnbot',
|
||||
MICROSOFT_ADIDXBOT: 'adidxbot',
|
||||
MOJEEK_BOT: 'MojeekBot',
|
||||
MOZ_DOTBOT: 'DotBot',
|
||||
ONCRAWL: 'OnCrawl',
|
||||
ONESPOT_SCRAPERBOT: 'Onespot-ScraperBot',
|
||||
OPENAI_GPTBOT: 'GPTBot',
|
||||
OPENAI_SEARCH_BOT: 'OAI-SearchBot',
|
||||
PERPLEXITY_BOT: 'PerplexityBot',
|
||||
QIHOO_360_SPIDER: '360Spider',
|
||||
QWANT_BOT: 'Qwantbot',
|
||||
REPLICATE_BOT: 'Replicate-Bot',
|
||||
RUNPOD_BOT: 'RunPod-Bot',
|
||||
SB_INTUITIONS_BOT: 'SBIntuitionsBot',
|
||||
SEEKPORT_BOT: 'SeekportBot',
|
||||
SEMRUSH_BOT: 'SemrushBot',
|
||||
SEMRUSH_BOT_BACKLINK: 'SemrushBot-BA',
|
||||
SEMRUSH_BOT_CONTENTSHAKE: 'SemrushBot-OCOB',
|
||||
SEMRUSH_BOT_SEO_CHECKER: 'SemrushBot-SI',
|
||||
SEZNAM_BOT: 'SeznamBot',
|
||||
SITEIMPROVE: 'Siteimprove',
|
||||
SOGOU_PIC_SPIDER: 'Sogou Pic Spider',
|
||||
SOGOU_WEB_SPIDER: 'Sogou web spider',
|
||||
STARTPAGE: 'Startpage',
|
||||
TIMPI_BOT: 'Timpibot',
|
||||
TOGETHER_BOT: 'Together-Bot',
|
||||
TURNITIN_BOT: 'TurnitinBot',
|
||||
TWIN_AGENT: 'TwinAgent',
|
||||
VERCEL_V0BOT: 'v0bot',
|
||||
WEBZIO: 'webzio',
|
||||
WEBZIO_EXTENDED: 'Webzio-Extended',
|
||||
WEBZIO_OMGILI: 'omgili',
|
||||
WEBZIO_OMGILI_BOT: 'omgilibot',
|
||||
XAI_BOT: 'xAI-Bot',
|
||||
YAHOO_JAPAN: 'Y!J-BRW',
|
||||
YAHOO_SLURP: 'Yahoo! Slurp',
|
||||
YANDEX_ACCESSIBILITY_BOT: 'YandexAccessibilityBot',
|
||||
YANDEX_ADDITIONAL_BOT: 'YandexAdditionalBot',
|
||||
YANDEX_ADNET: 'YandexAdNet',
|
||||
YANDEX_BLOGS: 'YandexBlogs',
|
||||
YANDEX_BOT: 'YandexBot',
|
||||
YANDEX_BOT_MIRRORDETECTOR: 'YandexBot MirrorDetector',
|
||||
YANDEX_COMBOT: 'YandexComBot',
|
||||
YANDEX_FAVICONS: 'YandexFavicons',
|
||||
YANDEX_IMAGE_RESIZER: 'YandexImageResizer',
|
||||
YANDEX_IMAGES: 'YandexImages',
|
||||
YANDEX_MARKET: 'YandexMarket',
|
||||
YANDEX_MEDIA: 'YandexMedia',
|
||||
YANDEX_METRIKA: 'YandexMetrika',
|
||||
YANDEX_MOBILE_BOT: 'YandexMobileBot',
|
||||
YANDEX_MOBILE_SCREENSHOT_BOT: 'YandexMobileScreenShotBot',
|
||||
YANDEX_NEWS: 'YandexNews',
|
||||
YANDEX_ONTODB: 'YandexOntoDB',
|
||||
YANDEX_ONTODB_API: 'YandexOntoDBAPI',
|
||||
YANDEX_PARTNER: 'YandexPartner',
|
||||
YANDEX_RCA: 'YandexRCA',
|
||||
YANDEX_RENDERRESOURCES_BOT: 'YandexRenderResourcesBot',
|
||||
YANDEX_SCREENSHOT_BOT: 'YandexScreenshotBot',
|
||||
YANDEX_SPRAV_BOT: 'YandexSpravBot',
|
||||
YANDEX_TRACKER: 'YandexTracker',
|
||||
YANDEX_VERTICALS: 'YandexVerticals',
|
||||
YANDEX_VERTIS: 'YandexVertis',
|
||||
YANDEX_VIDEO: 'YandexVideo',
|
||||
YANDEX_VIDEO_PARSER: 'YandexVideoParser',
|
||||
YANDEX_WEBMASTER: 'YandexWebmaster',
|
||||
YEP_BOT: 'YepBot',
|
||||
YETI: 'Yeti',
|
||||
YISOU_SPIDER: 'YisouSpider',
|
||||
YOU_BOT: 'YouBot',
|
||||
ZHIPU_CHATGLM_SPIDER: 'ChatGLM-Spider',
|
||||
ZUM_BOT: 'ZumBot'
|
||||
},
|
||||
Email: {
|
||||
AIRMAIL: 'Airmail',
|
||||
APPLE_MAIL: 'Mail',
|
||||
BLUEMAIL: 'BlueMail',
|
||||
DAUM_MAIL: 'DaumMail',
|
||||
EVOLUTION: 'Evolution',
|
||||
EM_CLIENT: 'eM Client',
|
||||
FOXMAIL: 'Foxmail',
|
||||
KMAIL: 'KMail',
|
||||
KMAIL2: 'kmail2',
|
||||
KONTACT: 'Kontact',
|
||||
MICROSOFT_OUTLOOK: 'Microsoft Outlook',
|
||||
MICROSOFT_OUTLOOK_MAC: 'MacOutlook',
|
||||
NAVER_MAILAPP: 'NaverMailApp',
|
||||
POLYMAIL: 'Polymail',
|
||||
PROTON_MAIL: 'ProtonMail',
|
||||
SPARK_MAIL: 'SparkDesktop',
|
||||
SPARROW: 'Sparrow',
|
||||
THUNDERBIRD: 'Thunderbird',
|
||||
YAHOO_MAIL: 'Yahoo',
|
||||
ZIMBRA: 'Zimbra',
|
||||
ZOHO_MAIL: 'ZohoMail-Desktop'
|
||||
},
|
||||
Fetcher: {
|
||||
AHREFS_SITEAUDIT: 'AhrefsSiteAudit',
|
||||
ANTHROPIC_CLAUDE_USER: 'Claude-User',
|
||||
ASANA: 'Asana',
|
||||
BETTER_UPTIME_BOT: 'Better Uptime Bot',
|
||||
BITLY_BOT: 'bitlybot',
|
||||
BLUESKY: 'Bluesky',
|
||||
BUFFER_LINKPREVIEWBOT: 'BufferLinkPreviewBot',
|
||||
COHERE_AI: 'Cohere-AI',
|
||||
DUCKDUCKGO_ASSISTBOT: 'DuckAssistBot',
|
||||
GOOGLE_CHROME_LIGHTHOUSE: 'Chrome-Lighthouse',
|
||||
GOOGLE_FEEDFETCHER: 'FeedFetcher-Google',
|
||||
GOOGLE_GEMINI_DEEP_RESEARCH: 'Gemini-Deep-Research',
|
||||
GOOGLE_IMAGEPROXY: 'GoogleImageProxy',
|
||||
GOOGLE_PAGERENDERER: 'Google-PageRenderer',
|
||||
GOOGLE_READ_ALOUD: 'Google-Read-Aloud',
|
||||
GOOGLE_PRODUCER: 'GoogleProducer',
|
||||
GOOGLE_SITE_VERIFICATION: 'Google-Site-Verification',
|
||||
HUBSPOT_PAGE_FETCHER: 'HubSpot Page Fetcher',
|
||||
IFRAMELY: 'Iframely',
|
||||
KAKAOTALK_SCRAP: 'kakaotalk-scrap',
|
||||
META_EXTERNALFETCHER: 'meta-externalfetcher',
|
||||
META_WHATSAPP: 'WhatsApp',
|
||||
MICROSOFT_BINGPREVIEW: 'BingPreview',
|
||||
MICROSOFT_PREVIEW: 'MicrosoftPreview',
|
||||
MISTRALAI_USER: 'MistralAI-User',
|
||||
NAVER_BLUENO: 'Blueno',
|
||||
ONCRAWL_ROGERBOT: 'rogerbot',
|
||||
OPENAI_CHATGPT_USER: 'ChatGPT-User',
|
||||
PERPLEXITY_USER: 'Perplexity-User',
|
||||
PINTEREST_BOT: 'Pinterestbot',
|
||||
SEMRUSH_SITEAUDITBOT: 'SiteAuditBot',
|
||||
SNAP_URL_PREVIEW: 'Snap URL Preview',
|
||||
SKYPE_URIPREVIEW: 'SkypeUriPreview',
|
||||
TELEGRAM_BOT: 'TelegramBot',
|
||||
UPTIMEROBOT: 'UptimeRobot',
|
||||
VERCEL_FAVICON_BOT: 'vercel-favicon-bot',
|
||||
VERCEL_SCREENSHOT_BOT: 'vercel-screenshot-bot',
|
||||
VERCEL_BOT: 'Vercelbot',
|
||||
VERCEL_FLAGS: 'vercelflags',
|
||||
VERCEL_TRACING: 'verceltracing',
|
||||
YANDEX_CALENDAR: 'YandexCalendar',
|
||||
YANDEX_DIRECT: 'YandexDirect',
|
||||
YANDEX_DIRECTDYN: 'YandexDirectDyn',
|
||||
YANDEX_DIRECTFETCHER: 'YaDirectFetcher',
|
||||
YANDEX_FORDOMAIN: 'YandexForDomain',
|
||||
YANDEX_PAGECHECKER: 'YandexPagechecker',
|
||||
YANDEX_SEARCHSHOP: 'YandexSearchShop',
|
||||
YANDEX_SITELINKS: 'YandexSitelinks',
|
||||
YANDEX_USERPROXY: 'YandexUserproxy',
|
||||
ZOOMINFO_BOT: 'Zoombot'
|
||||
},
|
||||
InApp: {
|
||||
DISCORD: 'Discord',
|
||||
EVERNOTE: 'Evernote',
|
||||
FIGMA: 'Figma',
|
||||
FLIPBOARD: 'Flipboard',
|
||||
MATTERMOST: 'Mattermost',
|
||||
TEAMS: 'Teams',
|
||||
NOTION: 'Notion',
|
||||
POSTMAN: 'Postman',
|
||||
RAMBOX: 'Rambox',
|
||||
ROCKETCHAT: 'Rocket.Chat',
|
||||
SLACK: 'Slack',
|
||||
TIKTOK_LITE: 'TikTok Lite',
|
||||
VSCODE: 'VS Code',
|
||||
YAHOO_JAPAN: 'Yahoo! Japan'
|
||||
},
|
||||
Library: {
|
||||
ADOBE_AIR: 'AdobeAIR',
|
||||
AIOHTTP: 'aiohttp',
|
||||
APACHE_HTTPCLIENT: 'Apache-HttpClient',
|
||||
AXIOS: 'axios',
|
||||
GO_HTTP_CLIENT: 'go-http-client',
|
||||
GOT: 'got',
|
||||
GUZZLEHTTP: 'GuzzleHttp',
|
||||
JAVA: 'Java',
|
||||
JAVA_HTTPCLIENT: 'Java-http-client',
|
||||
JSDOM: 'jsdom',
|
||||
LIBWWW_PERL: 'libwww-perl',
|
||||
LUA_RESTY_HTTP: 'lua-resty-http',
|
||||
NEEDLE: 'Needle',
|
||||
NUTCH: 'Nutch',
|
||||
OKHTTP: 'OkHttp',
|
||||
NODE_FETCH: 'node-fetch',
|
||||
NODE_SUPERAGENT: 'node-superagent',
|
||||
PHP_SOAP: 'PHP-SOAP',
|
||||
POSTMAN_RUNTIME: 'PostmanRuntime',
|
||||
PYTHON_HTTPX: 'python-httpx',
|
||||
PYTHON_URLLIB: 'python-urllib',
|
||||
PYTHON_URLLIB3: 'python-urllib3',
|
||||
PYTHON_REQUESTS: 'python-requests',
|
||||
SCRAPY: 'Scrapy'
|
||||
}
|
||||
},
|
||||
DeviceVendor: {
|
||||
Vehicle: {
|
||||
BMW: 'BMW',
|
||||
BYD: 'BYD',
|
||||
JEEP: 'Jeep',
|
||||
RIVIAN: 'Rivian',
|
||||
TESLA: 'Tesla',
|
||||
VOLVO: 'Volvo'
|
||||
}
|
||||
}
|
||||
}>;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Enums for UAParser.js v2.0.0
|
||||
/* Enums for UAParser.js v2.0.5
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Personal License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
const Browser = Object.freeze({
|
||||
const BrowserName = Object.freeze({
|
||||
'115': '115',
|
||||
'2345': '2345',
|
||||
'360': '360',
|
||||
@@ -34,12 +34,17 @@ const Browser = Object.freeze({
|
||||
COBALT: 'Cobalt',
|
||||
COC_COC: 'Coc Coc',
|
||||
CONKEROR: 'Conkeror',
|
||||
DAUM: 'Daum',
|
||||
DILLO: 'Dillo',
|
||||
DOLPHIN: 'Dolphin',
|
||||
DOOBLE: 'Dooble',
|
||||
DORIS: 'Doris',
|
||||
DRAGON: 'Dragon',
|
||||
DUCKDUCKGO: 'DuckDuckGo',
|
||||
ECOSIA: 'Ecosia',
|
||||
EDGE: 'Edge',
|
||||
EDGE_WEBVIEW: 'Edge WebView',
|
||||
EDGE_WEBVIEW2: 'Edge WebView2',
|
||||
EPIPHANY: 'Epiphany',
|
||||
FACEBOOK: 'Facebook',
|
||||
FALKON: 'Falkon',
|
||||
@@ -76,6 +81,8 @@ const Browser = Object.freeze({
|
||||
KLARNA: 'Klarna',
|
||||
KINDLE: 'Kindle',
|
||||
LENOVO: 'Smart Lenovo Browser',
|
||||
LADYBIRD: 'Ladybird',
|
||||
LG: 'LG Browser',
|
||||
LIBREWOLF: 'LibreWolf',
|
||||
LIEBAO: 'LBBROWSER',
|
||||
LINE: 'Line',
|
||||
@@ -100,10 +107,12 @@ const Browser = Object.freeze({
|
||||
OMNIWEB: 'OmniWeb',
|
||||
OPERA: 'Opera',
|
||||
OPERA_COAST: 'Opera Coast',
|
||||
OPERA_GX: 'Opera GX',
|
||||
OPERA_MINI: 'Opera Mini',
|
||||
OPERA_MOBI: 'Opera Mobi',
|
||||
OPERA_TABLET: 'Opera Tablet',
|
||||
OPERA_TOUCH: 'Opera Touch',
|
||||
OTTER: 'Otter',
|
||||
OVI: 'OviBrowser',
|
||||
PALEMOON: 'PaleMoon',
|
||||
PHANTOMJS: 'PhantomJS',
|
||||
@@ -115,6 +124,7 @@ const Browser = Object.freeze({
|
||||
QQ_LITE: 'QQBrowserLite',
|
||||
QUARK: 'Quark',
|
||||
QUPZILLA: 'QupZilla',
|
||||
QUTEBROWSER: 'qutebrowser',
|
||||
REKONQ: 'rekonq',
|
||||
ROCKMELT: 'Rockmelt',
|
||||
SAFARI: 'Safari',
|
||||
@@ -131,6 +141,7 @@ const Browser = Object.freeze({
|
||||
SNAPCHAT: 'Snapchat',
|
||||
SOGOU_EXPLORER: 'Sogou Explorer',
|
||||
SOGOU_MOBILE: 'Sogou Mobile',
|
||||
SURF: 'Surf',
|
||||
SWIFTFOX: 'Swiftfox',
|
||||
TESLA: 'Tesla',
|
||||
TIKTOK: 'TikTok',
|
||||
@@ -147,10 +158,15 @@ const Browser = Object.freeze({
|
||||
WEIBO: 'Weibo',
|
||||
WHALE: 'Whale',
|
||||
WOLVIC: 'Wolvic',
|
||||
YANDEX: 'Yandex'
|
||||
YANDEX: 'Yandex',
|
||||
ZALO: 'Zalo'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `BrowserName` instead
|
||||
*/
|
||||
const Browser = BrowserName;
|
||||
|
||||
const BrowserType = Object.freeze({
|
||||
CRAWLER: 'crawler',
|
||||
@@ -162,8 +178,9 @@ const BrowserType = Object.freeze({
|
||||
LIBRARY: 'library'
|
||||
});
|
||||
|
||||
const CPU = Object.freeze({
|
||||
const CPUArch = Object.freeze({
|
||||
'68K': '68k',
|
||||
ALPHA: 'alpha',
|
||||
ARM : 'arm',
|
||||
ARM_64: 'arm64',
|
||||
ARM_HF: 'armhf',
|
||||
@@ -181,8 +198,12 @@ const CPU = Object.freeze({
|
||||
X86: 'ia32',
|
||||
X86_64: 'amd64'
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `CPUArch` instead
|
||||
*/
|
||||
const CPU = CPUArch;
|
||||
|
||||
const Device = Object.freeze({
|
||||
const DeviceType = Object.freeze({
|
||||
CONSOLE: 'console',
|
||||
DESKTOP: 'desktop',
|
||||
EMBEDDED: 'embedded',
|
||||
@@ -192,8 +213,12 @@ const Device = Object.freeze({
|
||||
WEARABLE: 'wearable',
|
||||
XR: 'xr'
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `DeviceType` instead
|
||||
*/
|
||||
const Device = DeviceType;
|
||||
|
||||
const Vendor = Object.freeze({
|
||||
const DeviceVendor = Object.freeze({
|
||||
ACER: 'Acer',
|
||||
ADVAN: 'Advan',
|
||||
ALCATEL: 'Alcatel',
|
||||
@@ -204,6 +229,7 @@ const Vendor = Object.freeze({
|
||||
ATT: 'AT&T',
|
||||
BENQ: 'BenQ',
|
||||
BLACKBERRY: 'BlackBerry',
|
||||
BLU: 'BLU',
|
||||
CAT: 'Cat',
|
||||
DELL: 'Dell',
|
||||
ENERGIZER: 'Energizer',
|
||||
@@ -222,6 +248,7 @@ const Vendor = Object.freeze({
|
||||
ITEL: 'itel',
|
||||
JOLLA: 'Jolla',
|
||||
KOBO: 'Kobo',
|
||||
LAVA: 'Lava',
|
||||
LENOVO: 'Lenovo',
|
||||
LG: 'LG',
|
||||
MEIZU: 'Meizu',
|
||||
@@ -239,9 +266,11 @@ const Vendor = Object.freeze({
|
||||
PALM: 'Palm',
|
||||
PANASONIC: 'Panasonic',
|
||||
PEBBLE: 'Pebble',
|
||||
PHILIPS: 'Philips',
|
||||
PICO: 'Pico',
|
||||
POLYTRON: 'Polytron',
|
||||
REALME: 'Realme',
|
||||
RETROID: 'Retroid',
|
||||
RIM: 'RIM',
|
||||
ROKU: 'Roku',
|
||||
SAMSUNG: 'Samsung',
|
||||
@@ -252,10 +281,11 @@ const Vendor = Object.freeze({
|
||||
SPRINT: 'Sprint',
|
||||
TCL: 'TCL',
|
||||
TECHNISAT: 'TechniSAT',
|
||||
TECNO: 'Tecno',
|
||||
TECNO: 'TECNO',
|
||||
TESLA: 'Tesla',
|
||||
ULEFONE: 'Ulefone',
|
||||
VIVO: 'Vivo',
|
||||
VIZIO: 'Vizio',
|
||||
VODAFONE: 'Vodafone',
|
||||
XBOX: 'Xbox',
|
||||
XIAOMI: 'Xiaomi',
|
||||
@@ -264,8 +294,12 @@ const Vendor = Object.freeze({
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `DeviceVendor` instead
|
||||
*/
|
||||
const Vendor = DeviceVendor;
|
||||
|
||||
const Engine = Object.freeze({
|
||||
const EngineName = Object.freeze({
|
||||
AMAYA: 'Amaya',
|
||||
ARKWEB: 'ArkWeb',
|
||||
BLINK: 'Blink',
|
||||
@@ -287,12 +321,17 @@ const Engine = Object.freeze({
|
||||
W3M: 'w3m',
|
||||
WEBKIT: 'WebKit'
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `EngineName` instead
|
||||
*/
|
||||
const Engine = EngineName;
|
||||
|
||||
const OS = Object.freeze({
|
||||
const OSName = Object.freeze({
|
||||
AIX: 'AIX',
|
||||
AMIGA_OS: 'Amiga OS',
|
||||
ANDROID: 'Android',
|
||||
ANDROID_X86: 'Android-x86',
|
||||
ARCAOS: 'ArcaOS',
|
||||
ARCH: 'Arch',
|
||||
BADA: 'Bada',
|
||||
BEOS: 'BeOS',
|
||||
@@ -323,6 +362,7 @@ const OS = Object.freeze({
|
||||
IOS: 'iOS',
|
||||
JOLI: 'Joli',
|
||||
KAIOS: 'KaiOS',
|
||||
KNOPPIX: 'Knoppix',
|
||||
KUBUNTU: 'Kubuntu',
|
||||
LINPUS: 'Linpus',
|
||||
LINSPIRE: 'Linspire',
|
||||
@@ -365,25 +405,339 @@ const OS = Object.freeze({
|
||||
SYMBIAN: 'Symbian',
|
||||
TIZEN: 'Tizen',
|
||||
UBUNTU: 'Ubuntu',
|
||||
UBUNTU_TOUCH: 'Ubuntu Touch',
|
||||
UNIX: 'Unix',
|
||||
VECTORLINUX: 'VectorLinux',
|
||||
WATCHOS: 'watchOS',
|
||||
WEBOS: 'WebOS',
|
||||
WINDOWS: 'Windows',
|
||||
WINDOWS_CE: 'Windows CE',
|
||||
WINDOWS_IOT: 'Windows IoT',
|
||||
WINDOWS_MOBILE: 'Windows Mobile',
|
||||
WINDOWS_PHONE: 'Windows Phone',
|
||||
WINDOWS_RT: 'Windows RT',
|
||||
XBOX: 'Xbox',
|
||||
XUBUNTU: 'Xubuntu',
|
||||
ZENWALK: 'Zenwalk'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `OSName` instead
|
||||
*/
|
||||
const OS = OSName;
|
||||
|
||||
/*////////////////////////////////
|
||||
* Enums for Extensions submodule
|
||||
*///////////////////////////////
|
||||
|
||||
const Extension = Object.freeze({
|
||||
BrowserName: {
|
||||
CLI: {
|
||||
CURL: 'curl',
|
||||
ELINKS: 'ELinks',
|
||||
HTTPIE: 'HTTPie',
|
||||
LYNX: 'Lynx',
|
||||
WGET: 'Wget'
|
||||
},
|
||||
Crawler: {
|
||||
AHREFS_BOT: 'AhrefsBot',
|
||||
AI2_BOT: 'AI2Bot',
|
||||
AIHIT_BOT: 'aiHitBot',
|
||||
ALGOLIA_CRAWLER: 'Algolia Crawler',
|
||||
APPLE_BOT: 'Applebot',
|
||||
APPLE_BOT_EXTENDED: 'Applebot-Extended',
|
||||
ASK_TEOMA: 'Teoma',
|
||||
AMAZON_BOT: 'Amazonbot',
|
||||
AMAZON_CONTXBOT: 'contxbot',
|
||||
ANTHROPIC_AI: 'anthropic-ai',
|
||||
ANTHROPIC_CLAUDE_BOT: 'ClaudeBot',
|
||||
ANTHROPIC_CLAUDE_SEARCHBOT: 'Claude-SearchBot',
|
||||
ANTHROPIC_CLAUDE_WEB: 'Claude-Web',
|
||||
ARCHIVEORG_BOT: 'archive.org_bot',
|
||||
BAIDU_ADS: 'Baidu-ADS',
|
||||
BAIDU_SPIDER: 'Baiduspider',
|
||||
BAIDU_SPIDER_ADS: 'Baiduspider-ads',
|
||||
BAIDU_SPIDER_CPRO: 'Baiduspider-cpro',
|
||||
BAIDU_SPIDER_FAVO: 'Baiduspider-favo',
|
||||
BAIDU_SPIDER_IMAGE: 'Baiduspider-image',
|
||||
BAIDU_SPIDER_NEWS: 'Baiduspider-news',
|
||||
BAIDU_SPIDER_RENDER: 'Baiduspider-render',
|
||||
BAIDU_SPIDER_VIDEO: 'Baiduspider-video',
|
||||
BLEX_BOT: 'BLEXBot',
|
||||
BOTIFY: 'botify',
|
||||
BRAVE_BOT: 'Bravebot',
|
||||
BYTEDANCE_BYTESPIDER: 'Bytespider',
|
||||
BYTEDANCE_TIKTOKSPIDER: 'TikTokSpider',
|
||||
COMMON_CRAWL_CCBOT: 'CCBot',
|
||||
COCCOC_BOT_WEB: 'coccocbot-web',
|
||||
COCCOC_BOT_IMAGE: 'coccocbot-image',
|
||||
COHERE_TRAINING_DATA_CRAWLER: 'cohere-training-data-crawler',
|
||||
COTOYOGI: 'Cotoyogi',
|
||||
COVEO_BOT: 'Coveobot',
|
||||
CRITEO_BOT: 'CriteoBot',
|
||||
DATAFORSEO_BOT: 'DataForSeoBot',
|
||||
DAUM: 'Daum',
|
||||
DAUM_DAUMOA: 'Daumoa',
|
||||
DAUM_DAUMOA_IMAGE: 'Daumoa-image',
|
||||
DEEPSEEK_BOT: 'DeepSeekBot',
|
||||
DIFFBOT: 'Diffbot',
|
||||
DUCKDUCKGO_BOT: 'DuckDuckBot',
|
||||
DUCKDUCKGO_FAVICONS_BOT: 'DuckDuckGo-Favicons-Bot',
|
||||
ELASTIC: 'Elastic',
|
||||
EXALEAD_EXABOT: 'Exabot',
|
||||
FIRECRAWL_AGENT: 'FirecrawlAgent',
|
||||
FREESPOKE: 'Freespoke',
|
||||
GOOGLE_ADSBOT: 'AdsBot-Google',
|
||||
GOOGLE_ADSBOT_MOBILE: 'Adsbot-Google-Mobile',
|
||||
GOOGLE_ADSENSE: 'AdSense',
|
||||
GOOGLE_APIS: 'APIs-Google',
|
||||
GOOGLE_BOT: 'Googlebot',
|
||||
GOOGLE_BOT_IMAGE: 'Googlebot-Image',
|
||||
GOOGLE_BOT_NEWS: 'Googlebot-News',
|
||||
GOOGLE_BOT_VIDEO: 'Googlebot-Video',
|
||||
GOOGLE_CLOUDVERTEXBOT: 'Google-CloudVertexBot',
|
||||
GOOGLE_EXTENDED: 'Google-Extended',
|
||||
GOOGLE_INSPECTIONTOOL: 'Google-InspectionTool',
|
||||
GOOGLE_OTHER: 'GoogleOther',
|
||||
GOOGLE_OTHER_IMAGE: 'GoogleOther-Image',
|
||||
GOOGLE_OTHER_VIDEO: 'GoogleOther-Video',
|
||||
GOOGLE_SAFETY: 'Google-Safety',
|
||||
GOOGLE_STOREBOT: 'Storebot-Google',
|
||||
HIVE_IMAGESIFTBOT: 'ImagesiftBot',
|
||||
HUAWEI_PANGUBOT: 'PanguBot',
|
||||
HUAWEI_PETALBOT: 'PetalBot',
|
||||
HUGGINGFACE_BOT: 'HuggingFace-Bot',
|
||||
HUNTER_VELENPUBLICWEBCRAWLER: 'VelenPublicWebCrawler',
|
||||
IA_ARCHIVER: 'ia_archiver',
|
||||
IASK_BOT: 'iAskBot',
|
||||
KAGI_BOT: 'Kagibot',
|
||||
KANGAROO_BOT: 'Kangaroo Bot',
|
||||
LINE_SPIDER: 'Linespider',
|
||||
LINKEDIN_BOT: 'LinkedInBot',
|
||||
MAGPIE_CRAWLER: 'magpie-crawler',
|
||||
MARGINALIA: 'marginalia',
|
||||
META_EXTERNALAGENT: 'meta-externalagent',
|
||||
META_FACEBOOKBOT: 'FacebookBot',
|
||||
META_FACEBOOKCATALOG: 'facebookcatalog',
|
||||
META_FACEBOOKEXTERNALHIT: 'facebookexternalhit',
|
||||
MAJESTIC_MJ12BOT: 'MJ12bot',
|
||||
MICROSOFT_BINGBOT: 'Bingbot',
|
||||
MICROSOFT_MSNBOT: 'msnbot',
|
||||
MICROSOFT_ADIDXBOT: 'adidxbot',
|
||||
MOJEEK_BOT: 'MojeekBot',
|
||||
MOZ_DOTBOT: 'DotBot',
|
||||
ONCRAWL: 'OnCrawl',
|
||||
ONESPOT_SCRAPERBOT: 'Onespot-ScraperBot',
|
||||
OPENAI_GPTBOT: 'GPTBot',
|
||||
OPENAI_SEARCH_BOT: 'OAI-SearchBot',
|
||||
PERPLEXITY_BOT: 'PerplexityBot',
|
||||
QIHOO_360_SPIDER: '360Spider',
|
||||
QWANT_BOT: 'Qwantbot',
|
||||
REPLICATE_BOT: 'Replicate-Bot',
|
||||
RUNPOD_BOT: 'RunPod-Bot',
|
||||
SB_INTUITIONS_BOT: 'SBIntuitionsBot',
|
||||
SEEKPORT_BOT: 'SeekportBot',
|
||||
SEMRUSH_BOT: 'SemrushBot',
|
||||
SEMRUSH_BOT_BACKLINK: 'SemrushBot-BA',
|
||||
SEMRUSH_BOT_CONTENTSHAKE: 'SemrushBot-OCOB',
|
||||
SEMRUSH_BOT_SEO_CHECKER: 'SemrushBot-SI',
|
||||
SEZNAM_BOT: 'SeznamBot',
|
||||
SITEIMPROVE: 'Siteimprove',
|
||||
SOGOU_PIC_SPIDER: 'Sogou Pic Spider',
|
||||
SOGOU_WEB_SPIDER: 'Sogou web spider',
|
||||
STARTPAGE: 'Startpage',
|
||||
TIMPI_BOT: 'Timpibot',
|
||||
TOGETHER_BOT: 'Together-Bot',
|
||||
TURNITIN_BOT: 'TurnitinBot',
|
||||
TWIN_AGENT: 'TwinAgent',
|
||||
VERCEL_V0BOT: 'v0bot',
|
||||
WEBZIO: 'webzio',
|
||||
WEBZIO_EXTENDED: 'Webzio-Extended',
|
||||
WEBZIO_OMGILI: 'omgili',
|
||||
WEBZIO_OMGILI_BOT: 'omgilibot',
|
||||
XAI_BOT: 'xAI-Bot',
|
||||
YAHOO_JAPAN: 'Y!J-BRW',
|
||||
YAHOO_SLURP: 'Yahoo! Slurp',
|
||||
YANDEX_ACCESSIBILITY_BOT: 'YandexAccessibilityBot',
|
||||
YANDEX_ADDITIONAL_BOT: 'YandexAdditionalBot',
|
||||
YANDEX_ADNET: 'YandexAdNet',
|
||||
YANDEX_BLOGS: 'YandexBlogs',
|
||||
YANDEX_BOT: 'YandexBot',
|
||||
YANDEX_BOT_MIRRORDETECTOR: 'YandexBot MirrorDetector',
|
||||
YANDEX_COMBOT: 'YandexComBot',
|
||||
YANDEX_FAVICONS: 'YandexFavicons',
|
||||
YANDEX_IMAGE_RESIZER: 'YandexImageResizer',
|
||||
YANDEX_IMAGES: 'YandexImages',
|
||||
YANDEX_MARKET: 'YandexMarket',
|
||||
YANDEX_MEDIA: 'YandexMedia',
|
||||
YANDEX_METRIKA: 'YandexMetrika',
|
||||
YANDEX_MOBILE_BOT: 'YandexMobileBot',
|
||||
YANDEX_MOBILE_SCREENSHOT_BOT: 'YandexMobileScreenShotBot',
|
||||
YANDEX_NEWS: 'YandexNews',
|
||||
YANDEX_ONTODB: 'YandexOntoDB',
|
||||
YANDEX_ONTODB_API: 'YandexOntoDBAPI',
|
||||
YANDEX_PARTNER: 'YandexPartner',
|
||||
YANDEX_RCA: 'YandexRCA',
|
||||
YANDEX_RENDERRESOURCES_BOT: 'YandexRenderResourcesBot',
|
||||
YANDEX_SCREENSHOT_BOT: 'YandexScreenshotBot',
|
||||
YANDEX_SPRAV_BOT: 'YandexSpravBot',
|
||||
YANDEX_TRACKER: 'YandexTracker',
|
||||
YANDEX_VERTICALS: 'YandexVerticals',
|
||||
YANDEX_VERTIS: 'YandexVertis',
|
||||
YANDEX_VIDEO: 'YandexVideo',
|
||||
YANDEX_VIDEO_PARSER: 'YandexVideoParser',
|
||||
YANDEX_WEBMASTER: 'YandexWebmaster',
|
||||
YEP_BOT: 'YepBot',
|
||||
YETI: 'Yeti',
|
||||
YISOU_SPIDER: 'YisouSpider',
|
||||
YOU_BOT: 'YouBot',
|
||||
ZHIPU_CHATGLM_SPIDER: 'ChatGLM-Spider',
|
||||
ZUM_BOT: 'ZumBot'
|
||||
},
|
||||
Email: {
|
||||
AIRMAIL: 'Airmail',
|
||||
APPLE_MAIL: 'Mail',
|
||||
BLUEMAIL: 'BlueMail',
|
||||
DAUM_MAIL: 'DaumMail',
|
||||
EVOLUTION: 'Evolution',
|
||||
EM_CLIENT: 'eM Client',
|
||||
FOXMAIL: 'Foxmail',
|
||||
KMAIL: 'KMail',
|
||||
KMAIL2: 'kmail2',
|
||||
KONTACT: 'Kontact',
|
||||
MICROSOFT_OUTLOOK: 'Microsoft Outlook',
|
||||
MICROSOFT_OUTLOOK_MAC: 'MacOutlook',
|
||||
NAVER_MAILAPP: 'NaverMailApp',
|
||||
POLYMAIL: 'Polymail',
|
||||
PROTON_MAIL: 'ProtonMail',
|
||||
SPARK_MAIL: 'SparkDesktop',
|
||||
SPARROW: 'Sparrow',
|
||||
THUNDERBIRD: 'Thunderbird',
|
||||
YAHOO_MAIL: 'Yahoo',
|
||||
ZIMBRA: 'Zimbra',
|
||||
ZOHO_MAIL: 'ZohoMail-Desktop'
|
||||
},
|
||||
Fetcher: {
|
||||
AHREFS_SITEAUDIT: 'AhrefsSiteAudit',
|
||||
ANTHROPIC_CLAUDE_USER: 'Claude-User',
|
||||
ASANA: 'Asana',
|
||||
BETTER_UPTIME_BOT: 'Better Uptime Bot',
|
||||
BITLY_BOT: 'bitlybot',
|
||||
BLUESKY: 'Bluesky',
|
||||
BUFFER_LINKPREVIEWBOT: 'BufferLinkPreviewBot',
|
||||
COHERE_AI: 'Cohere-AI',
|
||||
DUCKDUCKGO_ASSISTBOT: 'DuckAssistBot',
|
||||
GOOGLE_CHROME_LIGHTHOUSE: 'Chrome-Lighthouse',
|
||||
GOOGLE_FEEDFETCHER: 'FeedFetcher-Google',
|
||||
GOOGLE_GEMINI_DEEP_RESEARCH: 'Gemini-Deep-Research',
|
||||
GOOGLE_IMAGEPROXY: 'GoogleImageProxy',
|
||||
GOOGLE_PAGERENDERER: 'Google-PageRenderer',
|
||||
GOOGLE_READ_ALOUD: 'Google-Read-Aloud',
|
||||
GOOGLE_PRODUCER: 'GoogleProducer',
|
||||
GOOGLE_SITE_VERIFICATION: 'Google-Site-Verification',
|
||||
HUBSPOT_PAGE_FETCHER: 'HubSpot Page Fetcher',
|
||||
IFRAMELY: 'Iframely',
|
||||
KAKAOTALK_SCRAP: 'kakaotalk-scrap',
|
||||
META_EXTERNALFETCHER: 'meta-externalfetcher',
|
||||
META_WHATSAPP: 'WhatsApp',
|
||||
MICROSOFT_BINGPREVIEW: 'BingPreview',
|
||||
MICROSOFT_PREVIEW: 'MicrosoftPreview',
|
||||
MISTRALAI_USER: 'MistralAI-User',
|
||||
NAVER_BLUENO: 'Blueno',
|
||||
ONCRAWL_ROGERBOT: 'rogerbot',
|
||||
OPENAI_CHATGPT_USER: 'ChatGPT-User',
|
||||
PERPLEXITY_USER: 'Perplexity-User',
|
||||
PINTEREST_BOT: 'Pinterestbot',
|
||||
SEMRUSH_SITEAUDITBOT: 'SiteAuditBot',
|
||||
SNAP_URL_PREVIEW: 'Snap URL Preview',
|
||||
SKYPE_URIPREVIEW: 'SkypeUriPreview',
|
||||
TELEGRAM_BOT: 'TelegramBot',
|
||||
UPTIMEROBOT: 'UptimeRobot',
|
||||
VERCEL_FAVICON_BOT: 'vercel-favicon-bot',
|
||||
VERCEL_SCREENSHOT_BOT: 'vercel-screenshot-bot',
|
||||
VERCEL_BOT: 'Vercelbot',
|
||||
VERCEL_FLAGS: 'vercelflags',
|
||||
VERCEL_TRACING: 'verceltracing',
|
||||
YANDEX_CALENDAR: 'YandexCalendar',
|
||||
YANDEX_DIRECT: 'YandexDirect',
|
||||
YANDEX_DIRECTDYN: 'YandexDirectDyn',
|
||||
YANDEX_DIRECTFETCHER: 'YaDirectFetcher',
|
||||
YANDEX_FORDOMAIN: 'YandexForDomain',
|
||||
YANDEX_PAGECHECKER: 'YandexPagechecker',
|
||||
YANDEX_SEARCHSHOP: 'YandexSearchShop',
|
||||
YANDEX_SITELINKS: 'YandexSitelinks',
|
||||
YANDEX_USERPROXY: 'YandexUserproxy',
|
||||
ZOOMINFO_BOT: 'Zoombot'
|
||||
},
|
||||
InApp: {
|
||||
DISCORD: 'Discord',
|
||||
EVERNOTE: 'Evernote',
|
||||
FIGMA: 'Figma',
|
||||
FLIPBOARD: 'Flipboard',
|
||||
MATTERMOST: 'Mattermost',
|
||||
TEAMS: 'Teams',
|
||||
NOTION: 'Notion',
|
||||
POSTMAN: 'Postman',
|
||||
RAMBOX: 'Rambox',
|
||||
ROCKETCHAT: 'Rocket.Chat',
|
||||
SLACK: 'Slack',
|
||||
TIKTOK_LITE: 'TikTok Lite',
|
||||
VSCODE: 'VS Code',
|
||||
YAHOO_JAPAN: 'Yahoo! Japan'
|
||||
},
|
||||
Library: {
|
||||
ADOBE_AIR: 'AdobeAIR',
|
||||
AIOHTTP: 'aiohttp',
|
||||
APACHE_HTTPCLIENT: 'Apache-HttpClient',
|
||||
AXIOS: 'axios',
|
||||
GO_HTTP_CLIENT: 'go-http-client',
|
||||
GOT: 'got',
|
||||
GUZZLEHTTP: 'GuzzleHttp',
|
||||
JAVA: 'Java',
|
||||
JAVA_HTTPCLIENT: 'Java-http-client',
|
||||
JSDOM: 'jsdom',
|
||||
LIBWWW_PERL: 'libwww-perl',
|
||||
LUA_RESTY_HTTP: 'lua-resty-http',
|
||||
NEEDLE: 'Needle',
|
||||
NUTCH: 'Nutch',
|
||||
OKHTTP: 'OkHttp',
|
||||
NODE_FETCH: 'node-fetch',
|
||||
NODE_SUPERAGENT: 'node-superagent',
|
||||
PHP_SOAP: 'PHP-SOAP',
|
||||
POSTMAN_RUNTIME: 'PostmanRuntime',
|
||||
PYTHON_HTTPX: 'python-httpx',
|
||||
PYTHON_URLLIB: 'python-urllib',
|
||||
PYTHON_URLLIB3: 'python-urllib3',
|
||||
PYTHON_REQUESTS: 'python-requests',
|
||||
SCRAPY: 'Scrapy'
|
||||
}
|
||||
},
|
||||
DeviceVendor: {
|
||||
Vehicle: {
|
||||
BMW: 'BMW',
|
||||
BYD: 'BYD',
|
||||
JEEP: 'Jeep',
|
||||
RIVIAN: 'Rivian',
|
||||
TESLA: 'Tesla',
|
||||
VOLVO: 'Volvo'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
Browser,
|
||||
Browser,// deprecated
|
||||
CPU, // deprecated
|
||||
Device, // deprecated
|
||||
Vendor, // deprecated
|
||||
Engine, // deprecated
|
||||
OS, // deprecated
|
||||
BrowserName,
|
||||
BrowserType,
|
||||
CPU,
|
||||
Device,
|
||||
Vendor,
|
||||
Engine,
|
||||
OS
|
||||
CPUArch,
|
||||
DeviceType,
|
||||
DeviceVendor,
|
||||
EngineName,
|
||||
OSName,
|
||||
Extension
|
||||
};
|
||||
@@ -3,15 +3,15 @@
|
||||
// Source: /src/enums/ua-parser-enums.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Enums for UAParser.js v2.0.0
|
||||
/* Enums for UAParser.js v2.0.5
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Personal License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
const Browser = Object.freeze({
|
||||
const BrowserName = Object.freeze({
|
||||
'115': '115',
|
||||
'2345': '2345',
|
||||
'360': '360',
|
||||
@@ -38,12 +38,17 @@ const Browser = Object.freeze({
|
||||
COBALT: 'Cobalt',
|
||||
COC_COC: 'Coc Coc',
|
||||
CONKEROR: 'Conkeror',
|
||||
DAUM: 'Daum',
|
||||
DILLO: 'Dillo',
|
||||
DOLPHIN: 'Dolphin',
|
||||
DOOBLE: 'Dooble',
|
||||
DORIS: 'Doris',
|
||||
DRAGON: 'Dragon',
|
||||
DUCKDUCKGO: 'DuckDuckGo',
|
||||
ECOSIA: 'Ecosia',
|
||||
EDGE: 'Edge',
|
||||
EDGE_WEBVIEW: 'Edge WebView',
|
||||
EDGE_WEBVIEW2: 'Edge WebView2',
|
||||
EPIPHANY: 'Epiphany',
|
||||
FACEBOOK: 'Facebook',
|
||||
FALKON: 'Falkon',
|
||||
@@ -80,6 +85,8 @@ const Browser = Object.freeze({
|
||||
KLARNA: 'Klarna',
|
||||
KINDLE: 'Kindle',
|
||||
LENOVO: 'Smart Lenovo Browser',
|
||||
LADYBIRD: 'Ladybird',
|
||||
LG: 'LG Browser',
|
||||
LIBREWOLF: 'LibreWolf',
|
||||
LIEBAO: 'LBBROWSER',
|
||||
LINE: 'Line',
|
||||
@@ -104,10 +111,12 @@ const Browser = Object.freeze({
|
||||
OMNIWEB: 'OmniWeb',
|
||||
OPERA: 'Opera',
|
||||
OPERA_COAST: 'Opera Coast',
|
||||
OPERA_GX: 'Opera GX',
|
||||
OPERA_MINI: 'Opera Mini',
|
||||
OPERA_MOBI: 'Opera Mobi',
|
||||
OPERA_TABLET: 'Opera Tablet',
|
||||
OPERA_TOUCH: 'Opera Touch',
|
||||
OTTER: 'Otter',
|
||||
OVI: 'OviBrowser',
|
||||
PALEMOON: 'PaleMoon',
|
||||
PHANTOMJS: 'PhantomJS',
|
||||
@@ -119,6 +128,7 @@ const Browser = Object.freeze({
|
||||
QQ_LITE: 'QQBrowserLite',
|
||||
QUARK: 'Quark',
|
||||
QUPZILLA: 'QupZilla',
|
||||
QUTEBROWSER: 'qutebrowser',
|
||||
REKONQ: 'rekonq',
|
||||
ROCKMELT: 'Rockmelt',
|
||||
SAFARI: 'Safari',
|
||||
@@ -135,6 +145,7 @@ const Browser = Object.freeze({
|
||||
SNAPCHAT: 'Snapchat',
|
||||
SOGOU_EXPLORER: 'Sogou Explorer',
|
||||
SOGOU_MOBILE: 'Sogou Mobile',
|
||||
SURF: 'Surf',
|
||||
SWIFTFOX: 'Swiftfox',
|
||||
TESLA: 'Tesla',
|
||||
TIKTOK: 'TikTok',
|
||||
@@ -151,10 +162,15 @@ const Browser = Object.freeze({
|
||||
WEIBO: 'Weibo',
|
||||
WHALE: 'Whale',
|
||||
WOLVIC: 'Wolvic',
|
||||
YANDEX: 'Yandex'
|
||||
YANDEX: 'Yandex',
|
||||
ZALO: 'Zalo'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `BrowserName` instead
|
||||
*/
|
||||
const Browser = BrowserName;
|
||||
|
||||
const BrowserType = Object.freeze({
|
||||
CRAWLER: 'crawler',
|
||||
@@ -166,8 +182,9 @@ const BrowserType = Object.freeze({
|
||||
LIBRARY: 'library'
|
||||
});
|
||||
|
||||
const CPU = Object.freeze({
|
||||
const CPUArch = Object.freeze({
|
||||
'68K': '68k',
|
||||
ALPHA: 'alpha',
|
||||
ARM : 'arm',
|
||||
ARM_64: 'arm64',
|
||||
ARM_HF: 'armhf',
|
||||
@@ -185,8 +202,12 @@ const CPU = Object.freeze({
|
||||
X86: 'ia32',
|
||||
X86_64: 'amd64'
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `CPUArch` instead
|
||||
*/
|
||||
const CPU = CPUArch;
|
||||
|
||||
const Device = Object.freeze({
|
||||
const DeviceType = Object.freeze({
|
||||
CONSOLE: 'console',
|
||||
DESKTOP: 'desktop',
|
||||
EMBEDDED: 'embedded',
|
||||
@@ -196,8 +217,12 @@ const Device = Object.freeze({
|
||||
WEARABLE: 'wearable',
|
||||
XR: 'xr'
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `DeviceType` instead
|
||||
*/
|
||||
const Device = DeviceType;
|
||||
|
||||
const Vendor = Object.freeze({
|
||||
const DeviceVendor = Object.freeze({
|
||||
ACER: 'Acer',
|
||||
ADVAN: 'Advan',
|
||||
ALCATEL: 'Alcatel',
|
||||
@@ -208,6 +233,7 @@ const Vendor = Object.freeze({
|
||||
ATT: 'AT&T',
|
||||
BENQ: 'BenQ',
|
||||
BLACKBERRY: 'BlackBerry',
|
||||
BLU: 'BLU',
|
||||
CAT: 'Cat',
|
||||
DELL: 'Dell',
|
||||
ENERGIZER: 'Energizer',
|
||||
@@ -217,6 +243,7 @@ const Vendor = Object.freeze({
|
||||
GEEKSPHONE: 'GeeksPhone',
|
||||
GENERIC: 'Generic',
|
||||
GOOGLE: 'Google',
|
||||
HMD: 'HMD',
|
||||
HP: 'HP',
|
||||
HTC: 'HTC',
|
||||
HUAWEI: 'Huawei',
|
||||
@@ -225,6 +252,7 @@ const Vendor = Object.freeze({
|
||||
ITEL: 'itel',
|
||||
JOLLA: 'Jolla',
|
||||
KOBO: 'Kobo',
|
||||
LAVA: 'Lava',
|
||||
LENOVO: 'Lenovo',
|
||||
LG: 'LG',
|
||||
MEIZU: 'Meizu',
|
||||
@@ -242,9 +270,11 @@ const Vendor = Object.freeze({
|
||||
PALM: 'Palm',
|
||||
PANASONIC: 'Panasonic',
|
||||
PEBBLE: 'Pebble',
|
||||
PHILIPS: 'Philips',
|
||||
PICO: 'Pico',
|
||||
POLYTRON: 'Polytron',
|
||||
REALME: 'Realme',
|
||||
RETROID: 'Retroid',
|
||||
RIM: 'RIM',
|
||||
ROKU: 'Roku',
|
||||
SAMSUNG: 'Samsung',
|
||||
@@ -255,10 +285,11 @@ const Vendor = Object.freeze({
|
||||
SPRINT: 'Sprint',
|
||||
TCL: 'TCL',
|
||||
TECHNISAT: 'TechniSAT',
|
||||
TECNO: 'Tecno',
|
||||
TECNO: 'TECNO',
|
||||
TESLA: 'Tesla',
|
||||
ULEFONE: 'Ulefone',
|
||||
VIVO: 'Vivo',
|
||||
VIZIO: 'Vizio',
|
||||
VODAFONE: 'Vodafone',
|
||||
XBOX: 'Xbox',
|
||||
XIAOMI: 'Xiaomi',
|
||||
@@ -267,8 +298,12 @@ const Vendor = Object.freeze({
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `DeviceVendor` instead
|
||||
*/
|
||||
const Vendor = DeviceVendor;
|
||||
|
||||
const Engine = Object.freeze({
|
||||
const EngineName = Object.freeze({
|
||||
AMAYA: 'Amaya',
|
||||
ARKWEB: 'ArkWeb',
|
||||
BLINK: 'Blink',
|
||||
@@ -290,12 +325,17 @@ const Engine = Object.freeze({
|
||||
W3M: 'w3m',
|
||||
WEBKIT: 'WebKit'
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `EngineName` instead
|
||||
*/
|
||||
const Engine = EngineName;
|
||||
|
||||
const OS = Object.freeze({
|
||||
const OSName = Object.freeze({
|
||||
AIX: 'AIX',
|
||||
AMIGA_OS: 'Amiga OS',
|
||||
ANDROID: 'Android',
|
||||
ANDROID_X86: 'Android-x86',
|
||||
ARCAOS: 'ArcaOS',
|
||||
ARCH: 'Arch',
|
||||
BADA: 'Bada',
|
||||
BEOS: 'BeOS',
|
||||
@@ -326,6 +366,8 @@ const OS = Object.freeze({
|
||||
IOS: 'iOS',
|
||||
JOLI: 'Joli',
|
||||
KAIOS: 'KaiOS',
|
||||
KNOPPIX: 'Knoppix',
|
||||
KUBUNTU: 'Kubuntu',
|
||||
LINPUS: 'Linpus',
|
||||
LINSPIRE: 'Linspire',
|
||||
LINUX: 'Linux',
|
||||
@@ -367,25 +409,339 @@ const OS = Object.freeze({
|
||||
SYMBIAN: 'Symbian',
|
||||
TIZEN: 'Tizen',
|
||||
UBUNTU: 'Ubuntu',
|
||||
UBUNTU_TOUCH: 'Ubuntu Touch',
|
||||
UNIX: 'Unix',
|
||||
VECTORLINUX: 'VectorLinux',
|
||||
WATCHOS: 'watchOS',
|
||||
WEBOS: 'WebOS',
|
||||
WINDOWS: 'Windows',
|
||||
WINDOWS_CE: 'Windows CE',
|
||||
WINDOWS_IOT: 'Windows IoT',
|
||||
WINDOWS_MOBILE: 'Windows Mobile',
|
||||
WINDOWS_PHONE: 'Windows Phone',
|
||||
WINDOWS_RT: 'Windows RT',
|
||||
XBOX: 'Xbox',
|
||||
XUBUNTU: 'Xubuntu',
|
||||
ZENWALK: 'Zenwalk'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
/**
|
||||
* @deprecated Use `OSName` instead
|
||||
*/
|
||||
const OS = OSName;
|
||||
|
||||
/*////////////////////////////////
|
||||
* Enums for Extensions submodule
|
||||
*///////////////////////////////
|
||||
|
||||
const Extension = Object.freeze({
|
||||
BrowserName: {
|
||||
CLI: {
|
||||
CURL: 'curl',
|
||||
ELINKS: 'ELinks',
|
||||
HTTPIE: 'HTTPie',
|
||||
LYNX: 'Lynx',
|
||||
WGET: 'Wget'
|
||||
},
|
||||
Crawler: {
|
||||
AHREFS_BOT: 'AhrefsBot',
|
||||
AI2_BOT: 'AI2Bot',
|
||||
AIHIT_BOT: 'aiHitBot',
|
||||
ALGOLIA_CRAWLER: 'Algolia Crawler',
|
||||
APPLE_BOT: 'Applebot',
|
||||
APPLE_BOT_EXTENDED: 'Applebot-Extended',
|
||||
ASK_TEOMA: 'Teoma',
|
||||
AMAZON_BOT: 'Amazonbot',
|
||||
AMAZON_CONTXBOT: 'contxbot',
|
||||
ANTHROPIC_AI: 'anthropic-ai',
|
||||
ANTHROPIC_CLAUDE_BOT: 'ClaudeBot',
|
||||
ANTHROPIC_CLAUDE_SEARCHBOT: 'Claude-SearchBot',
|
||||
ANTHROPIC_CLAUDE_WEB: 'Claude-Web',
|
||||
ARCHIVEORG_BOT: 'archive.org_bot',
|
||||
BAIDU_ADS: 'Baidu-ADS',
|
||||
BAIDU_SPIDER: 'Baiduspider',
|
||||
BAIDU_SPIDER_ADS: 'Baiduspider-ads',
|
||||
BAIDU_SPIDER_CPRO: 'Baiduspider-cpro',
|
||||
BAIDU_SPIDER_FAVO: 'Baiduspider-favo',
|
||||
BAIDU_SPIDER_IMAGE: 'Baiduspider-image',
|
||||
BAIDU_SPIDER_NEWS: 'Baiduspider-news',
|
||||
BAIDU_SPIDER_RENDER: 'Baiduspider-render',
|
||||
BAIDU_SPIDER_VIDEO: 'Baiduspider-video',
|
||||
BLEX_BOT: 'BLEXBot',
|
||||
BOTIFY: 'botify',
|
||||
BRAVE_BOT: 'Bravebot',
|
||||
BYTEDANCE_BYTESPIDER: 'Bytespider',
|
||||
BYTEDANCE_TIKTOKSPIDER: 'TikTokSpider',
|
||||
COMMON_CRAWL_CCBOT: 'CCBot',
|
||||
COCCOC_BOT_WEB: 'coccocbot-web',
|
||||
COCCOC_BOT_IMAGE: 'coccocbot-image',
|
||||
COHERE_TRAINING_DATA_CRAWLER: 'cohere-training-data-crawler',
|
||||
COTOYOGI: 'Cotoyogi',
|
||||
COVEO_BOT: 'Coveobot',
|
||||
CRITEO_BOT: 'CriteoBot',
|
||||
DATAFORSEO_BOT: 'DataForSeoBot',
|
||||
DAUM: 'Daum',
|
||||
DAUM_DAUMOA: 'Daumoa',
|
||||
DAUM_DAUMOA_IMAGE: 'Daumoa-image',
|
||||
DEEPSEEK_BOT: 'DeepSeekBot',
|
||||
DIFFBOT: 'Diffbot',
|
||||
DUCKDUCKGO_BOT: 'DuckDuckBot',
|
||||
DUCKDUCKGO_FAVICONS_BOT: 'DuckDuckGo-Favicons-Bot',
|
||||
ELASTIC: 'Elastic',
|
||||
EXALEAD_EXABOT: 'Exabot',
|
||||
FIRECRAWL_AGENT: 'FirecrawlAgent',
|
||||
FREESPOKE: 'Freespoke',
|
||||
GOOGLE_ADSBOT: 'AdsBot-Google',
|
||||
GOOGLE_ADSBOT_MOBILE: 'Adsbot-Google-Mobile',
|
||||
GOOGLE_ADSENSE: 'AdSense',
|
||||
GOOGLE_APIS: 'APIs-Google',
|
||||
GOOGLE_BOT: 'Googlebot',
|
||||
GOOGLE_BOT_IMAGE: 'Googlebot-Image',
|
||||
GOOGLE_BOT_NEWS: 'Googlebot-News',
|
||||
GOOGLE_BOT_VIDEO: 'Googlebot-Video',
|
||||
GOOGLE_CLOUDVERTEXBOT: 'Google-CloudVertexBot',
|
||||
GOOGLE_EXTENDED: 'Google-Extended',
|
||||
GOOGLE_INSPECTIONTOOL: 'Google-InspectionTool',
|
||||
GOOGLE_OTHER: 'GoogleOther',
|
||||
GOOGLE_OTHER_IMAGE: 'GoogleOther-Image',
|
||||
GOOGLE_OTHER_VIDEO: 'GoogleOther-Video',
|
||||
GOOGLE_SAFETY: 'Google-Safety',
|
||||
GOOGLE_STOREBOT: 'Storebot-Google',
|
||||
HIVE_IMAGESIFTBOT: 'ImagesiftBot',
|
||||
HUAWEI_PANGUBOT: 'PanguBot',
|
||||
HUAWEI_PETALBOT: 'PetalBot',
|
||||
HUGGINGFACE_BOT: 'HuggingFace-Bot',
|
||||
HUNTER_VELENPUBLICWEBCRAWLER: 'VelenPublicWebCrawler',
|
||||
IA_ARCHIVER: 'ia_archiver',
|
||||
IASK_BOT: 'iAskBot',
|
||||
KAGI_BOT: 'Kagibot',
|
||||
KANGAROO_BOT: 'Kangaroo Bot',
|
||||
LINE_SPIDER: 'Linespider',
|
||||
LINKEDIN_BOT: 'LinkedInBot',
|
||||
MAGPIE_CRAWLER: 'magpie-crawler',
|
||||
MARGINALIA: 'marginalia',
|
||||
META_EXTERNALAGENT: 'meta-externalagent',
|
||||
META_FACEBOOKBOT: 'FacebookBot',
|
||||
META_FACEBOOKCATALOG: 'facebookcatalog',
|
||||
META_FACEBOOKEXTERNALHIT: 'facebookexternalhit',
|
||||
MAJESTIC_MJ12BOT: 'MJ12bot',
|
||||
MICROSOFT_BINGBOT: 'Bingbot',
|
||||
MICROSOFT_MSNBOT: 'msnbot',
|
||||
MICROSOFT_ADIDXBOT: 'adidxbot',
|
||||
MOJEEK_BOT: 'MojeekBot',
|
||||
MOZ_DOTBOT: 'DotBot',
|
||||
ONCRAWL: 'OnCrawl',
|
||||
ONESPOT_SCRAPERBOT: 'Onespot-ScraperBot',
|
||||
OPENAI_GPTBOT: 'GPTBot',
|
||||
OPENAI_SEARCH_BOT: 'OAI-SearchBot',
|
||||
PERPLEXITY_BOT: 'PerplexityBot',
|
||||
QIHOO_360_SPIDER: '360Spider',
|
||||
QWANT_BOT: 'Qwantbot',
|
||||
REPLICATE_BOT: 'Replicate-Bot',
|
||||
RUNPOD_BOT: 'RunPod-Bot',
|
||||
SB_INTUITIONS_BOT: 'SBIntuitionsBot',
|
||||
SEEKPORT_BOT: 'SeekportBot',
|
||||
SEMRUSH_BOT: 'SemrushBot',
|
||||
SEMRUSH_BOT_BACKLINK: 'SemrushBot-BA',
|
||||
SEMRUSH_BOT_CONTENTSHAKE: 'SemrushBot-OCOB',
|
||||
SEMRUSH_BOT_SEO_CHECKER: 'SemrushBot-SI',
|
||||
SEZNAM_BOT: 'SeznamBot',
|
||||
SITEIMPROVE: 'Siteimprove',
|
||||
SOGOU_PIC_SPIDER: 'Sogou Pic Spider',
|
||||
SOGOU_WEB_SPIDER: 'Sogou web spider',
|
||||
STARTPAGE: 'Startpage',
|
||||
TIMPI_BOT: 'Timpibot',
|
||||
TOGETHER_BOT: 'Together-Bot',
|
||||
TURNITIN_BOT: 'TurnitinBot',
|
||||
TWIN_AGENT: 'TwinAgent',
|
||||
VERCEL_V0BOT: 'v0bot',
|
||||
WEBZIO: 'webzio',
|
||||
WEBZIO_EXTENDED: 'Webzio-Extended',
|
||||
WEBZIO_OMGILI: 'omgili',
|
||||
WEBZIO_OMGILI_BOT: 'omgilibot',
|
||||
XAI_BOT: 'xAI-Bot',
|
||||
YAHOO_JAPAN: 'Y!J-BRW',
|
||||
YAHOO_SLURP: 'Yahoo! Slurp',
|
||||
YANDEX_ACCESSIBILITY_BOT: 'YandexAccessibilityBot',
|
||||
YANDEX_ADDITIONAL_BOT: 'YandexAdditionalBot',
|
||||
YANDEX_ADNET: 'YandexAdNet',
|
||||
YANDEX_BLOGS: 'YandexBlogs',
|
||||
YANDEX_BOT: 'YandexBot',
|
||||
YANDEX_BOT_MIRRORDETECTOR: 'YandexBot MirrorDetector',
|
||||
YANDEX_COMBOT: 'YandexComBot',
|
||||
YANDEX_FAVICONS: 'YandexFavicons',
|
||||
YANDEX_IMAGE_RESIZER: 'YandexImageResizer',
|
||||
YANDEX_IMAGES: 'YandexImages',
|
||||
YANDEX_MARKET: 'YandexMarket',
|
||||
YANDEX_MEDIA: 'YandexMedia',
|
||||
YANDEX_METRIKA: 'YandexMetrika',
|
||||
YANDEX_MOBILE_BOT: 'YandexMobileBot',
|
||||
YANDEX_MOBILE_SCREENSHOT_BOT: 'YandexMobileScreenShotBot',
|
||||
YANDEX_NEWS: 'YandexNews',
|
||||
YANDEX_ONTODB: 'YandexOntoDB',
|
||||
YANDEX_ONTODB_API: 'YandexOntoDBAPI',
|
||||
YANDEX_PARTNER: 'YandexPartner',
|
||||
YANDEX_RCA: 'YandexRCA',
|
||||
YANDEX_RENDERRESOURCES_BOT: 'YandexRenderResourcesBot',
|
||||
YANDEX_SCREENSHOT_BOT: 'YandexScreenshotBot',
|
||||
YANDEX_SPRAV_BOT: 'YandexSpravBot',
|
||||
YANDEX_TRACKER: 'YandexTracker',
|
||||
YANDEX_VERTICALS: 'YandexVerticals',
|
||||
YANDEX_VERTIS: 'YandexVertis',
|
||||
YANDEX_VIDEO: 'YandexVideo',
|
||||
YANDEX_VIDEO_PARSER: 'YandexVideoParser',
|
||||
YANDEX_WEBMASTER: 'YandexWebmaster',
|
||||
YEP_BOT: 'YepBot',
|
||||
YETI: 'Yeti',
|
||||
YISOU_SPIDER: 'YisouSpider',
|
||||
YOU_BOT: 'YouBot',
|
||||
ZHIPU_CHATGLM_SPIDER: 'ChatGLM-Spider',
|
||||
ZUM_BOT: 'ZumBot'
|
||||
},
|
||||
Email: {
|
||||
AIRMAIL: 'Airmail',
|
||||
APPLE_MAIL: 'Mail',
|
||||
BLUEMAIL: 'BlueMail',
|
||||
DAUM_MAIL: 'DaumMail',
|
||||
EVOLUTION: 'Evolution',
|
||||
EM_CLIENT: 'eM Client',
|
||||
FOXMAIL: 'Foxmail',
|
||||
KMAIL: 'KMail',
|
||||
KMAIL2: 'kmail2',
|
||||
KONTACT: 'Kontact',
|
||||
MICROSOFT_OUTLOOK: 'Microsoft Outlook',
|
||||
MICROSOFT_OUTLOOK_MAC: 'MacOutlook',
|
||||
NAVER_MAILAPP: 'NaverMailApp',
|
||||
POLYMAIL: 'Polymail',
|
||||
PROTON_MAIL: 'ProtonMail',
|
||||
SPARK_MAIL: 'SparkDesktop',
|
||||
SPARROW: 'Sparrow',
|
||||
THUNDERBIRD: 'Thunderbird',
|
||||
YAHOO_MAIL: 'Yahoo',
|
||||
ZIMBRA: 'Zimbra',
|
||||
ZOHO_MAIL: 'ZohoMail-Desktop'
|
||||
},
|
||||
Fetcher: {
|
||||
AHREFS_SITEAUDIT: 'AhrefsSiteAudit',
|
||||
ANTHROPIC_CLAUDE_USER: 'Claude-User',
|
||||
ASANA: 'Asana',
|
||||
BETTER_UPTIME_BOT: 'Better Uptime Bot',
|
||||
BITLY_BOT: 'bitlybot',
|
||||
BLUESKY: 'Bluesky',
|
||||
BUFFER_LINKPREVIEWBOT: 'BufferLinkPreviewBot',
|
||||
COHERE_AI: 'Cohere-AI',
|
||||
DUCKDUCKGO_ASSISTBOT: 'DuckAssistBot',
|
||||
GOOGLE_CHROME_LIGHTHOUSE: 'Chrome-Lighthouse',
|
||||
GOOGLE_FEEDFETCHER: 'FeedFetcher-Google',
|
||||
GOOGLE_GEMINI_DEEP_RESEARCH: 'Gemini-Deep-Research',
|
||||
GOOGLE_IMAGEPROXY: 'GoogleImageProxy',
|
||||
GOOGLE_PAGERENDERER: 'Google-PageRenderer',
|
||||
GOOGLE_READ_ALOUD: 'Google-Read-Aloud',
|
||||
GOOGLE_PRODUCER: 'GoogleProducer',
|
||||
GOOGLE_SITE_VERIFICATION: 'Google-Site-Verification',
|
||||
HUBSPOT_PAGE_FETCHER: 'HubSpot Page Fetcher',
|
||||
IFRAMELY: 'Iframely',
|
||||
KAKAOTALK_SCRAP: 'kakaotalk-scrap',
|
||||
META_EXTERNALFETCHER: 'meta-externalfetcher',
|
||||
META_WHATSAPP: 'WhatsApp',
|
||||
MICROSOFT_BINGPREVIEW: 'BingPreview',
|
||||
MICROSOFT_PREVIEW: 'MicrosoftPreview',
|
||||
MISTRALAI_USER: 'MistralAI-User',
|
||||
NAVER_BLUENO: 'Blueno',
|
||||
ONCRAWL_ROGERBOT: 'rogerbot',
|
||||
OPENAI_CHATGPT_USER: 'ChatGPT-User',
|
||||
PERPLEXITY_USER: 'Perplexity-User',
|
||||
PINTEREST_BOT: 'Pinterestbot',
|
||||
SEMRUSH_SITEAUDITBOT: 'SiteAuditBot',
|
||||
SNAP_URL_PREVIEW: 'Snap URL Preview',
|
||||
SKYPE_URIPREVIEW: 'SkypeUriPreview',
|
||||
TELEGRAM_BOT: 'TelegramBot',
|
||||
UPTIMEROBOT: 'UptimeRobot',
|
||||
VERCEL_FAVICON_BOT: 'vercel-favicon-bot',
|
||||
VERCEL_SCREENSHOT_BOT: 'vercel-screenshot-bot',
|
||||
VERCEL_BOT: 'Vercelbot',
|
||||
VERCEL_FLAGS: 'vercelflags',
|
||||
VERCEL_TRACING: 'verceltracing',
|
||||
YANDEX_CALENDAR: 'YandexCalendar',
|
||||
YANDEX_DIRECT: 'YandexDirect',
|
||||
YANDEX_DIRECTDYN: 'YandexDirectDyn',
|
||||
YANDEX_DIRECTFETCHER: 'YaDirectFetcher',
|
||||
YANDEX_FORDOMAIN: 'YandexForDomain',
|
||||
YANDEX_PAGECHECKER: 'YandexPagechecker',
|
||||
YANDEX_SEARCHSHOP: 'YandexSearchShop',
|
||||
YANDEX_SITELINKS: 'YandexSitelinks',
|
||||
YANDEX_USERPROXY: 'YandexUserproxy',
|
||||
ZOOMINFO_BOT: 'Zoombot'
|
||||
},
|
||||
InApp: {
|
||||
DISCORD: 'Discord',
|
||||
EVERNOTE: 'Evernote',
|
||||
FIGMA: 'Figma',
|
||||
FLIPBOARD: 'Flipboard',
|
||||
MATTERMOST: 'Mattermost',
|
||||
TEAMS: 'Teams',
|
||||
NOTION: 'Notion',
|
||||
POSTMAN: 'Postman',
|
||||
RAMBOX: 'Rambox',
|
||||
ROCKETCHAT: 'Rocket.Chat',
|
||||
SLACK: 'Slack',
|
||||
TIKTOK_LITE: 'TikTok Lite',
|
||||
VSCODE: 'VS Code',
|
||||
YAHOO_JAPAN: 'Yahoo! Japan'
|
||||
},
|
||||
Library: {
|
||||
ADOBE_AIR: 'AdobeAIR',
|
||||
AIOHTTP: 'aiohttp',
|
||||
APACHE_HTTPCLIENT: 'Apache-HttpClient',
|
||||
AXIOS: 'axios',
|
||||
GO_HTTP_CLIENT: 'go-http-client',
|
||||
GOT: 'got',
|
||||
GUZZLEHTTP: 'GuzzleHttp',
|
||||
JAVA: 'Java',
|
||||
JAVA_HTTPCLIENT: 'Java-http-client',
|
||||
JSDOM: 'jsdom',
|
||||
LIBWWW_PERL: 'libwww-perl',
|
||||
LUA_RESTY_HTTP: 'lua-resty-http',
|
||||
NEEDLE: 'Needle',
|
||||
NUTCH: 'Nutch',
|
||||
OKHTTP: 'OkHttp',
|
||||
NODE_FETCH: 'node-fetch',
|
||||
NODE_SUPERAGENT: 'node-superagent',
|
||||
PHP_SOAP: 'PHP-SOAP',
|
||||
POSTMAN_RUNTIME: 'PostmanRuntime',
|
||||
PYTHON_HTTPX: 'python-httpx',
|
||||
PYTHON_URLLIB: 'python-urllib',
|
||||
PYTHON_URLLIB3: 'python-urllib3',
|
||||
PYTHON_REQUESTS: 'python-requests',
|
||||
SCRAPY: 'Scrapy'
|
||||
}
|
||||
},
|
||||
DeviceVendor: {
|
||||
Vehicle: {
|
||||
BMW: 'BMW',
|
||||
BYD: 'BYD',
|
||||
JEEP: 'Jeep',
|
||||
RIVIAN: 'Rivian',
|
||||
TESLA: 'Tesla',
|
||||
VOLVO: 'Volvo'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
Browser,
|
||||
Browser,// deprecated
|
||||
CPU, // deprecated
|
||||
Device, // deprecated
|
||||
Vendor, // deprecated
|
||||
Engine, // deprecated
|
||||
OS, // deprecated
|
||||
BrowserName,
|
||||
BrowserType,
|
||||
CPU,
|
||||
Device,
|
||||
Vendor,
|
||||
Engine,
|
||||
OS
|
||||
CPUArch,
|
||||
DeviceType,
|
||||
DeviceVendor,
|
||||
EngineName,
|
||||
OSName,
|
||||
Extension
|
||||
};
|
||||
5
src/extensions/ua-parser-extensions.d.ts
vendored
5
src/extensions/ua-parser-extensions.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.5
|
||||
// Project: https://github.com/faisalman/ua-parser-js
|
||||
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||
|
||||
@@ -12,4 +12,5 @@ export const Emails: UAParserExt;
|
||||
export const Fetchers: UAParserExt;
|
||||
export const InApps: UAParserExt;
|
||||
export const Libraries: UAParserExt;
|
||||
export const MediaPlayers: UAParserExt;
|
||||
export const MediaPlayers: UAParserExt;
|
||||
export const Vehicles: UAParserExt;
|
||||
@@ -1,8 +1,8 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Extensions for UAParser.js v2.0.0
|
||||
/* Extensions for UAParser.js v2.0.5
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Personal License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
@@ -42,32 +42,48 @@ const Crawlers = Object.freeze({
|
||||
[
|
||||
// AhrefsBot - https://ahrefs.com/robot
|
||||
// Amazonbot - https://developer.amazon.com/amazonbot
|
||||
// Bingbot - http://www.bing.com/bingbot.htm
|
||||
// Bingbot / AdIdxBot - https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0
|
||||
// Bravebot - https://search.brave.com/help/brave-search-crawler
|
||||
// CCBot - https://commoncrawl.org/faq
|
||||
// contxbot - https://affiliate-program.amazon.com/help/node/topic/GT98G5PPRERNVZ2C
|
||||
// Coveobot - https://connect.coveo.com/s/article/19648
|
||||
// CriteoBot - https://www.criteo.com/criteo-crawler/
|
||||
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
|
||||
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html
|
||||
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/
|
||||
// GPTBot - https://platform.openai.com/docs/gptbot
|
||||
// iAskBot - https://iask.ai
|
||||
// Kagibot - https://kagi.com/bot
|
||||
// Kangaroo Bot - https://kangaroollm.com.au/kangaroo-bot/
|
||||
// LinkedInBot - http://www.linkedin.com
|
||||
// MJ12bot - https://mj12bot.com/
|
||||
// MojeekBot - https://www.mojeek.com/bot.html
|
||||
// Onespot - https://www.onespot.com/identifying-traffic.html
|
||||
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
|
||||
// PerplexityBot - https://perplexity.ai/perplexitybot
|
||||
// SemrushBot - http://www.semrush.com/bot.html
|
||||
// SBIntuitionsBot - https://www.sbintuitions.co.jp/bot/
|
||||
// SeznamBot - http://napoveda.seznam.cz/seznambot-intro
|
||||
/((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i,
|
||||
// YepBot - https://yep.com/yepbot/
|
||||
/((?:adidx|ahrefs|amazon|bing|brave|cc|contx|coveo|criteo|dot|duckduck(?:go-favicons-)?|exa|facebook|gpt|iask|kagi|kangaroo |linkedin|mj12|mojeek|oai-search|onespot-scraper|perplexity|sbintuitions|semrush|seznam|yep)bot)\/([\w\.-]+)/i,
|
||||
|
||||
// Algolia Crawler
|
||||
/(algolia crawler(?: renderscript)?)\/?([\w\.]*)/i,
|
||||
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
/(applebot(?:-extended)?)\/([\w\.]+)/i,
|
||||
/(applebot(?:-extended)?)\/?([\w\.]*)/i,
|
||||
|
||||
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
||||
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
|
||||
/(baiduspider[-imagevdonwsfcpr]{0,7})\/?([\w\.]*)/i,
|
||||
|
||||
// ClaudeBot (Anthropic)
|
||||
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
||||
/(claude(?:bot|-searchbot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
||||
|
||||
// Coc Coc Bot - https://help.coccoc.com/en/search-engine
|
||||
/(coccocbot-(?:image|web))\/([\w\.]+)/i,
|
||||
|
||||
// Daum
|
||||
/(daum(?:oa)?(?:-image)?)[ \/]([\w\.]+)/i,
|
||||
|
||||
// Facebook / Meta
|
||||
// https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
|
||||
/(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
|
||||
@@ -78,6 +94,15 @@ const Crawlers = Object.freeze({
|
||||
// Internet Archive (archive.org)
|
||||
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
|
||||
|
||||
// OnCrawl
|
||||
/(oncrawl) mobile\/([\w\.]+)/i,
|
||||
|
||||
// Qwantbot - https://help.qwant.com/bot
|
||||
/(qwantbot)[-\w]*\/?([\w\.]*)/i,
|
||||
|
||||
// SemrushBot - http://www.semrush.com/bot.html
|
||||
/((?:semrush|splitsignal)bot[-abcfimostw]*)\/?([\w\.-]*)/i,
|
||||
|
||||
// Sogou Spider
|
||||
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
|
||||
|
||||
@@ -85,30 +110,38 @@ const Crawlers = Object.freeze({
|
||||
/(y!?j-(?:asr|br[uw]|dscv|mmp|vsidx|wsc))\/([\w\.]+)/i,
|
||||
|
||||
// Yandex Bots - https://yandex.com/bots
|
||||
/(yandex(?:(?:mobile)?(?:accessibility|additional|renderresources|screenshot|sprav)?bot|image(?:s|resizer)|video(?:parser)?|blogs|adnet|favicons|fordomain|market|media|metrika|news|ontodb(?:api)?|pagechecker|partner|rca|tracker|turbo|vertis|webmaster|antivirus))\/([\w\.]+)/i,
|
||||
/(yandex(?:(?:mobile)?(?:accessibility|additional|com|renderresources|screenshot|sprav)?bot(?!.+mirror)|image(?:s|resizer)|adnet|blogs|favicons|market|media|metrika|news|ontodb(?:api)?|partner|rca|tracker|turbo|verti(?:cal)?s|webmaster|video(?:parser)?))\/([\w\.]+)/i,
|
||||
|
||||
// Yeti (Naver)
|
||||
/(yeti)\/([\w\.]+)/i,
|
||||
|
||||
// aiHitBot / Diffbot / Magpie-Crawler / Omgilibot / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot
|
||||
/((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |yisou)spider)\/?([\w\.]*)/i
|
||||
// aiHitBot / Algolia Crawler / BLEXBot / Diffbot / FirecrawlAgent / HuggingFace-Bot / Linespider / MSNBot / Magpie-Crawler / Omgilibot / OpenAI Image Downloader / PanguBot / Replicate-Bot / RunPod-Bot / Webzio-Extended / Screaming Frog SEO Spider / Startpage / Timpibot / Together-Bot / VelenPublicWebCrawler / xAI-Bot / YisouSpider / YouBot / ZumBot
|
||||
// Cotoyogi - https://ds.rois.ac.jp/en_center8/en_crawler/
|
||||
// Freespoke - https://docs.freespoke.com/search/bot/
|
||||
/((?:aihit|blex|diff|huggingface-|msn|pangu|replicate-|runpod-|timpi|together-|xai-|you|zum)bot|(?:magpie-|velenpublicweb)crawler|(?:chatglm-|line|screaming frog seo |yisou)spider|cotoyogi|firecrawlagent|freespoke|omgili(?:bot)?|openai image downloader|startpageprivateimageproxy|twinagent|webzio-extended)\/?([\w\.]*)/i
|
||||
],
|
||||
|
||||
[NAME, VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
[
|
||||
// YandexBot MirrorDetector
|
||||
/(yandexbot\/([\w\.]+); mirrordetector)/i
|
||||
],
|
||||
[[NAME, /\/.+;/ig, ''], VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
[
|
||||
// Google Bots
|
||||
/((?:adsbot|apis|mediapartners)-google(?:-mobile)?|google-?(?:other|cloudvertexbot|extended|safety))/i,
|
||||
|
||||
// AI2Bot - https://allenai.org/crawler
|
||||
// Bytespider
|
||||
// DataForSeoBot - https://dataforseo.com/dataforseo-bot
|
||||
// Huawei AspiegelBot / PetalBot https://aspiegel.com/petalbot
|
||||
// ImagesiftBot - https://imagesift.com/about
|
||||
// Qihoo 360Spider
|
||||
// Siteimprove - https://help.siteimprove.com/support/solutions/articles/80000448553
|
||||
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
|
||||
// v0bot - https://vercel.com/docs/bot-management
|
||||
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
||||
/\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|(?=yahoo! )slurp)/i
|
||||
// Botify / Bytespider / DeepSeekBot / Qihoo 360Spider / SeekportBot / TikTokSpider
|
||||
/\b((ai2|aspiegel|dataforseo|deepseek|imagesift|petal|seekport|turnitin|v0)bot|360spider-?(image|video)?|baidu-ads|botify|(byte|tiktok)spider|cohere-training-data-crawler|elastic(?=\/s)|marginalia|siteimprove(?=bot|\.com)|teoma|webzio|yahoo! slurp)/i
|
||||
],
|
||||
[NAME, [TYPE, CRAWLER]]
|
||||
]
|
||||
@@ -201,9 +234,18 @@ const ExtraDevices = Object.freeze({
|
||||
const Emails = Object.freeze({
|
||||
browser : [
|
||||
[
|
||||
// Evolution / Kontact/KMail / [Microsoft/Mac] Outlook / Thunderbird
|
||||
/(airmail|bluemail|emclient|evolution|foxmail|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|thunderbird|yahoo)(?:m.+ail; |[\/ ])([\w\.]+)/i
|
||||
], [NAME, VERSION, [TYPE, EMAIL]]
|
||||
// Evolution / Kontact/KMail[2] / [Microsoft/Mac] Outlook / Thunderbird
|
||||
// Airmail / BlueMail / DaumMail / eMClient / Foxmail / NaverMailApp / Polymail
|
||||
// ProtonMail / SparkDesktop / Sparrow / Yahoo! Mail / Zimbra / ZohoMail-Desktop
|
||||
/((?:air|blue|daum|fox|poly|proton)mail|emclient|evolution|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|sparkdesktop|thunderbird|yahoo|zohomail-desktop)(?:m.+ail; |[\/ ])([\w\.]+)/i,
|
||||
|
||||
// Apple's Mail
|
||||
/(mail)\/([\w\.]+) cf/i
|
||||
], [NAME, VERSION, [TYPE, EMAIL]], [
|
||||
|
||||
// Zimbra
|
||||
/zdesktop\/([\w\.]+)/i
|
||||
], [VERSION, [NAME, 'Zimbra'], [TYPE, EMAIL]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -214,36 +256,42 @@ const Emails = Object.freeze({
|
||||
const Fetchers = Object.freeze({
|
||||
browser : [
|
||||
[
|
||||
// Asana / Bitlybot / Better Uptime / BingPreview / Blueno / Cohere-AI / HubSpot Page Fetcher / kakaotalk-scrap / Mastodon / MicrosoftPreview / Pinterestbot / Redditbot / Rogerbot / SiteAuditBot / Telegrambot / Twitterbot / UptimeRobot
|
||||
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
|
||||
// Buffer Link Preview Bot - https://scraper.buffer.com/about/bots/link-preview-bot
|
||||
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot
|
||||
// DuckAssistBot - https://duckduckgo.com/duckassistbot/
|
||||
// BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
|
||||
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
||||
// Google Site Verifier / Meta / Yahoo! Japan
|
||||
// Iframely - https://iframely.com/docs/about
|
||||
// Perplexity-User - https://docs.perplexity.ai/guides/bots
|
||||
// MistralAI-User - https://docs.mistral.ai/robots/
|
||||
// Yandex Bots - https://yandex.com/bots
|
||||
/(asana|ahrefssiteaudit|(?:bing|microsoft)preview|blueno|(?:chatgpt|claude|mistralai|perplexity)-user|cohere-ai|hubspot page fetcher|mastodon|(?:bitly|bufferlinkpreview|discord|duckassist|linkedin|pinterest|reddit|roger|siteaudit|twitter|uptimero|zoom)bot|google-site-verification|iframely|kakaotalk-scrap|meta-externalfetcher|y!?j-dlc|yandex(?:calendar|direct(?:dyn)?|fordomain|pagechecker|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
|
||||
|
||||
// Google Site Verifier
|
||||
/(google-site-verification)\/([\w\.]+)/i,
|
||||
// Bluesky
|
||||
/(bluesky) cardyb\/([\w\.]+)/i,
|
||||
|
||||
// Meta
|
||||
/(meta-externalfetcher)\/([\w\.]+)/i,
|
||||
// Skype
|
||||
/(skypeuripreview) preview\/([\w\.]+)/i,
|
||||
|
||||
// Slackbot - https://api.slack.com/robots
|
||||
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
|
||||
|
||||
// WhatsApp
|
||||
/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
|
||||
|
||||
// Yahoo! Japan
|
||||
/(y!?j-dlc)\/([\w\.]+)/i,
|
||||
|
||||
// Yandex Bots - https://yandex.com/bots
|
||||
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
|
||||
/(yandex(?:sitelinks|userproxy))/i
|
||||
/(whatsapp)\/([\w\.]+)/i
|
||||
],
|
||||
[NAME, VERSION, [TYPE, FETCHER]],
|
||||
|
||||
// Google Bots / Cohere / Snapchat / Vercelbot
|
||||
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
|
||||
[
|
||||
// Google Bots / Chrome-Lighthouse / Gemini-Deep-Research / Snapchat / Vercelbot / Yandex Bots
|
||||
/((?:better uptime |telegram|vercel)bot|chrome-lighthouse|feedfetcher-google|gemini-deep-research|google(?:imageproxy|-read-aloud|-pagerenderer|producer)|snap url preview|vercel(flags|tracing|-(favicon|screenshot)-bot)|yandex(?:sitelinks|userproxy))/i
|
||||
],
|
||||
[NAME, [TYPE, FETCHER]],
|
||||
],
|
||||
|
||||
os : [
|
||||
[/whatsapp\/[\d\.]+ (a|i)/i],
|
||||
[[NAME, os => os == 'A' ? 'Android' : 'iOS' ]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -252,12 +300,32 @@ const Fetchers = Object.freeze({
|
||||
///////////////////
|
||||
|
||||
const InApps = Object.freeze({
|
||||
browser : [
|
||||
browser : [[
|
||||
// Discord/Figma/Flipboard/Mattermost/Notion/Postman/Rambox/Rocket.Chat/Slack/Teams
|
||||
/\b(discord|figma|mattermost|notion|postman|rambox|rocket.chat|slack|teams)\/([\w\.]+).+(electron\/|; ios)/i,
|
||||
/(flipboard)\/([\w\.]+)/i
|
||||
], [NAME, VERSION, [TYPE, INAPP]], [
|
||||
|
||||
// Evernote/Teams on mobile
|
||||
/(evernote) win/i,
|
||||
/(teams)mobile-(ios|and)/i
|
||||
], [NAME, [TYPE, INAPP]], [
|
||||
|
||||
// Slack
|
||||
[/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, INAPP]],
|
||||
/chatlyio\/([\d\.]+)/i],
|
||||
[VERSION, [NAME, 'Slack'], [TYPE, INAPP]], [
|
||||
|
||||
// TikTok Lite
|
||||
/ultralite app_version\/([\w\.]+)/i],
|
||||
[VERSION, [NAME, 'TikTok Lite'], [TYPE, INAPP]], [
|
||||
|
||||
// VS Code
|
||||
/\) code\/([\d\.]+).+electron\//i],
|
||||
[VERSION, [NAME, 'VS Code'], [TYPE, INAPP]], [
|
||||
|
||||
// Yahoo! Japan
|
||||
[/jp\.co\.yahoo\.android\.yjtop\/([\d\.]+)/i], [VERSION, 'Yahoo! Japan', [TYPE, INAPP]]
|
||||
/jp\.co\.yahoo\.(?:android\.yjtop|ipn\.appli)\/([\d\.]+)/i],
|
||||
[VERSION, [NAME, 'Yahoo! Japan'], [TYPE, INAPP]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -321,12 +389,37 @@ const Libraries = Object.freeze({
|
||||
browser : [
|
||||
// Apache-HttpClient/Axios/go-http-client/got/GuzzleHttp/Java[-HttpClient]/jsdom/libwww-perl/lua-resty-http/Needle/node-fetch/OkHttp/PHP-SOAP/PostmanRuntime/python-urllib/python-requests/Scrapy/superagent
|
||||
[
|
||||
/^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:urllib|requests)|scrapy)\/([\w\.]+)/i,
|
||||
/(jsdom|(?<=\()java)\/([\w\.]+)/i
|
||||
/^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:httpx|urllib[23]?|requests)|scrapy)\/([\w\.]+)/i,
|
||||
/(adobeair|aiohttp|jsdom)\/([\w\.]+)/i,
|
||||
/(nutch)-([\w\.-]+)(\(|$)/i,
|
||||
/\((java)\/([\w\.]+)/i
|
||||
], [NAME, VERSION, [TYPE, LIBRARY]]
|
||||
]
|
||||
});
|
||||
|
||||
/////////////
|
||||
// VEHICLES
|
||||
////////////
|
||||
|
||||
const Vehicles = Object.freeze({
|
||||
device : [
|
||||
[/aftlbt962e2/i], // BMW
|
||||
[[VENDOR, 'BMW']],
|
||||
|
||||
[/dilink.+(byd) auto/i], // BYD
|
||||
[VENDOR],
|
||||
|
||||
[/aftlft962x3/i], // Jeep
|
||||
[[VENDOR, 'Jeep'], [MODEL, 'Wagooner']],
|
||||
|
||||
[/(rivian) (r1t)/i], // Rivian
|
||||
[VENDOR, MODEL],
|
||||
|
||||
[/vcc.+netfront/i], // Volvo
|
||||
[[VENDOR, 'Volvo']]
|
||||
]
|
||||
});
|
||||
|
||||
//////////
|
||||
// BOTS
|
||||
/////////
|
||||
@@ -334,9 +427,12 @@ const Libraries = Object.freeze({
|
||||
const Bots = Object.freeze({
|
||||
browser : [
|
||||
...CLIs.browser,
|
||||
...Crawlers.browser,
|
||||
...Fetchers.browser,
|
||||
...Crawlers.browser,
|
||||
...Libraries.browser
|
||||
],
|
||||
os : [
|
||||
...Fetchers.os
|
||||
]
|
||||
});
|
||||
|
||||
@@ -349,5 +445,6 @@ module.exports = {
|
||||
Fetchers,
|
||||
InApps,
|
||||
Libraries,
|
||||
MediaPlayers
|
||||
MediaPlayers,
|
||||
Vehicles
|
||||
};
|
||||
@@ -3,10 +3,10 @@
|
||||
// Source: /src/extensions/ua-parser-extensions.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Extensions for UAParser.js v2.0.0
|
||||
/* Extensions for UAParser.js v2.0.5
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Personal License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
@@ -46,32 +46,48 @@ const Crawlers = Object.freeze({
|
||||
[
|
||||
// AhrefsBot - https://ahrefs.com/robot
|
||||
// Amazonbot - https://developer.amazon.com/amazonbot
|
||||
// Bingbot - http://www.bing.com/bingbot.htm
|
||||
// Bingbot / AdIdxBot - https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0
|
||||
// Bravebot - https://search.brave.com/help/brave-search-crawler
|
||||
// CCBot - https://commoncrawl.org/faq
|
||||
// contxbot - https://affiliate-program.amazon.com/help/node/topic/GT98G5PPRERNVZ2C
|
||||
// Coveobot - https://connect.coveo.com/s/article/19648
|
||||
// CriteoBot - https://www.criteo.com/criteo-crawler/
|
||||
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
|
||||
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html
|
||||
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/
|
||||
// GPTBot - https://platform.openai.com/docs/gptbot
|
||||
// iAskBot - https://iask.ai
|
||||
// Kagibot - https://kagi.com/bot
|
||||
// Kangaroo Bot - https://kangaroollm.com.au/kangaroo-bot/
|
||||
// LinkedInBot - http://www.linkedin.com
|
||||
// MJ12bot - https://mj12bot.com/
|
||||
// MojeekBot - https://www.mojeek.com/bot.html
|
||||
// Onespot - https://www.onespot.com/identifying-traffic.html
|
||||
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
|
||||
// PerplexityBot - https://perplexity.ai/perplexitybot
|
||||
// SemrushBot - http://www.semrush.com/bot.html
|
||||
// SBIntuitionsBot - https://www.sbintuitions.co.jp/bot/
|
||||
// SeznamBot - http://napoveda.seznam.cz/seznambot-intro
|
||||
/((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i,
|
||||
// YepBot - https://yep.com/yepbot/
|
||||
/((?:adidx|ahrefs|amazon|bing|brave|cc|contx|coveo|criteo|dot|duckduck(?:go-favicons-)?|exa|facebook|gpt|iask|kagi|kangaroo |linkedin|mj12|mojeek|oai-search|onespot-scraper|perplexity|sbintuitions|semrush|seznam|yep)bot)\/([\w\.-]+)/i,
|
||||
|
||||
// Algolia Crawler
|
||||
/(algolia crawler(?: renderscript)?)\/?([\w\.]*)/i,
|
||||
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
/(applebot(?:-extended)?)\/([\w\.]+)/i,
|
||||
/(applebot(?:-extended)?)\/?([\w\.]*)/i,
|
||||
|
||||
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
||||
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
|
||||
/(baiduspider[-imagevdonwsfcpr]{0,7})\/?([\w\.]*)/i,
|
||||
|
||||
// ClaudeBot (Anthropic)
|
||||
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
||||
/(claude(?:bot|-searchbot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
||||
|
||||
// Coc Coc Bot - https://help.coccoc.com/en/search-engine
|
||||
/(coccocbot-(?:image|web))\/([\w\.]+)/i,
|
||||
|
||||
// Daum
|
||||
/(daum(?:oa)?(?:-image)?)[ \/]([\w\.]+)/i,
|
||||
|
||||
// Facebook / Meta
|
||||
// https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
|
||||
/(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
|
||||
@@ -82,6 +98,15 @@ const Crawlers = Object.freeze({
|
||||
// Internet Archive (archive.org)
|
||||
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
|
||||
|
||||
// OnCrawl
|
||||
/(oncrawl) mobile\/([\w\.]+)/i,
|
||||
|
||||
// Qwantbot - https://help.qwant.com/bot
|
||||
/(qwantbot)[-\w]*\/?([\w\.]*)/i,
|
||||
|
||||
// SemrushBot - http://www.semrush.com/bot.html
|
||||
/((?:semrush|splitsignal)bot[-abcfimostw]*)\/?([\w\.-]*)/i,
|
||||
|
||||
// Sogou Spider
|
||||
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
|
||||
|
||||
@@ -89,30 +114,38 @@ const Crawlers = Object.freeze({
|
||||
/(y!?j-(?:asr|br[uw]|dscv|mmp|vsidx|wsc))\/([\w\.]+)/i,
|
||||
|
||||
// Yandex Bots - https://yandex.com/bots
|
||||
/(yandex(?:(?:mobile)?(?:accessibility|additional|renderresources|screenshot|sprav)?bot|image(?:s|resizer)|video(?:parser)?|blogs|adnet|favicons|fordomain|market|media|metrika|news|ontodb(?:api)?|pagechecker|partner|rca|tracker|turbo|vertis|webmaster|antivirus))\/([\w\.]+)/i,
|
||||
/(yandex(?:(?:mobile)?(?:accessibility|additional|com|renderresources|screenshot|sprav)?bot(?!.+mirror)|image(?:s|resizer)|adnet|blogs|favicons|market|media|metrika|news|ontodb(?:api)?|partner|rca|tracker|turbo|verti(?:cal)?s|webmaster|video(?:parser)?))\/([\w\.]+)/i,
|
||||
|
||||
// Yeti (Naver)
|
||||
/(yeti)\/([\w\.]+)/i,
|
||||
|
||||
// aiHitBot / Diffbot / Magpie-Crawler / Omgilibot / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot
|
||||
/((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |yisou)spider)\/?([\w\.]*)/i
|
||||
// aiHitBot / Algolia Crawler / BLEXBot / Diffbot / FirecrawlAgent / HuggingFace-Bot / Linespider / MSNBot / Magpie-Crawler / Omgilibot / OpenAI Image Downloader / PanguBot / Replicate-Bot / RunPod-Bot / Webzio-Extended / Screaming Frog SEO Spider / Startpage / Timpibot / Together-Bot / VelenPublicWebCrawler / xAI-Bot / YisouSpider / YouBot / ZumBot
|
||||
// Cotoyogi - https://ds.rois.ac.jp/en_center8/en_crawler/
|
||||
// Freespoke - https://docs.freespoke.com/search/bot/
|
||||
/((?:aihit|blex|diff|huggingface-|msn|pangu|replicate-|runpod-|timpi|together-|xai-|you|zum)bot|(?:magpie-|velenpublicweb)crawler|(?:chatglm-|line|screaming frog seo |yisou)spider|cotoyogi|firecrawlagent|freespoke|omgili(?:bot)?|openai image downloader|startpageprivateimageproxy|twinagent|webzio-extended)\/?([\w\.]*)/i
|
||||
],
|
||||
|
||||
[NAME, VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
[
|
||||
// YandexBot MirrorDetector
|
||||
/(yandexbot\/([\w\.]+); mirrordetector)/i
|
||||
],
|
||||
[[NAME, /\/.+;/ig, ''], VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
[
|
||||
// Google Bots
|
||||
/((?:adsbot|apis|mediapartners)-google(?:-mobile)?|google-?(?:other|cloudvertexbot|extended|safety))/i,
|
||||
|
||||
// AI2Bot - https://allenai.org/crawler
|
||||
// Bytespider
|
||||
// DataForSeoBot - https://dataforseo.com/dataforseo-bot
|
||||
// Huawei AspiegelBot / PetalBot https://aspiegel.com/petalbot
|
||||
// ImagesiftBot - https://imagesift.com/about
|
||||
// Qihoo 360Spider
|
||||
// Siteimprove - https://help.siteimprove.com/support/solutions/articles/80000448553
|
||||
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
|
||||
// v0bot - https://vercel.com/docs/bot-management
|
||||
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
||||
/\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|(?=yahoo! )slurp)/i
|
||||
// Botify / Bytespider / DeepSeekBot / Qihoo 360Spider / SeekportBot / TikTokSpider
|
||||
/\b((ai2|aspiegel|dataforseo|deepseek|imagesift|petal|seekport|turnitin|v0)bot|360spider-?(image|video)?|baidu-ads|botify|(byte|tiktok)spider|cohere-training-data-crawler|elastic(?=\/s)|marginalia|siteimprove(?=bot|\.com)|teoma|webzio|yahoo! slurp)/i
|
||||
],
|
||||
[NAME, [TYPE, CRAWLER]]
|
||||
]
|
||||
@@ -165,7 +198,7 @@ const ExtraDevices = Object.freeze({
|
||||
/\b(zur\d{3}) b/i // Swiss ZUR Tablet
|
||||
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
|
||||
|
||||
/\b((zeki)?tb.*\b) b/i // Zeki Tablets
|
||||
/^((zeki)?tb.*\b) b/i // Zeki Tablets
|
||||
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
|
||||
|
||||
/\b([yr]\d{2}) b/i,
|
||||
@@ -205,9 +238,18 @@ const ExtraDevices = Object.freeze({
|
||||
const Emails = Object.freeze({
|
||||
browser : [
|
||||
[
|
||||
// Evolution / Kontact/KMail / [Microsoft/Mac] Outlook / Thunderbird
|
||||
/(airmail|bluemail|emclient|evolution|foxmail|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|thunderbird|yahoo)(?:m.+ail; |[\/ ])([\w\.]+)/i
|
||||
], [NAME, VERSION, [TYPE, EMAIL]]
|
||||
// Evolution / Kontact/KMail[2] / [Microsoft/Mac] Outlook / Thunderbird
|
||||
// Airmail / BlueMail / DaumMail / eMClient / Foxmail / NaverMailApp / Polymail
|
||||
// ProtonMail / SparkDesktop / Sparrow / Yahoo! Mail / Zimbra / ZohoMail-Desktop
|
||||
/((?:air|blue|daum|fox|poly|proton)mail|emclient|evolution|kmail2?|kontact|(?:microsoft |mac)?outlook(?:-express)?|navermailapp|(?!chrom.+)sparrow|sparkdesktop|thunderbird|yahoo|zohomail-desktop)(?:m.+ail; |[\/ ])([\w\.]+)/i,
|
||||
|
||||
// Apple's Mail
|
||||
/(mail)\/([\w\.]+) cf/i
|
||||
], [NAME, VERSION, [TYPE, EMAIL]], [
|
||||
|
||||
// Zimbra
|
||||
/zdesktop\/([\w\.]+)/i
|
||||
], [VERSION, [NAME, 'Zimbra'], [TYPE, EMAIL]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -218,36 +260,42 @@ const Emails = Object.freeze({
|
||||
const Fetchers = Object.freeze({
|
||||
browser : [
|
||||
[
|
||||
// Asana / Bitlybot / Better Uptime / BingPreview / Blueno / Cohere-AI / HubSpot Page Fetcher / kakaotalk-scrap / Mastodon / MicrosoftPreview / Pinterestbot / Redditbot / Rogerbot / SiteAuditBot / Telegrambot / Twitterbot / UptimeRobot
|
||||
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
|
||||
// Buffer Link Preview Bot - https://scraper.buffer.com/about/bots/link-preview-bot
|
||||
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot
|
||||
// DuckAssistBot - https://duckduckgo.com/duckassistbot/
|
||||
// BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
|
||||
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
||||
// Google Site Verifier / Meta / Yahoo! Japan
|
||||
// Iframely - https://iframely.com/docs/about
|
||||
// Perplexity-User - https://docs.perplexity.ai/guides/bots
|
||||
// MistralAI-User - https://docs.mistral.ai/robots/
|
||||
// Yandex Bots - https://yandex.com/bots
|
||||
/(asana|ahrefssiteaudit|(?:bing|microsoft)preview|blueno|(?:chatgpt|claude|mistralai|perplexity)-user|cohere-ai|hubspot page fetcher|mastodon|(?:bitly|bufferlinkpreview|discord|duckassist|linkedin|pinterest|reddit|roger|siteaudit|twitter|uptimero|zoom)bot|google-site-verification|iframely|kakaotalk-scrap|meta-externalfetcher|y!?j-dlc|yandex(?:calendar|direct(?:dyn)?|fordomain|pagechecker|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
|
||||
|
||||
// Google Site Verifier
|
||||
/(google-site-verification)\/([\w\.]+)/i,
|
||||
// Bluesky
|
||||
/(bluesky) cardyb\/([\w\.]+)/i,
|
||||
|
||||
// Meta
|
||||
/(meta-externalfetcher)\/([\w\.]+)/i,
|
||||
// Skype
|
||||
/(skypeuripreview) preview\/([\w\.]+)/i,
|
||||
|
||||
// Slackbot - https://api.slack.com/robots
|
||||
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
|
||||
|
||||
// WhatsApp
|
||||
/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
|
||||
|
||||
// Yahoo! Japan
|
||||
/(y!?j-dlc)\/([\w\.]+)/i,
|
||||
|
||||
// Yandex Bots - https://yandex.com/bots
|
||||
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
|
||||
/(yandex(?:sitelinks|userproxy))/i
|
||||
/(whatsapp)\/([\w\.]+)/i
|
||||
],
|
||||
[NAME, VERSION, [TYPE, FETCHER]],
|
||||
|
||||
// Google Bots / Cohere / Snapchat / Vercelbot
|
||||
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
|
||||
[
|
||||
// Google Bots / Chrome-Lighthouse / Gemini-Deep-Research / Snapchat / Vercelbot / Yandex Bots
|
||||
/((?:better uptime |telegram|vercel)bot|chrome-lighthouse|feedfetcher-google|gemini-deep-research|google(?:imageproxy|-read-aloud|-pagerenderer|producer)|snap url preview|vercel(flags|tracing|-(favicon|screenshot)-bot)|yandex(?:sitelinks|userproxy))/i
|
||||
],
|
||||
[NAME, [TYPE, FETCHER]],
|
||||
],
|
||||
|
||||
os : [
|
||||
[/whatsapp\/[\d\.]+ (a|i)/i],
|
||||
[[NAME, os => os == 'A' ? 'Android' : 'iOS' ]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -256,12 +304,32 @@ const Fetchers = Object.freeze({
|
||||
///////////////////
|
||||
|
||||
const InApps = Object.freeze({
|
||||
browser : [
|
||||
browser : [[
|
||||
// Discord/Figma/Flipboard/Mattermost/Notion/Postman/Rambox/Rocket.Chat/Slack/Teams
|
||||
/\b(discord|figma|mattermost|notion|postman|rambox|rocket.chat|slack|teams)\/([\w\.]+).+(electron\/|; ios)/i,
|
||||
/(flipboard)\/([\w\.]+)/i
|
||||
], [NAME, VERSION, [TYPE, INAPP]], [
|
||||
|
||||
// Evernote/Teams on mobile
|
||||
/(evernote) win/i,
|
||||
/(teams)mobile-(ios|and)/i
|
||||
], [NAME, [TYPE, INAPP]], [
|
||||
|
||||
// Slack
|
||||
[/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, INAPP]],
|
||||
/chatlyio\/([\d\.]+)/i],
|
||||
[VERSION, [NAME, 'Slack'], [TYPE, INAPP]], [
|
||||
|
||||
// TikTok Lite
|
||||
/ultralite app_version\/([\w\.]+)/i],
|
||||
[VERSION, [NAME, 'TikTok Lite'], [TYPE, INAPP]], [
|
||||
|
||||
// VS Code
|
||||
/\) code\/([\d\.]+).+electron\//i],
|
||||
[VERSION, [NAME, 'VS Code'], [TYPE, INAPP]], [
|
||||
|
||||
// Yahoo! Japan
|
||||
[/jp\.co\.yahoo\.android\.yjtop\/([\d\.]+)/i], [VERSION, 'Yahoo! Japan', [TYPE, INAPP]]
|
||||
/jp\.co\.yahoo\.(?:android\.yjtop|ipn\.appli)\/([\d\.]+)/i],
|
||||
[VERSION, [NAME, 'Yahoo! Japan'], [TYPE, INAPP]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -271,104 +339,48 @@ const InApps = Object.freeze({
|
||||
|
||||
const MediaPlayers = Object.freeze({
|
||||
browser : [[
|
||||
|
||||
/(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
|
||||
/(coremedia) v([\w\._]+)/i
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
|
||||
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
|
||||
/(apple(?:coremedia|tv))\/([\w\._]+)/i, // Generic Apple CoreMedia
|
||||
/(coremedia) v([\w\._]+)/i,
|
||||
// Ares/Nexplayer/OSSProxy
|
||||
/(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i,
|
||||
// Aqualung/Lyssna/BSPlayer/Clementine/MPD
|
||||
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/GnomeMplayer/MoC
|
||||
// NSPlayer/PSP-InternetRadioPlayer/Videos
|
||||
/(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
|
||||
/(lg player|nexplayer)\s([\d\.]+)/i,
|
||||
/player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
/(nexplayer)\s([\w\.-]+)/i // Nexplayer
|
||||
// Nero Home/Nero Scout/Nokia
|
||||
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
||||
// SoundTap/Totem/Stagefright/Streamium
|
||||
// XBMC/gvfs/Xine/XMMS/irapp
|
||||
/^(aqualung|audacious|audimusicstream|amarok|bass|bsplayer|core|gnomemplayer|gvfs|irapp|lyssna|music on console|nero (?:home|scout)|nokia\d+|nsplayer|psp-internetradioplayer|quicktime|rma|radioapp|radioclientapplication|soundtap|stagefright|streamium|totem|videos|xbmc|xine|xmms)\/([\w\.-]+)/i,
|
||||
/(lg player|nexplayer) ([\d\.]+)/i,
|
||||
/player\/(nexplayer|lg player) ([\w\.-]+)/i, // NexPlayer/LG Player
|
||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i, // Gstreamer
|
||||
/(htc streaming player) [\w_]+ \/ ([\d\.]+)/i, // HTC Streaming Player
|
||||
/(lavf)([\d\.]+)/i, // Lavf (FFMPEG)
|
||||
// MPlayer SVN
|
||||
/(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
|
||||
/ (songbird)\/([\w\.-]+)/i, // Songbird/Philips-Songbird
|
||||
/(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i, // Winamp
|
||||
/(vlc)(?:\/| media player - version )([\w\.-]+)/i, // VLC Videolan
|
||||
/^(foobar2000|itunes|smp)\/([\d\.]+)/i, // Foobar2000/iTunes/SMP
|
||||
/com\.(riseupradioalarm)\/([\d\.]*)/i, // RiseUP Radio Alarm
|
||||
/(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i, // MPlayer
|
||||
// Windows Media Server
|
||||
/(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(flrp)\/([\w\.-]+)/i // Flip Player
|
||||
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(fstream|nativehost|queryseekspider)/i
|
||||
// FStream/NativeHost/QuerySeekSpider
|
||||
// MPlayer (no other info)/Media Player Classic/Nero ShowTime
|
||||
// OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
||||
// inlight radio / YourMuze
|
||||
/(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
||||
// Gstreamer
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
/(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i, // HTC One S / Windows Media Player
|
||||
], [[NAME, /[_-]/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
|
||||
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
|
||||
], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
|
||||
// MPlayer SVN
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
|
||||
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(mplayer)/i, // MPlayer (no other info)
|
||||
/(yourmuze)/i, // YourMuze
|
||||
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(nokia\d+)\/([\w\.-]+)/i // Nokia
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(winamp)3 version ([\w\.-]+)/i, // Winamp
|
||||
/(winamp)\s([\w\.-]+)/i,
|
||||
/(winamp)mpeg\/([\w\.-]+)/i
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
||||
// inlight radio
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
|
||||
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
||||
// SoundTap/Totem/Stagefright/Streamium
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(smp)([\d\.]+)/i // SMP
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
|
||||
/(vlc)\/([\w\.-]+)/i,
|
||||
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
|
||||
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
|
||||
/(itunes)\/([\d\.]+)/i // iTunes
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
|
||||
/(windows-media-player)\/([\w\.-]+)/i
|
||||
], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
|
||||
// Windows Media Server
|
||||
], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(rad.io)\s([\d\.]+)/i, // Rad.io
|
||||
/(radio.(?:de|at|fr))\s([\d\.]+)/i
|
||||
/(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i // Rad.io
|
||||
], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
|
||||
]
|
||||
});
|
||||
@@ -381,12 +393,37 @@ const Libraries = Object.freeze({
|
||||
browser : [
|
||||
// Apache-HttpClient/Axios/go-http-client/got/GuzzleHttp/Java[-HttpClient]/jsdom/libwww-perl/lua-resty-http/Needle/node-fetch/OkHttp/PHP-SOAP/PostmanRuntime/python-urllib/python-requests/Scrapy/superagent
|
||||
[
|
||||
/^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:urllib|requests)|scrapy)\/([\w\.]+)/i,
|
||||
/(jsdom|(?<=\()java)\/([\w\.]+)/i
|
||||
/^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:httpx|urllib[23]?|requests)|scrapy)\/([\w\.]+)/i,
|
||||
/(adobeair|aiohttp|jsdom)\/([\w\.]+)/i,
|
||||
/(nutch)-([\w\.-]+)(\(|$)/i,
|
||||
/\((java)\/([\w\.]+)/i
|
||||
], [NAME, VERSION, [TYPE, LIBRARY]]
|
||||
]
|
||||
});
|
||||
|
||||
/////////////
|
||||
// VEHICLES
|
||||
////////////
|
||||
|
||||
const Vehicles = Object.freeze({
|
||||
device : [
|
||||
[/aftlbt962e2/i], // BMW
|
||||
[[VENDOR, 'BMW']],
|
||||
|
||||
[/dilink.+(byd) auto/i], // BYD
|
||||
[VENDOR],
|
||||
|
||||
[/aftlft962x3/i], // Jeep
|
||||
[[VENDOR, 'Jeep'], [MODEL, 'Wagooner']],
|
||||
|
||||
[/(rivian) (r1t)/i], // Rivian
|
||||
[VENDOR, MODEL],
|
||||
|
||||
[/vcc.+netfront/i], // Volvo
|
||||
[[VENDOR, 'Volvo']]
|
||||
]
|
||||
});
|
||||
|
||||
//////////
|
||||
// BOTS
|
||||
/////////
|
||||
@@ -394,9 +431,12 @@ const Libraries = Object.freeze({
|
||||
const Bots = Object.freeze({
|
||||
browser : [
|
||||
...CLIs.browser,
|
||||
...Crawlers.browser,
|
||||
...Fetchers.browser,
|
||||
...Crawlers.browser,
|
||||
...Libraries.browser
|
||||
],
|
||||
os : [
|
||||
...Fetchers.os
|
||||
]
|
||||
});
|
||||
|
||||
@@ -409,5 +449,6 @@ export {
|
||||
Fetchers,
|
||||
InApps,
|
||||
Libraries,
|
||||
MediaPlayers
|
||||
MediaPlayers,
|
||||
Vehicles
|
||||
};
|
||||
34
src/helpers/ua-parser-helpers.d.ts
vendored
34
src/helpers/ua-parser-helpers.d.ts
vendored
@@ -1,27 +1,15 @@
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.5
|
||||
// Project: https://github.com/faisalman/ua-parser-js
|
||||
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||
|
||||
import { IResult } from "../main/ua-parser";
|
||||
import type { IResult } from "../main/ua-parser";
|
||||
|
||||
declare function getDeviceVendor(model: string): string | undefined;
|
||||
declare function isAppleSilicon(resultOrUA: IResult | string): boolean;
|
||||
declare function isAIBot(resultOrUA: IResult | string): boolean;
|
||||
declare function isBot(resultOrUA: IResult | string): boolean;
|
||||
declare function isChromeFamily(resultOrUA: IResult | string): boolean;
|
||||
declare function isElectron(): boolean;
|
||||
declare function isFromEU(): boolean;
|
||||
declare function isFrozenUA(ua: string): boolean;
|
||||
declare function isStandalonePWA(): boolean;
|
||||
|
||||
export {
|
||||
getDeviceVendor,
|
||||
isAppleSilicon,
|
||||
isAIBot,
|
||||
isBot,
|
||||
isChromeFamily,
|
||||
isElectron,
|
||||
isFromEU,
|
||||
isFrozenUA,
|
||||
isStandalonePWA
|
||||
}
|
||||
export function getDeviceVendor(model: string): string | undefined;
|
||||
export function isAppleSilicon(resultOrUA: IResult | string): boolean;
|
||||
export function isAIBot(resultOrUA: IResult | string): boolean;
|
||||
export function isBot(resultOrUA: IResult | string): boolean;
|
||||
export function isChromeFamily(resultOrUA: IResult | string): boolean;
|
||||
export function isElectron(): boolean;
|
||||
export function isFromEU(): boolean;
|
||||
export function isFrozenUA(ua: string): boolean;
|
||||
export function isStandalonePWA(): boolean;
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Helpers for UAParser.js v2.0.0
|
||||
/* Helpers for UAParser.js v2.0.5
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Personal License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
const { UAParser } = require('../main/ua-parser');
|
||||
const { CPU, OS, Engine } = require('../enums/ua-parser-enums');
|
||||
const { Bots } = require('../extensions/ua-parser-extensions');
|
||||
const { CPUArch, OSName, EngineName, Extension, BrowserType } = require('../enums/ua-parser-enums');
|
||||
const { Bots, Crawlers } = require('../extensions/ua-parser-extensions');
|
||||
const { isFromEU } = require('detect-europe-js');
|
||||
const { isFrozenUA } = require('ua-is-frozen');
|
||||
const { isStandalonePWA } = require('is-standalone-pwa');
|
||||
const { Crawler } = Extension.BrowserName;
|
||||
|
||||
const toResult = (value, head, ext) => typeof value === 'string' ? UAParser(value, head, ext) : value;
|
||||
|
||||
@@ -20,8 +21,8 @@ const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${m
|
||||
|
||||
const isAppleSilicon = (resultOrUA) => {
|
||||
const res = toResult(resultOrUA);
|
||||
if (res.os.is(OS.MACOS)) {
|
||||
if (res.cpu.is(CPU.ARM)) {
|
||||
if (res.os.is(OSName.MACOS)) {
|
||||
if (res.cpu.is(CPUArch.ARM)) {
|
||||
return true;
|
||||
}
|
||||
if (typeof resultOrUA !== 'string' && typeof window !== 'undefined') {
|
||||
@@ -44,82 +45,129 @@ const isAppleSilicon = (resultOrUA) => {
|
||||
const isAIBot = (resultOrUA) => [
|
||||
|
||||
// AI2
|
||||
'ai2bot',
|
||||
Crawler.AI2_BOT,
|
||||
|
||||
// Amazon
|
||||
'amazonbot',
|
||||
Crawler.AMAZON_BOT,
|
||||
|
||||
// Anthropic
|
||||
'anthropic-ai',
|
||||
'claude-web',
|
||||
'claudebot',
|
||||
Crawler.ANTHROPIC_AI,
|
||||
Crawler.ANTHROPIC_CLAUDE_BOT,
|
||||
Crawler.ANTHROPIC_CLAUDE_SEARCHBOT,
|
||||
Crawler.ANTHROPIC_CLAUDE_WEB,
|
||||
|
||||
// Apple
|
||||
'applebot',
|
||||
'applebot-extended',
|
||||
Crawler.APPLE_BOT,
|
||||
Crawler.APPLE_BOT_EXTENDED,
|
||||
|
||||
// Brave
|
||||
Crawler.BRAVE_BOT,
|
||||
|
||||
// ByteDance
|
||||
'bytespider',
|
||||
Crawler.BYTEDANCE_BYTESPIDER,
|
||||
Crawler.BYTEDANCE_TIKTOKSPIDER,
|
||||
|
||||
// Cohere
|
||||
Crawler.COHERE_TRAINING_DATA_CRAWLER,
|
||||
|
||||
// Common Crawl
|
||||
'ccbot',
|
||||
Crawler.COMMON_CRAWL_CCBOT,
|
||||
|
||||
// Coveo
|
||||
Crawler.COVEO_BOT,
|
||||
|
||||
// DataForSeo
|
||||
'dataforseobot',
|
||||
Crawler.DATAFORSEO_BOT,
|
||||
|
||||
// DeepSeek
|
||||
Crawler.DEEPSEEK_BOT,
|
||||
|
||||
// Diffbot
|
||||
'diffbot',
|
||||
Crawler.DIFFBOT,
|
||||
|
||||
// Google
|
||||
'googleother',
|
||||
'googleother-image',
|
||||
'googleother-video',
|
||||
'google-extended',
|
||||
Crawler.GOOGLE_EXTENDED,
|
||||
Crawler.GOOGLE_OTHER,
|
||||
Crawler.GOOGLE_OTHER_IMAGE,
|
||||
Crawler.GOOGLE_OTHER_VIDEO,
|
||||
Crawler.GOOGLE_CLOUDVERTEXBOT,
|
||||
|
||||
// Hive AI
|
||||
'imagesiftbot',
|
||||
Crawler.HIVE_IMAGESIFTBOT,
|
||||
|
||||
// Huawei
|
||||
'petalbot',
|
||||
Crawler.HUAWEI_PETALBOT,
|
||||
Crawler.HUAWEI_PANGUBOT,
|
||||
|
||||
// Hugging Face
|
||||
Crawler.HUGGINGFACE_BOT,
|
||||
|
||||
// Kangaroo
|
||||
Crawler.KANGAROO_BOT,
|
||||
|
||||
// Mendable.ai
|
||||
Crawler.FIRECRAWL_AGENT,
|
||||
|
||||
// Meta
|
||||
'facebookbot',
|
||||
'meta-externalagent',
|
||||
Crawler.META_FACEBOOKBOT,
|
||||
Crawler.META_EXTERNALAGENT,
|
||||
|
||||
// OpenAI
|
||||
'gptbot',
|
||||
'oai-searchbot',
|
||||
Crawler.OPENAI_GPTBOT,
|
||||
Crawler.OPENAI_SEARCH_BOT,
|
||||
|
||||
// Perplexity
|
||||
'perplexitybot',
|
||||
Crawler.PERPLEXITY_BOT,
|
||||
|
||||
// Replicate
|
||||
Crawler.REPLICATE_BOT,
|
||||
|
||||
// Runpod
|
||||
Crawler.RUNPOD_BOT,
|
||||
|
||||
// SB Intuitions
|
||||
Crawler.SB_INTUITIONS_BOT,
|
||||
|
||||
// Semrush
|
||||
Crawler.SEMRUSH_BOT_CONTENTSHAKE,
|
||||
|
||||
// Timpi
|
||||
'timpibot',
|
||||
Crawler.TIMPI_BOT,
|
||||
|
||||
// Together AI
|
||||
Crawler.TOGETHER_BOT,
|
||||
|
||||
// Velen.io
|
||||
'velenpublicwebcrawler',
|
||||
Crawler.HUNTER_VELENPUBLICWEBCRAWLER,
|
||||
|
||||
// Vercel
|
||||
Crawler.VERCEL_V0BOT,
|
||||
|
||||
// Webz.io
|
||||
'omgili',
|
||||
'omgilibot',
|
||||
'webzio-extended',
|
||||
Crawler.WEBZIO_OMGILI,
|
||||
Crawler.WEBZIO_OMGILI_BOT,
|
||||
Crawler.WEBZIO_EXTENDED,
|
||||
|
||||
// X
|
||||
Crawler.XAI_BOT,
|
||||
|
||||
// You.com
|
||||
'youbot',
|
||||
Crawler.YOU_BOT,
|
||||
|
||||
// Zyte
|
||||
'scrapy'
|
||||
|
||||
].includes(String(toResult(resultOrUA, Bots).browser.name).toLowerCase());
|
||||
// Zhipu AI
|
||||
Crawler.ZHIPU_CHATGLM_SPIDER
|
||||
]
|
||||
.map((s) => s.toLowerCase())
|
||||
.includes(String(toResult(resultOrUA, Crawlers).browser.name).toLowerCase());
|
||||
|
||||
const isBot = (resultOrUA) => [
|
||||
'cli',
|
||||
'crawler',
|
||||
'fetcher',
|
||||
'library'
|
||||
BrowserType.CLI,
|
||||
BrowserType.CRAWLER,
|
||||
BrowserType.FETCHER,
|
||||
BrowserType.LIBRARY
|
||||
].includes(toResult(resultOrUA, Bots).browser.type);
|
||||
|
||||
const isChromeFamily = (resultOrUA) => toResult(resultOrUA).engine.is(Engine.BLINK);
|
||||
const isChromeFamily = (resultOrUA) => toResult(resultOrUA).engine.is(EngineName.BLINK);
|
||||
|
||||
const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js
|
||||
/ electron\//i.test(navigator?.userAgent)); // browser
|
||||
|
||||
@@ -3,20 +3,21 @@
|
||||
// Source: /src/helpers/ua-parser-helpers.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Helpers for UAParser.js v2.0.0
|
||||
/* Helpers for UAParser.js v2.0.5
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Personal License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
import { UAParser } from '../main/ua-parser.mjs';
|
||||
import { CPU, OS, Engine } from '../enums/ua-parser-enums.mjs';
|
||||
import { Bots } from '../extensions/ua-parser-extensions.mjs';
|
||||
import { CPUArch, OSName, EngineName, Extension, BrowserType } from '../enums/ua-parser-enums.mjs';
|
||||
import { Bots, Crawlers } from '../extensions/ua-parser-extensions.mjs';
|
||||
import { isFromEU } from 'detect-europe-js';
|
||||
import { isFrozenUA } from 'ua-is-frozen';
|
||||
import { isStandalonePWA } from 'is-standalone-pwa';
|
||||
const { Crawler } = Extension.BrowserName;
|
||||
|
||||
const toResult = (value, head, ext) => typeof value === 'string' ? UAParser(value, head, ext) : value;
|
||||
|
||||
@@ -24,8 +25,8 @@ const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${m
|
||||
|
||||
const isAppleSilicon = (resultOrUA) => {
|
||||
const res = toResult(resultOrUA);
|
||||
if (res.os.is(OS.MACOS)) {
|
||||
if (res.cpu.is(CPU.ARM)) {
|
||||
if (res.os.is(OSName.MACOS)) {
|
||||
if (res.cpu.is(CPUArch.ARM)) {
|
||||
return true;
|
||||
}
|
||||
if (typeof resultOrUA !== 'string' && typeof window !== 'undefined') {
|
||||
@@ -48,82 +49,129 @@ const isAppleSilicon = (resultOrUA) => {
|
||||
const isAIBot = (resultOrUA) => [
|
||||
|
||||
// AI2
|
||||
'ai2bot',
|
||||
Crawler.AI2_BOT,
|
||||
|
||||
// Amazon
|
||||
'amazonbot',
|
||||
Crawler.AMAZON_BOT,
|
||||
|
||||
// Anthropic
|
||||
'anthropic-ai',
|
||||
'claude-web',
|
||||
'claudebot',
|
||||
Crawler.ANTHROPIC_AI,
|
||||
Crawler.ANTHROPIC_CLAUDE_BOT,
|
||||
Crawler.ANTHROPIC_CLAUDE_SEARCHBOT,
|
||||
Crawler.ANTHROPIC_CLAUDE_WEB,
|
||||
|
||||
// Apple
|
||||
'applebot',
|
||||
'applebot-extended',
|
||||
Crawler.APPLE_BOT,
|
||||
Crawler.APPLE_BOT_EXTENDED,
|
||||
|
||||
// Brave
|
||||
Crawler.BRAVE_BOT,
|
||||
|
||||
// ByteDance
|
||||
'bytespider',
|
||||
Crawler.BYTEDANCE_BYTESPIDER,
|
||||
Crawler.BYTEDANCE_TIKTOKSPIDER,
|
||||
|
||||
// Cohere
|
||||
Crawler.COHERE_TRAINING_DATA_CRAWLER,
|
||||
|
||||
// Common Crawl
|
||||
'ccbot',
|
||||
Crawler.COMMON_CRAWL_CCBOT,
|
||||
|
||||
// Coveo
|
||||
Crawler.COVEO_BOT,
|
||||
|
||||
// DataForSeo
|
||||
'dataforseobot',
|
||||
Crawler.DATAFORSEO_BOT,
|
||||
|
||||
// DeepSeek
|
||||
Crawler.DEEPSEEK_BOT,
|
||||
|
||||
// Diffbot
|
||||
'diffbot',
|
||||
Crawler.DIFFBOT,
|
||||
|
||||
// Google
|
||||
'googleother',
|
||||
'googleother-image',
|
||||
'googleother-video',
|
||||
'google-extended',
|
||||
Crawler.GOOGLE_EXTENDED,
|
||||
Crawler.GOOGLE_OTHER,
|
||||
Crawler.GOOGLE_OTHER_IMAGE,
|
||||
Crawler.GOOGLE_OTHER_VIDEO,
|
||||
Crawler.GOOGLE_CLOUDVERTEXBOT,
|
||||
|
||||
// Hive AI
|
||||
'imagesiftbot',
|
||||
Crawler.HIVE_IMAGESIFTBOT,
|
||||
|
||||
// Huawei
|
||||
'petalbot',
|
||||
Crawler.HUAWEI_PETALBOT,
|
||||
Crawler.HUAWEI_PANGUBOT,
|
||||
|
||||
// Hugging Face
|
||||
Crawler.HUGGINGFACE_BOT,
|
||||
|
||||
// Kangaroo
|
||||
Crawler.KANGAROO_BOT,
|
||||
|
||||
// Mendable.ai
|
||||
Crawler.FIRECRAWL_AGENT,
|
||||
|
||||
// Meta
|
||||
'facebookbot',
|
||||
'meta-externalagent',
|
||||
Crawler.META_FACEBOOKBOT,
|
||||
Crawler.META_EXTERNALAGENT,
|
||||
|
||||
// OpenAI
|
||||
'gptbot',
|
||||
'oai-searchbot',
|
||||
Crawler.OPENAI_GPTBOT,
|
||||
Crawler.OPENAI_SEARCH_BOT,
|
||||
|
||||
// Perplexity
|
||||
'perplexitybot',
|
||||
Crawler.PERPLEXITY_BOT,
|
||||
|
||||
// Replicate
|
||||
Crawler.REPLICATE_BOT,
|
||||
|
||||
// Runpod
|
||||
Crawler.RUNPOD_BOT,
|
||||
|
||||
// SB Intuitions
|
||||
Crawler.SB_INTUITIONS_BOT,
|
||||
|
||||
// Semrush
|
||||
Crawler.SEMRUSH_BOT_CONTENTSHAKE,
|
||||
|
||||
// Timpi
|
||||
'timpibot',
|
||||
Crawler.TIMPI_BOT,
|
||||
|
||||
// Together AI
|
||||
Crawler.TOGETHER_BOT,
|
||||
|
||||
// Velen.io
|
||||
'velenpublicwebcrawler',
|
||||
Crawler.HUNTER_VELENPUBLICWEBCRAWLER,
|
||||
|
||||
// Vercel
|
||||
Crawler.VERCEL_V0BOT,
|
||||
|
||||
// Webz.io
|
||||
'omgili',
|
||||
'omgilibot',
|
||||
'webzio-extended',
|
||||
Crawler.WEBZIO_OMGILI,
|
||||
Crawler.WEBZIO_OMGILI_BOT,
|
||||
Crawler.WEBZIO_EXTENDED,
|
||||
|
||||
// X
|
||||
Crawler.XAI_BOT,
|
||||
|
||||
// You.com
|
||||
'youbot',
|
||||
Crawler.YOU_BOT,
|
||||
|
||||
// Zyte
|
||||
'scrapy'
|
||||
|
||||
].includes(String(toResult(resultOrUA, Bots).browser.name).toLowerCase());
|
||||
// Zhipu AI
|
||||
Crawler.ZHIPU_CHATGLM_SPIDER
|
||||
]
|
||||
.map((s) => s.toLowerCase())
|
||||
.includes(String(toResult(resultOrUA, Crawlers).browser.name).toLowerCase());
|
||||
|
||||
const isBot = (resultOrUA) => [
|
||||
'cli',
|
||||
'crawler',
|
||||
'fetcher',
|
||||
'library'
|
||||
BrowserType.CLI,
|
||||
BrowserType.CRAWLER,
|
||||
BrowserType.FETCHER,
|
||||
BrowserType.LIBRARY
|
||||
].includes(toResult(resultOrUA, Bots).browser.type);
|
||||
|
||||
const isChromeFamily = (resultOrUA) => toResult(resultOrUA).engine.is(Engine.BLINK);
|
||||
const isChromeFamily = (resultOrUA) => toResult(resultOrUA).engine.is(EngineName.BLINK);
|
||||
|
||||
const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js
|
||||
/ electron\//i.test(navigator?.userAgent)); // browser
|
||||
|
||||
16
src/main/ua-parser.d.ts
vendored
16
src/main/ua-parser.d.ts
vendored
@@ -1,9 +1,9 @@
|
||||
// Type definitions for UAParser.js v2.0.0
|
||||
// Type definitions for UAParser.js v2.0.5
|
||||
// Project: https://github.com/faisalman/ua-parser-js
|
||||
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||
|
||||
import type { IncomingHttpHeaders } from 'http';
|
||||
import type { Headers as FetchAPIHeaders } from 'node-fetch';
|
||||
import type { Headers } from "undici";
|
||||
import { BrowserType, CPUArch, DeviceType, EngineName } from "../enums/ua-parser-enums";
|
||||
|
||||
declare namespace UAParser {
|
||||
|
||||
@@ -18,21 +18,21 @@ declare namespace UAParser {
|
||||
name?: string;
|
||||
version?: string;
|
||||
major?: string;
|
||||
type?: 'crawler' | 'cli' | 'email' | 'fetcher' | 'inapp' | 'mediaplayer' | 'library';
|
||||
type?: typeof BrowserType[keyof typeof BrowserType];
|
||||
}
|
||||
|
||||
interface ICPU extends IData<ICPU> {
|
||||
architecture?: 'ia32' | 'ia64' | 'amd64' | 'arm' | 'arm64' | 'armhf' | 'avr' | 'avr32' | 'irix' | 'irix64' | 'mips' | 'mips64' | '68k' | 'pa-risc' | 'ppc' | 'sparc' | 'sparc64';
|
||||
architecture?: typeof CPUArch[keyof typeof CPUArch];
|
||||
}
|
||||
|
||||
interface IDevice extends IData<IDevice> {
|
||||
type?: 'mobile' | 'tablet' | 'console' | 'smarttv' | 'wearable' | 'xr' | 'embedded';
|
||||
type?: typeof DeviceType[keyof typeof DeviceType];
|
||||
vendor?: string;
|
||||
model?: string;
|
||||
}
|
||||
|
||||
interface IEngine extends IData<IEngine> {
|
||||
name?: 'Amaya' | 'ArkWeb' | 'Blink' | 'EdgeHTML' | 'Flow' | 'Gecko' | 'Goanna' | 'iCab' | 'KHTML' | 'LibWeb' | 'Links' | 'Lynx' | 'NetFront' | 'NetSurf' | 'Presto' | 'Servo' | 'Tasman' | 'Trident' | 'w3m' | 'WebKit';
|
||||
name?: typeof EngineName[keyof typeof EngineName];
|
||||
version?: string;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ declare namespace UAParser {
|
||||
type RegexMap = ((RegExp | string | (string | RegExp | Function)[])[])[];
|
||||
type UAParserProps = 'browser' | 'cpu' | 'device' | 'engine' | 'os';
|
||||
type UAParserExt = Partial<Record<UAParserProps, RegexMap>> | Partial<Record<UAParserProps, RegexMap>>[];
|
||||
type UAParserHeaders = Record<string, string> | IncomingHttpHeaders | FetchAPIHeaders;
|
||||
export type UAParserHeaders = Record<string, string | string[] | undefined> | Headers;
|
||||
|
||||
export function UAParser(uastring?: string, extensions?: UAParserExt, headers?: UAParserHeaders): IResult;
|
||||
export function UAParser(uastring?: string, headers?: UAParserHeaders): IResult;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/* UAParser.js v2.0.0
|
||||
Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License *//*
|
||||
/* UAParser.js v2.0.5
|
||||
Copyright © 2012-2025 Faisal Salman <f@faisalman.com>
|
||||
UAParser.js PRO Personal License *//*
|
||||
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
|
||||
Supports browser & node.js environment.
|
||||
Demo : https://uaparser.dev
|
||||
@@ -19,20 +19,35 @@
|
||||
// Constants
|
||||
/////////////
|
||||
|
||||
var LIBVERSION = '2.0.0',
|
||||
var LIBVERSION = '2.0.5',
|
||||
UA_MAX_LENGTH = 500,
|
||||
USER_AGENT = 'user-agent',
|
||||
EMPTY = '',
|
||||
UNKNOWN = '?',
|
||||
|
||||
// typeof
|
||||
FUNC_TYPE = 'function',
|
||||
UNDEF_TYPE = 'undefined',
|
||||
OBJ_TYPE = 'object',
|
||||
STR_TYPE = 'string',
|
||||
MAJOR = 'major',
|
||||
MODEL = 'model',
|
||||
|
||||
// properties
|
||||
UA_BROWSER = 'browser',
|
||||
UA_CPU = 'cpu',
|
||||
UA_DEVICE = 'device',
|
||||
UA_ENGINE = 'engine',
|
||||
UA_OS = 'os',
|
||||
UA_RESULT = 'result',
|
||||
|
||||
NAME = 'name',
|
||||
TYPE = 'type',
|
||||
VENDOR = 'vendor',
|
||||
VERSION = 'version',
|
||||
ARCHITECTURE= 'architecture',
|
||||
MAJOR = 'major',
|
||||
MODEL = 'model',
|
||||
|
||||
// device types
|
||||
CONSOLE = 'console',
|
||||
MOBILE = 'mobile',
|
||||
TABLET = 'tablet',
|
||||
@@ -40,9 +55,11 @@
|
||||
WEARABLE = 'wearable',
|
||||
XR = 'xr',
|
||||
EMBEDDED = 'embedded',
|
||||
|
||||
// browser types
|
||||
INAPP = 'inapp',
|
||||
USER_AGENT = 'user-agent',
|
||||
UA_MAX_LENGTH = 500,
|
||||
|
||||
// client hints
|
||||
BRANDS = 'brands',
|
||||
FORMFACTORS = 'formFactors',
|
||||
FULLVERLIST = 'fullVersionList',
|
||||
@@ -59,12 +76,8 @@
|
||||
CH_HEADER_PLATFORM = CH_HEADER + '-' + PLATFORM,
|
||||
CH_HEADER_PLATFORM_VER = CH_HEADER_PLATFORM + '-version',
|
||||
CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS],
|
||||
UA_BROWSER = 'browser',
|
||||
UA_CPU = 'cpu',
|
||||
UA_DEVICE = 'device',
|
||||
UA_ENGINE = 'engine',
|
||||
UA_OS = 'os',
|
||||
UA_RESULT = 'result',
|
||||
|
||||
// device vendors
|
||||
AMAZON = 'Amazon',
|
||||
APPLE = 'Apple',
|
||||
ASUS = 'ASUS',
|
||||
@@ -76,6 +89,7 @@
|
||||
LG = 'LG',
|
||||
MICROSOFT = 'Microsoft',
|
||||
MOTOROLA = 'Motorola',
|
||||
NVIDIA = 'Nvidia',
|
||||
ONEPLUS = 'OnePlus',
|
||||
OPPO = 'OPPO',
|
||||
SAMSUNG = 'Samsung',
|
||||
@@ -83,8 +97,8 @@
|
||||
SONY = 'Sony',
|
||||
XIAOMI = 'Xiaomi',
|
||||
ZEBRA = 'Zebra',
|
||||
PREFIX_MOBILE = 'Mobile ',
|
||||
SUFFIX_BROWSER = ' Browser',
|
||||
|
||||
// browsers
|
||||
CHROME = 'Chrome',
|
||||
CHROMIUM = 'Chromium',
|
||||
CHROMECAST = 'Chromecast',
|
||||
@@ -93,6 +107,11 @@
|
||||
OPERA = 'Opera',
|
||||
FACEBOOK = 'Facebook',
|
||||
SOGOU = 'Sogou',
|
||||
|
||||
PREFIX_MOBILE = 'Mobile ',
|
||||
SUFFIX_BROWSER = ' Browser',
|
||||
|
||||
// os
|
||||
WINDOWS = 'Windows';
|
||||
|
||||
var isWindow = typeof window !== UNDEF_TYPE,
|
||||
@@ -133,11 +152,11 @@
|
||||
has = function (str1, str2) {
|
||||
if (typeof str1 === OBJ_TYPE && str1.length > 0) {
|
||||
for (var i in str1) {
|
||||
if (lowerize(str1[i]) == lowerize(str2)) return true;
|
||||
if (lowerize(str2) == lowerize(str1[i])) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return isString(str1) ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
||||
return isString(str1) ? lowerize(str2) == lowerize(str1) : false;
|
||||
},
|
||||
isExtensions = function (obj, deep) {
|
||||
for (var prop in obj) {
|
||||
@@ -169,6 +188,8 @@
|
||||
},
|
||||
setProps = function (arr) {
|
||||
for (var i in arr) {
|
||||
if (!arr.hasOwnProperty(i)) continue;
|
||||
|
||||
var propName = arr[i];
|
||||
if (typeof propName == OBJ_TYPE && propName.length == 2) {
|
||||
this[propName[0]] = propName[1];
|
||||
@@ -228,17 +249,25 @@
|
||||
// assign given value, ignore regex match
|
||||
this[q[0]] = q[1];
|
||||
}
|
||||
} else if (q.length === 3) {
|
||||
// check whether function or regex
|
||||
} else if (q.length >= 3) {
|
||||
// Check whether q[1] FUNCTION or REGEX
|
||||
if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
|
||||
// call function (usually string mapper)
|
||||
this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;
|
||||
if (q.length > 3) {
|
||||
this[q[0]] = match ? q[1].apply(this, q.slice(2)) : undefined;
|
||||
} else {
|
||||
// call function (usually string mapper)
|
||||
this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;
|
||||
}
|
||||
} else {
|
||||
// sanitize match using given regex
|
||||
this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
|
||||
if (q.length == 3) {
|
||||
// sanitize match using given regex
|
||||
this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
|
||||
} else if (q.length == 4) {
|
||||
this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;
|
||||
} else if (q.length > 4) {
|
||||
this[q[0]] = match ? q[3].apply(this, [match.replace(q[1], q[2])].concat(q.slice(4))) : undefined;
|
||||
}
|
||||
}
|
||||
} else if (q.length === 4) {
|
||||
this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;
|
||||
}
|
||||
} else {
|
||||
this[q] = match ? match : undefined;
|
||||
@@ -272,17 +301,17 @@
|
||||
//////////////
|
||||
|
||||
var windowsVersionMap = {
|
||||
'ME' : '4.90',
|
||||
'NT 3.11' : 'NT3.51',
|
||||
'NT 4.0' : 'NT4.0',
|
||||
'2000' : 'NT 5.0',
|
||||
'XP' : ['NT 5.1', 'NT 5.2'],
|
||||
'Vista' : 'NT 6.0',
|
||||
'7' : 'NT 6.1',
|
||||
'8' : 'NT 6.2',
|
||||
'8.1' : 'NT 6.3',
|
||||
'10' : ['NT 6.4', 'NT 10.0'],
|
||||
'RT' : 'ARM'
|
||||
'ME' : '4.90',
|
||||
'NT 3.51': '3.51',
|
||||
'NT 4.0': '4.0',
|
||||
'2000' : ['5.0', '5.01'],
|
||||
'XP' : ['5.1', '5.2'],
|
||||
'Vista' : '6.0',
|
||||
'7' : '6.1',
|
||||
'8' : '6.2',
|
||||
'8.1' : '6.3',
|
||||
'10' : ['6.4', '10.0'],
|
||||
'NT' : ''
|
||||
},
|
||||
|
||||
formFactorsMap = {
|
||||
@@ -294,6 +323,18 @@
|
||||
'xr' : ['VR', 'XR'],
|
||||
'?' : ['Desktop', 'Unknown'],
|
||||
'*' : undefined
|
||||
},
|
||||
|
||||
browserHintsMap = {
|
||||
'Chrome' : 'Google Chrome',
|
||||
'Edge' : 'Microsoft Edge',
|
||||
'Edge WebView2' : 'Microsoft Edge WebView2',
|
||||
'Chrome WebView': 'Android WebView',
|
||||
'Chrome Headless':'HeadlessChrome',
|
||||
'Huawei Browser': 'HuaweiBrowser',
|
||||
'MIUI Browser' : 'Miui Browser',
|
||||
'Opera Mobi' : 'OperaMobile',
|
||||
'Yandex' : 'YaBrowser'
|
||||
};
|
||||
|
||||
//////////////
|
||||
@@ -307,7 +348,9 @@
|
||||
// Most common regardless engine
|
||||
/\b(?:crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
|
||||
], [VERSION, [NAME, PREFIX_MOBILE + 'Chrome']], [
|
||||
/edg(?:e|ios|a)?\/([\w\.]+)/i // Microsoft Edge
|
||||
/webview.+edge\/([\w\.]+)/i // Microsoft Edge
|
||||
], [VERSION, [NAME, EDGE+' WebView']], [
|
||||
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
||||
], [VERSION, [NAME, 'Edge']], [
|
||||
|
||||
// Presto based
|
||||
@@ -334,11 +377,11 @@
|
||||
/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
|
||||
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
|
||||
|
||||
// Blink/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|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,
|
||||
// Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon/LG Browser/Otter/qutebrowser/Dooble
|
||||
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,
|
||||
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
|
||||
/(heytap|ovi|115)browser\/([\d\.]+)/i, // HeyTap/Ovi/115
|
||||
/(weibo)__([\d\.]+)/i // Weibo
|
||||
/(heytap|ovi|115|surf)browser\/([\d\.]+)/i, // HeyTap/Ovi/115/Surf
|
||||
/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i // Ecosia/Weibo
|
||||
], [NAME, VERSION], [
|
||||
/quark(?:pc)?\/([-\w\.]+)/i // Quark
|
||||
], [VERSION, [NAME, 'Quark']], [
|
||||
@@ -399,14 +442,14 @@
|
||||
// WebView
|
||||
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i // Facebook App for iOS & Android
|
||||
], [[NAME, FACEBOOK], VERSION, [TYPE, INAPP]], [
|
||||
/(Klarna)\/([\w\.]+)/i, // Klarna Shopping Browser for iOS & Android
|
||||
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, // Kakao App
|
||||
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp
|
||||
/(daum)apps[\/ ]([\w\.]+)/i, // Daum App
|
||||
/safari (line)\/([\w\.]+)/i, // Line App for iOS
|
||||
/\b(line)\/([\w\.]+)\/iab/i, // Line App for Android
|
||||
/(alipay)client\/([\w\.]+)/i, // Alipay
|
||||
/(twitter)(?:and| f.+e\/([\w\.]+))/i, // Twitter
|
||||
/(instagram|snapchat)[\/ ]([-\w\.]+)/i // Instagram/Snapchat
|
||||
/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i // Instagram/Snapchat/Klarna
|
||||
], [NAME, VERSION, [TYPE, INAPP]], [
|
||||
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
|
||||
], [VERSION, [NAME, 'GSA'], [TYPE, INAPP]], [
|
||||
@@ -414,6 +457,8 @@
|
||||
], [VERSION, [NAME, 'TikTok'], [TYPE, INAPP]], [
|
||||
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
|
||||
], [NAME, [TYPE, INAPP]], [
|
||||
/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i // Zalo
|
||||
], [[NAME, /(.+)/, 'Zalo'], VERSION, [TYPE, INAPP]], [
|
||||
|
||||
/(chromium)[\/ ]([-\w\.]+)/i // Chromium
|
||||
], [NAME, VERSION], [
|
||||
@@ -421,6 +466,9 @@
|
||||
/headlesschrome(?:\/([\w\.]+)| )/i // Chrome Headless
|
||||
], [VERSION, [NAME, CHROME+' Headless']], [
|
||||
|
||||
/wv\).+chrome\/([\w\.]+).+edgw\//i // Edge WebView2
|
||||
], [VERSION, [NAME, EDGE+' WebView2']], [
|
||||
|
||||
/ wv\).+(chrome)\/([\w\.]+)/i // Chrome WebView
|
||||
], [[NAME, CHROME+' WebView'], VERSION], [
|
||||
|
||||
@@ -464,8 +512,8 @@
|
||||
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, // Mozilla
|
||||
|
||||
// Other
|
||||
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
||||
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser
|
||||
/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
||||
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird
|
||||
/\b(links) \(([\w\.]+)/i // Links
|
||||
], [NAME, [VERSION, /_/g, '.']], [
|
||||
|
||||
@@ -475,32 +523,32 @@
|
||||
|
||||
cpu : [[
|
||||
|
||||
/\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
|
||||
/\b((amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
|
||||
], [[ARCHITECTURE, 'amd64']], [
|
||||
|
||||
/(ia32(?=;))/i, // IA32 (quicktime)
|
||||
/\b((?:i[346]|x)86)\b/i // IA32 (x86)
|
||||
/\b((i[346]|x)86)(pc)?\b/i // IA32 (x86)
|
||||
], [[ARCHITECTURE, 'ia32']], [
|
||||
|
||||
/\b(aarch64|arm(v?8e?l?|_?64))\b/i // ARM64
|
||||
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i // ARM64
|
||||
], [[ARCHITECTURE, 'arm64']], [
|
||||
|
||||
/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i // ARMHF
|
||||
/\b(arm(v[67])?ht?n?[fl]p?)\b/i // ARMHF
|
||||
], [[ARCHITECTURE, 'armhf']], [
|
||||
|
||||
// PocketPC mistakenly identified as PowerPC
|
||||
/windows (ce|mobile); ppc;/i
|
||||
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
|
||||
], [[ARCHITECTURE, 'arm']], [
|
||||
|
||||
/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i // PowerPC
|
||||
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
|
||||
|
||||
/(sun4\w)[;\)]/i // SPARC
|
||||
/ sun4\w[;\)]/i // SPARC
|
||||
], [[ARCHITECTURE, 'sparc']], [
|
||||
|
||||
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
|
||||
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
||||
], [[ARCHITECTURE, lowerize]]
|
||||
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,
|
||||
/((ppc|powerpc)(64)?)( mac|;|\))/i, // PowerPC
|
||||
/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i // Alpha
|
||||
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
|
||||
/winnt.+\[axp/i
|
||||
], [[ARCHITECTURE, 'alpha']]
|
||||
],
|
||||
|
||||
device : [[
|
||||
@@ -513,7 +561,7 @@
|
||||
/\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)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
||||
/samsung[- ]((?!sm-[lr])[-\w]+)/i,
|
||||
/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,
|
||||
/sec-(sgh\w+)/i
|
||||
], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [
|
||||
|
||||
@@ -558,15 +606,24 @@
|
||||
/ ([\w ]+) miui\/v?\d/i
|
||||
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
|
||||
|
||||
// OnePlus
|
||||
/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,
|
||||
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
||||
], [MODEL, [VENDOR, ONEPLUS], [TYPE, MOBILE]], [
|
||||
|
||||
// OPPO
|
||||
/; (\w+) bui.+ oppo/i,
|
||||
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
|
||||
], [MODEL, [VENDOR, OPPO], [TYPE, MOBILE]], [
|
||||
/\b(opd2(\d{3}a?))(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, strMapper, { 'OnePlus' : ['304', '403', '203'], '*' : OPPO }], [TYPE, TABLET]], [
|
||||
], [MODEL, [VENDOR, strMapper, { 'OnePlus' : ['203', '304', '403', '404', '413', '415'], '*' : OPPO }], [TYPE, TABLET]], [
|
||||
|
||||
// BLU
|
||||
/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i // Vivo series
|
||||
], [MODEL, [VENDOR, 'BLU'], [TYPE, MOBILE]], [
|
||||
|
||||
// Vivo
|
||||
/vivo (\w+)(?: bui|\))/i,
|
||||
/; vivo (\w+)(?: bui|\))/i,
|
||||
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i
|
||||
], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [
|
||||
|
||||
@@ -574,10 +631,17 @@
|
||||
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i
|
||||
], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [
|
||||
|
||||
// Lenovo
|
||||
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
|
||||
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
|
||||
], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [
|
||||
/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i
|
||||
], [MODEL, [VENDOR, LENOVO], [TYPE, MOBILE]], [
|
||||
|
||||
// Motorola
|
||||
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
|
||||
/\bmot(?:orola)?[- ](\w*)/i,
|
||||
/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
||||
/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,
|
||||
/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i
|
||||
], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [
|
||||
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
||||
], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [
|
||||
@@ -586,40 +650,33 @@
|
||||
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
||||
], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [
|
||||
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
||||
/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,
|
||||
/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,
|
||||
/\blg-?([\d\w]+) bui/i
|
||||
], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [
|
||||
|
||||
// Lenovo
|
||||
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
|
||||
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
|
||||
], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [
|
||||
|
||||
// Nokia
|
||||
/(nokia) (t[12][01])/i
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
||||
/nokia[-_ ]?(([-\w\.]*))/i
|
||||
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
|
||||
/nokia[-_ ]?(([-\w\. ]*))/i
|
||||
], [[MODEL, /_/g, ' '], [TYPE, MOBILE], [VENDOR, 'Nokia']], [
|
||||
|
||||
// Google
|
||||
/(pixel (c|tablet))\b/i // Google Pixel C/Tablet
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [
|
||||
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i // Google Pixel
|
||||
// Google Pixel
|
||||
/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [
|
||||
/(google) (pixelbook( go)?)/i
|
||||
], [VENDOR, MODEL], [
|
||||
|
||||
// Sony
|
||||
/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
|
||||
/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
||||
], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [
|
||||
/sony tablet [ps]/i,
|
||||
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
||||
], [[MODEL, 'Xperia Tablet'], [VENDOR, SONY], [TYPE, TABLET]], [
|
||||
|
||||
// OnePlus
|
||||
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
||||
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
||||
], [MODEL, [VENDOR, ONEPLUS], [TYPE, MOBILE]], [
|
||||
|
||||
// Amazon
|
||||
/(alexa)webm/i,
|
||||
/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, // Kindle Fire without Silk / Echo Show
|
||||
@@ -690,25 +747,36 @@
|
||||
], [MODEL, [VENDOR, 'Smartfren'], [TYPE, MOBILE]], [
|
||||
|
||||
// Nothing
|
||||
/droid.+; (a(?:015|06[35]|142p?))/i
|
||||
/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i
|
||||
], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [
|
||||
|
||||
// Archos
|
||||
/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
|
||||
/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
|
||||
], [MODEL, [VENDOR, 'Archos'], [TYPE, TABLET]], [
|
||||
/archos ([\w ]+)( b|\))/i,
|
||||
/; (ac[3-6]\d\w{2,8})( b|\))/i
|
||||
], [MODEL, [VENDOR, 'Archos'], [TYPE, MOBILE]], [
|
||||
|
||||
// HMD
|
||||
/; (n159v)/i
|
||||
], [MODEL, [VENDOR, 'HMD'], [TYPE, MOBILE]], [
|
||||
|
||||
// MIXED
|
||||
/(imo) (tab \w+)/i, // IMO
|
||||
/(infinix) (x1101b?)/i // Infinix XPad
|
||||
/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i // Infinix XPad / Tecno
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
|
||||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
|
||||
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
|
||||
/; (hmd|imo) ([\w ]+?)(?: bui|\))/i, // HMD/IMO
|
||||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
|
||||
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Tecno/Micromax/Advan
|
||||
/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i, // BLU/HMD/IMO/Infinix/Lava/OnePlus/TCL
|
||||
/(hp) ([\w ]+\w)/i, // HP iPAQ
|
||||
/(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia
|
||||
/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i, // Lenovo
|
||||
/(oppo) ?([\w ]+) bui/i // OPPO
|
||||
/(oppo) ?([\w ]+) bui/i, // OPPO
|
||||
/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i // Philips
|
||||
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
/(kobo)\s(ereader|touch)/i, // Kobo
|
||||
/(archos) (gamepad2?)/i, // Archos
|
||||
/(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad
|
||||
/(kindle)\/([\w\.]+)/i // Kindle
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
@@ -717,8 +785,8 @@
|
||||
], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [
|
||||
/droid [\d\.]+; (fp\du?)(?: b|\))/i // Fairphone
|
||||
], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [
|
||||
/(shield[\w ]+) b/i // Nvidia Shield Tablets
|
||||
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [
|
||||
/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i // Nvidia Tablets
|
||||
], [MODEL, [VENDOR, NVIDIA], [TYPE, TABLET]], [
|
||||
/(sprint) (\w+)/i // Sprint Phones
|
||||
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
||||
/(kin\.[onetw]{3})/i // Microsoft Kin
|
||||
@@ -732,11 +800,15 @@
|
||||
// SMARTTVS
|
||||
///////////////////
|
||||
|
||||
/(philips)[\w ]+tv/i, // Philips
|
||||
/smart-tv.+(samsung)/i // Samsung
|
||||
], [VENDOR, [TYPE, SMARTTV]], [
|
||||
/hbbtv.+maple;(\d+)/i
|
||||
], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [
|
||||
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i // LG SmartTV
|
||||
/(vizio)(?: |.+model\/)(\w+-\w+)/i, // Vizio
|
||||
/tcast.+(lg)e?. ([-\w]+)/i // LG SmartTV
|
||||
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
|
||||
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
||||
], [[VENDOR, LG], [TYPE, SMARTTV]], [
|
||||
/(apple) ?tv/i // Apple TV
|
||||
], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [
|
||||
@@ -748,8 +820,12 @@
|
||||
], [[MODEL, CHROMECAST+' Nest Hub'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
|
||||
/crkey/i // Google Chromecast, Linux-based or unknown
|
||||
], [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
|
||||
/(portaltv)/i // Facebook Portal TV
|
||||
], [MODEL, [VENDOR, FACEBOOK], [TYPE, SMARTTV]], [
|
||||
/droid.+aft(\w+)( bui|\))/i // Fire TV
|
||||
], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [
|
||||
/(shield \w+ tv)/i // Nvidia Shield TV
|
||||
], [MODEL, [VENDOR, NVIDIA], [TYPE, SMARTTV]], [
|
||||
/\(dtv[\);].+(aquos)/i,
|
||||
/(aquos-tv[\w ]+)\)/i // Sharp
|
||||
], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[
|
||||
@@ -761,23 +837,22 @@
|
||||
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
|
||||
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku
|
||||
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i // HbbTV devices
|
||||
], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [
|
||||
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i // SmartTV from Unidentified Vendors
|
||||
], [[TYPE, SMARTTV]], [
|
||||
], [[VENDOR, /.+\/(\w+)/, '$1', strMapper, {'LG':'lge'}], [MODEL, trim], [TYPE, SMARTTV]], [
|
||||
|
||||
///////////////////
|
||||
// CONSOLES
|
||||
///////////////////
|
||||
|
||||
/(ouya)/i, // Ouya
|
||||
/(nintendo) (\w+)/i // Nintendo
|
||||
], [VENDOR, MODEL, [TYPE, CONSOLE]], [
|
||||
/droid.+; (shield) bui/i // Nvidia
|
||||
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
|
||||
/(playstation \w+)/i // Playstation
|
||||
], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [
|
||||
/\b(xbox(?: one)?(?!; xbox))[\); ]/i // Microsoft Xbox
|
||||
], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [
|
||||
/(ouya)/i, // Ouya
|
||||
/(nintendo) (\w+)/i, // Nintendo
|
||||
/(retroid) (pocket ([^\)]+))/i // Retroid Pocket
|
||||
], [VENDOR, MODEL, [TYPE, CONSOLE]], [
|
||||
/droid.+; (shield)( bui|\))/i // Nvidia Portable
|
||||
], [MODEL, [VENDOR, NVIDIA], [TYPE, CONSOLE]], [
|
||||
|
||||
///////////////////
|
||||
// WEARABLES
|
||||
@@ -809,10 +884,12 @@
|
||||
|
||||
/droid.+; (glass) \d/i // Google Glass
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, XR]], [
|
||||
/(pico) (4|neo3(?: link|pro)?)/i // Pico
|
||||
/(pico) ([\w ]+) os\d/i // Pico
|
||||
], [VENDOR, MODEL, [TYPE, XR]], [
|
||||
/; (quest( \d| pro)?)/i // Oculus Quest
|
||||
/(quest( \d| pro)?s?).+vr/i // Meta Quest
|
||||
], [MODEL, [VENDOR, FACEBOOK], [TYPE, XR]], [
|
||||
/mobile vr; rv.+firefox/i // Unidentifiable VR device using Firefox Reality / Wolvic
|
||||
], [[TYPE, XR]], [
|
||||
|
||||
///////////////////
|
||||
// EMBEDDED
|
||||
@@ -822,20 +899,26 @@
|
||||
], [VENDOR, [TYPE, EMBEDDED]], [
|
||||
/(aeobc)\b/i // Echo Dot
|
||||
], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [
|
||||
/(homepod).+mac os/i // Apple HomePod
|
||||
], [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]], [
|
||||
/windows iot/i // Unidentifiable embedded device using Windows IoT
|
||||
], [[TYPE, EMBEDDED]], [
|
||||
|
||||
////////////////////
|
||||
// MIXED (GENERIC)
|
||||
///////////////////
|
||||
|
||||
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
|
||||
], [MODEL, [TYPE, MOBILE]], [
|
||||
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
|
||||
], [MODEL, [TYPE, TABLET]], [
|
||||
/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i // Unidentifiable SmartTV
|
||||
], [MODEL, [TYPE, SMARTTV]], [
|
||||
/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i
|
||||
], [[TYPE, SMARTTV]], [
|
||||
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i
|
||||
], [MODEL, [TYPE, strMapper, { 'mobile' : 'Mobile', 'xr' : 'VR', '*' : TABLET }]], [
|
||||
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
|
||||
], [[TYPE, TABLET]], [
|
||||
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
|
||||
], [[TYPE, MOBILE]], [
|
||||
/(android[-\w\. ]{0,9});.+buil/i // Generic Android Device
|
||||
/droid .+?; ([\w\. -]+)( bui|\))/i // Generic Android Device
|
||||
], [MODEL, [VENDOR, 'Generic']]
|
||||
],
|
||||
|
||||
@@ -855,8 +938,11 @@
|
||||
/ekioh(flow)\/([\w\.]+)/i, // Flow
|
||||
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
|
||||
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
|
||||
/\b(libweb)/i
|
||||
|
||||
/\b(libweb)/i // LibWeb
|
||||
], [NAME, VERSION], [
|
||||
/ladybird\//i
|
||||
], [[NAME, 'LibWeb']], [
|
||||
|
||||
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko
|
||||
], [VERSION, NAME]
|
||||
@@ -865,22 +951,25 @@
|
||||
os : [[
|
||||
|
||||
// Windows
|
||||
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
|
||||
/(windows nt) (6\.[23]); arm/i // Windows RT
|
||||
], [[NAME, /N/, 'R'], [VERSION, strMapper, windowsVersionMap]], [
|
||||
/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i, // Windows IoT/Mobile/Phone
|
||||
// Windows NT/3.1/95/98/ME/2000/XP/Vista/7/8/8.1/10/11
|
||||
/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i
|
||||
], [NAME, VERSION], [
|
||||
/windows nt ?([\d\.\)]*)(?!.+xbox)/i,
|
||||
/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i
|
||||
], [[VERSION, /(;|\))/g, '', strMapper, windowsVersionMap], [NAME, WINDOWS]], [
|
||||
/(windows ce)\/?([\d\.]*)/i // Windows CE
|
||||
], [NAME, VERSION], [
|
||||
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i // Windows Phone
|
||||
], [NAME, [VERSION, strMapper, windowsVersionMap]], [
|
||||
/windows nt 6\.2; (arm)/i, // Windows RT
|
||||
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
||||
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
||||
], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [
|
||||
|
||||
// iOS/macOS
|
||||
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
||||
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
||||
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
|
||||
/cfnetwork\/.+darwin/i
|
||||
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [
|
||||
/(mac os x) ?([\w\. ]*)/i,
|
||||
/(macintosh|mac_powerpc\b)(?!.+haiku)/i // Mac OS
|
||||
/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i // Mac OS
|
||||
], [[NAME, 'macOS'], [VERSION, /_/g, '.']], [
|
||||
|
||||
// Google Chromecast
|
||||
@@ -896,22 +985,26 @@
|
||||
], [VERSION, [NAME, CHROMECAST]], [
|
||||
|
||||
// Mobile OSes
|
||||
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS
|
||||
], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS/OpenHarmony
|
||||
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,
|
||||
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry
|
||||
/(tizen|kaios)[\/ ]([\w\.]+)/i, // Tizen/KaiOS
|
||||
/\((series40);/i // Series 40
|
||||
/droid ([\w\.]+)\b.+(android[- ]x86)/i // Android-x86
|
||||
], [VERSION, NAME], [
|
||||
/(ubuntu) ([\w\.]+) like android/i // Ubuntu Touch
|
||||
], [[NAME, /(.+)/, '$1 Touch'], VERSION], [
|
||||
/(harmonyos)[\/ ]?([\d\.]*)/i, // HarmonyOS
|
||||
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
|
||||
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i
|
||||
], [NAME, VERSION], [
|
||||
/\(bb(10);/i // BlackBerry 10
|
||||
], [VERSION, [NAME, BLACKBERRY]], [
|
||||
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i // Symbian
|
||||
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i // Symbian
|
||||
], [VERSION, [NAME, 'Symbian']], [
|
||||
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS
|
||||
], [VERSION, [NAME, FIREFOX+' OS']], [
|
||||
/web0s;.+rt(tv)/i,
|
||||
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i // WebOS
|
||||
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i, // WebOS
|
||||
/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i
|
||||
], [VERSION, [NAME, 'webOS']], [
|
||||
/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i
|
||||
// https://webostv.developer.lge.com/develop/specifications/web-api-and-web-engine
|
||||
], [[VERSION, strMapper, {'25':'120','24':'108','23':'94','22':'87','6':'79','5':'68','4':'53','3':'38','2':'538','1':'537','*':'TV'}], [NAME, 'webOS']], [
|
||||
/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i // watchOS
|
||||
], [VERSION, [NAME, 'watchOS']], [
|
||||
|
||||
@@ -931,20 +1024,20 @@
|
||||
|
||||
// Other
|
||||
/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, // Joli/Palm
|
||||
/(mint)[\/\(\) ]?(\w*)/i, // Mint
|
||||
/(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux
|
||||
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
||||
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
|
||||
/(hurd|linux) ?([\w\.]*)/i, // Hurd/Linux
|
||||
/linux.+(mint)[\/\(\) ]?([\w\.]*)/i, // Mint
|
||||
/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i, // Mageia/VectorLinux/Fuchsia/ArcaOS/Arch
|
||||
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
||||
// Ubuntu/Debian/SUSE/Gentoo/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire/Knoppix
|
||||
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, // Solaris
|
||||
/\b(aix)[; ]([1-9\.]{0,4})/i, // AIX
|
||||
/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i, // Hurd/Linux/MorphOS
|
||||
/(gnu) ?([\w\.]*)/i, // GNU
|
||||
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
|
||||
/(haiku) (\w+)/i // Haiku
|
||||
/(haiku) ?(r\d)?/i // Haiku
|
||||
], [NAME, VERSION], [
|
||||
/(sunos) ?([\w\.\d]*)/i // Solaris
|
||||
/(sunos) ?([\d\.]*)/i // Solaris
|
||||
], [[NAME, 'Solaris'], VERSION], [
|
||||
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, // Solaris
|
||||
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i, // AIX
|
||||
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
|
||||
/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/OpenVMS/HP-UX/SerenityOS
|
||||
/(unix) ?([\w\.]*)/i // UNIX
|
||||
], [NAME, VERSION]
|
||||
]
|
||||
@@ -1175,20 +1268,23 @@
|
||||
case UA_ENGINE:
|
||||
var brands = uaCH[FULLVERLIST] || uaCH[BRANDS], prevName;
|
||||
if (brands) {
|
||||
for (var i in brands) {
|
||||
for (var i=0; i<brands.length; i++) {
|
||||
var brandName = brands[i].brand || brands[i],
|
||||
brandVersion = brands[i].version;
|
||||
if (this.itemType == UA_BROWSER && !/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && brandName != CHROMIUM))) {
|
||||
brandName = strMapper(brandName, {
|
||||
'Chrome' : 'Google Chrome',
|
||||
'Edge' : 'Microsoft Edge',
|
||||
'Chrome WebView' : 'Android WebView',
|
||||
'Chrome Headless' : 'HeadlessChrome'
|
||||
});
|
||||
this.set(NAME, brandName)
|
||||
.set(VERSION, brandVersion)
|
||||
.set(MAJOR, majorize(brandVersion));
|
||||
prevName = brandName;
|
||||
if (this.itemType == UA_BROWSER &&
|
||||
!/not.a.brand/i.test(brandName) &&
|
||||
(!prevName ||
|
||||
(/Chrom/.test(prevName) && brandName != CHROMIUM) ||
|
||||
(prevName == EDGE && /WebView2/.test(brandName))
|
||||
)) {
|
||||
brandName = strMapper(brandName, browserHintsMap);
|
||||
prevName = this.get(NAME);
|
||||
if (!(prevName && !/Chrom/.test(prevName) && /Chrom/.test(brandName))) {
|
||||
this.set(NAME, brandName)
|
||||
.set(VERSION, brandVersion)
|
||||
.set(MAJOR, majorize(brandVersion));
|
||||
}
|
||||
prevName = brandName;
|
||||
}
|
||||
if (this.itemType == UA_ENGINE && brandName == CHROMIUM) {
|
||||
this.set(VERSION, brandVersion);
|
||||
@@ -1294,11 +1390,22 @@
|
||||
extensions = undefined;
|
||||
}
|
||||
|
||||
// Convert Headers object into a plain object
|
||||
if (headers && typeof headers.append === FUNC_TYPE) {
|
||||
var kv = {};
|
||||
headers.forEach(function (v, k) { kv[k] = v; });
|
||||
headers = kv;
|
||||
if (headers) {
|
||||
if (typeof headers.append === FUNC_TYPE) {
|
||||
// Convert Headers object into a plain object
|
||||
var kv = {};
|
||||
headers.forEach(function (v, k) { kv[String(k).toLowerCase()] = v; });
|
||||
headers = kv;
|
||||
} else {
|
||||
// Normalize headers field name into lowercase
|
||||
var normalized = {};
|
||||
for (var header in headers) {
|
||||
if (headers.hasOwnProperty(header)) {
|
||||
normalized[String(header).toLowerCase()] = headers[header];
|
||||
}
|
||||
}
|
||||
headers = normalized;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(this instanceof UAParser)) {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
// Source: /src/main/ua-parser.js
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/* UAParser.js v2.0.0
|
||||
Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License *//*
|
||||
/* UAParser.js v2.0.5
|
||||
Copyright © 2012-2025 Faisal Salman <f@faisalman.com>
|
||||
UAParser.js PRO Personal License *//*
|
||||
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
|
||||
Supports browser & node.js environment.
|
||||
Demo : https://uaparser.dev
|
||||
@@ -21,20 +21,35 @@
|
||||
// Constants
|
||||
/////////////
|
||||
|
||||
var LIBVERSION = '2.0.0',
|
||||
var LIBVERSION = '2.0.5',
|
||||
UA_MAX_LENGTH = 500,
|
||||
USER_AGENT = 'user-agent',
|
||||
EMPTY = '',
|
||||
UNKNOWN = '?',
|
||||
|
||||
// typeof
|
||||
FUNC_TYPE = 'function',
|
||||
UNDEF_TYPE = 'undefined',
|
||||
OBJ_TYPE = 'object',
|
||||
STR_TYPE = 'string',
|
||||
MAJOR = 'major',
|
||||
MODEL = 'model',
|
||||
|
||||
// properties
|
||||
UA_BROWSER = 'browser',
|
||||
UA_CPU = 'cpu',
|
||||
UA_DEVICE = 'device',
|
||||
UA_ENGINE = 'engine',
|
||||
UA_OS = 'os',
|
||||
UA_RESULT = 'result',
|
||||
|
||||
NAME = 'name',
|
||||
TYPE = 'type',
|
||||
VENDOR = 'vendor',
|
||||
VERSION = 'version',
|
||||
ARCHITECTURE= 'architecture',
|
||||
MAJOR = 'major',
|
||||
MODEL = 'model',
|
||||
|
||||
// device types
|
||||
CONSOLE = 'console',
|
||||
MOBILE = 'mobile',
|
||||
TABLET = 'tablet',
|
||||
@@ -42,9 +57,11 @@
|
||||
WEARABLE = 'wearable',
|
||||
XR = 'xr',
|
||||
EMBEDDED = 'embedded',
|
||||
|
||||
// browser types
|
||||
INAPP = 'inapp',
|
||||
USER_AGENT = 'user-agent',
|
||||
UA_MAX_LENGTH = 500,
|
||||
|
||||
// client hints
|
||||
BRANDS = 'brands',
|
||||
FORMFACTORS = 'formFactors',
|
||||
FULLVERLIST = 'fullVersionList',
|
||||
@@ -61,12 +78,8 @@
|
||||
CH_HEADER_PLATFORM = CH_HEADER + '-' + PLATFORM,
|
||||
CH_HEADER_PLATFORM_VER = CH_HEADER_PLATFORM + '-version',
|
||||
CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS],
|
||||
UA_BROWSER = 'browser',
|
||||
UA_CPU = 'cpu',
|
||||
UA_DEVICE = 'device',
|
||||
UA_ENGINE = 'engine',
|
||||
UA_OS = 'os',
|
||||
UA_RESULT = 'result',
|
||||
|
||||
// device vendors
|
||||
AMAZON = 'Amazon',
|
||||
APPLE = 'Apple',
|
||||
ASUS = 'ASUS',
|
||||
@@ -78,20 +91,29 @@
|
||||
LG = 'LG',
|
||||
MICROSOFT = 'Microsoft',
|
||||
MOTOROLA = 'Motorola',
|
||||
NVIDIA = 'Nvidia',
|
||||
ONEPLUS = 'OnePlus',
|
||||
OPPO = 'OPPO',
|
||||
SAMSUNG = 'Samsung',
|
||||
SHARP = 'Sharp',
|
||||
SONY = 'Sony',
|
||||
XIAOMI = 'Xiaomi',
|
||||
ZEBRA = 'Zebra',
|
||||
PREFIX_MOBILE = 'Mobile ',
|
||||
SUFFIX_BROWSER = ' Browser',
|
||||
|
||||
// browsers
|
||||
CHROME = 'Chrome',
|
||||
CHROMIUM = 'Chromium',
|
||||
CHROMECAST = 'Chromecast',
|
||||
EDGE = 'Edge',
|
||||
FIREFOX = 'Firefox',
|
||||
OPERA = 'Opera',
|
||||
FACEBOOK = 'Facebook',
|
||||
SOGOU = 'Sogou',
|
||||
|
||||
PREFIX_MOBILE = 'Mobile ',
|
||||
SUFFIX_BROWSER = ' Browser',
|
||||
|
||||
// os
|
||||
WINDOWS = 'Windows';
|
||||
|
||||
var isWindow = typeof window !== UNDEF_TYPE,
|
||||
@@ -132,11 +154,11 @@
|
||||
has = function (str1, str2) {
|
||||
if (typeof str1 === OBJ_TYPE && str1.length > 0) {
|
||||
for (var i in str1) {
|
||||
if (lowerize(str1[i]) == lowerize(str2)) return true;
|
||||
if (lowerize(str2) == lowerize(str1[i])) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return isString(str1) ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
||||
return isString(str1) ? lowerize(str2) == lowerize(str1) : false;
|
||||
},
|
||||
isExtensions = function (obj, deep) {
|
||||
for (var prop in obj) {
|
||||
@@ -168,6 +190,8 @@
|
||||
},
|
||||
setProps = function (arr) {
|
||||
for (var i in arr) {
|
||||
if (!arr.hasOwnProperty(i)) continue;
|
||||
|
||||
var propName = arr[i];
|
||||
if (typeof propName == OBJ_TYPE && propName.length == 2) {
|
||||
this[propName[0]] = propName[1];
|
||||
@@ -227,17 +251,25 @@
|
||||
// assign given value, ignore regex match
|
||||
this[q[0]] = q[1];
|
||||
}
|
||||
} else if (q.length === 3) {
|
||||
// check whether function or regex
|
||||
} else if (q.length >= 3) {
|
||||
// Check whether q[1] FUNCTION or REGEX
|
||||
if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
|
||||
// call function (usually string mapper)
|
||||
this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;
|
||||
if (q.length > 3) {
|
||||
this[q[0]] = match ? q[1].apply(this, q.slice(2)) : undefined;
|
||||
} else {
|
||||
// call function (usually string mapper)
|
||||
this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;
|
||||
}
|
||||
} else {
|
||||
// sanitize match using given regex
|
||||
this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
|
||||
if (q.length == 3) {
|
||||
// sanitize match using given regex
|
||||
this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
|
||||
} else if (q.length == 4) {
|
||||
this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;
|
||||
} else if (q.length > 4) {
|
||||
this[q[0]] = match ? q[3].apply(this, [match.replace(q[1], q[2])].concat(q.slice(4))) : undefined;
|
||||
}
|
||||
}
|
||||
} else if (q.length === 4) {
|
||||
this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;
|
||||
}
|
||||
} else {
|
||||
this[q] = match ? match : undefined;
|
||||
@@ -271,17 +303,17 @@
|
||||
//////////////
|
||||
|
||||
var windowsVersionMap = {
|
||||
'ME' : '4.90',
|
||||
'NT 3.11' : 'NT3.51',
|
||||
'NT 4.0' : 'NT4.0',
|
||||
'2000' : 'NT 5.0',
|
||||
'XP' : ['NT 5.1', 'NT 5.2'],
|
||||
'Vista' : 'NT 6.0',
|
||||
'7' : 'NT 6.1',
|
||||
'8' : 'NT 6.2',
|
||||
'8.1' : 'NT 6.3',
|
||||
'10' : ['NT 6.4', 'NT 10.0'],
|
||||
'RT' : 'ARM'
|
||||
'ME' : '4.90',
|
||||
'NT 3.51': '3.51',
|
||||
'NT 4.0': '4.0',
|
||||
'2000' : ['5.0', '5.01'],
|
||||
'XP' : ['5.1', '5.2'],
|
||||
'Vista' : '6.0',
|
||||
'7' : '6.1',
|
||||
'8' : '6.2',
|
||||
'8.1' : '6.3',
|
||||
'10' : ['6.4', '10.0'],
|
||||
'NT' : ''
|
||||
},
|
||||
|
||||
formFactorsMap = {
|
||||
@@ -293,6 +325,18 @@
|
||||
'xr' : ['VR', 'XR'],
|
||||
'?' : ['Desktop', 'Unknown'],
|
||||
'*' : undefined
|
||||
},
|
||||
|
||||
browserHintsMap = {
|
||||
'Chrome' : 'Google Chrome',
|
||||
'Edge' : 'Microsoft Edge',
|
||||
'Edge WebView2' : 'Microsoft Edge WebView2',
|
||||
'Chrome WebView': 'Android WebView',
|
||||
'Chrome Headless':'HeadlessChrome',
|
||||
'Huawei Browser': 'HuaweiBrowser',
|
||||
'MIUI Browser' : 'Miui Browser',
|
||||
'Opera Mobi' : 'OperaMobile',
|
||||
'Yandex' : 'YaBrowser'
|
||||
};
|
||||
|
||||
//////////////
|
||||
@@ -306,7 +350,9 @@
|
||||
// Most common regardless engine
|
||||
/\b(?:crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
|
||||
], [VERSION, [NAME, PREFIX_MOBILE + 'Chrome']], [
|
||||
/edg(?:e|ios|a)?\/([\w\.]+)/i // Microsoft Edge
|
||||
/webview.+edge\/([\w\.]+)/i // Microsoft Edge
|
||||
], [VERSION, [NAME, EDGE+' WebView']], [
|
||||
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
||||
], [VERSION, [NAME, 'Edge']], [
|
||||
|
||||
// Presto based
|
||||
@@ -333,11 +379,11 @@
|
||||
/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
|
||||
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
|
||||
|
||||
// Blink/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|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,
|
||||
// Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon/LG Browser/Otter/qutebrowser/Dooble
|
||||
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,
|
||||
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
|
||||
/(heytap|ovi|115)browser\/([\d\.]+)/i, // HeyTap/Ovi/115
|
||||
/(weibo)__([\d\.]+)/i // Weibo
|
||||
/(heytap|ovi|115|surf)browser\/([\d\.]+)/i, // HeyTap/Ovi/115/Surf
|
||||
/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i // Ecosia/Weibo
|
||||
], [NAME, VERSION], [
|
||||
/quark(?:pc)?\/([-\w\.]+)/i // Quark
|
||||
], [VERSION, [NAME, 'Quark']], [
|
||||
@@ -398,14 +444,14 @@
|
||||
// WebView
|
||||
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i // Facebook App for iOS & Android
|
||||
], [[NAME, FACEBOOK], VERSION, [TYPE, INAPP]], [
|
||||
/(Klarna)\/([\w\.]+)/i, // Klarna Shopping Browser for iOS & Android
|
||||
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, // Kakao App
|
||||
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp
|
||||
/(daum)apps[\/ ]([\w\.]+)/i, // Daum App
|
||||
/safari (line)\/([\w\.]+)/i, // Line App for iOS
|
||||
/\b(line)\/([\w\.]+)\/iab/i, // Line App for Android
|
||||
/(alipay)client\/([\w\.]+)/i, // Alipay
|
||||
/(twitter)(?:and| f.+e\/([\w\.]+))/i, // Twitter
|
||||
/(instagram|snapchat)[\/ ]([-\w\.]+)/i // Instagram/Snapchat
|
||||
/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i // Instagram/Snapchat/Klarna
|
||||
], [NAME, VERSION, [TYPE, INAPP]], [
|
||||
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
|
||||
], [VERSION, [NAME, 'GSA'], [TYPE, INAPP]], [
|
||||
@@ -413,6 +459,8 @@
|
||||
], [VERSION, [NAME, 'TikTok'], [TYPE, INAPP]], [
|
||||
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
|
||||
], [NAME, [TYPE, INAPP]], [
|
||||
/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i // Zalo
|
||||
], [[NAME, /(.+)/, 'Zalo'], VERSION, [TYPE, INAPP]], [
|
||||
|
||||
/(chromium)[\/ ]([-\w\.]+)/i // Chromium
|
||||
], [NAME, VERSION], [
|
||||
@@ -420,6 +468,9 @@
|
||||
/headlesschrome(?:\/([\w\.]+)| )/i // Chrome Headless
|
||||
], [VERSION, [NAME, CHROME+' Headless']], [
|
||||
|
||||
/wv\).+chrome\/([\w\.]+).+edgw\//i // Edge WebView2
|
||||
], [VERSION, [NAME, EDGE+' WebView2']], [
|
||||
|
||||
/ wv\).+(chrome)\/([\w\.]+)/i // Chrome WebView
|
||||
], [[NAME, CHROME+' WebView'], VERSION], [
|
||||
|
||||
@@ -463,8 +514,8 @@
|
||||
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, // Mozilla
|
||||
|
||||
// Other
|
||||
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
||||
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser
|
||||
/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
||||
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird
|
||||
/\b(links) \(([\w\.]+)/i // Links
|
||||
], [NAME, [VERSION, /_/g, '.']], [
|
||||
|
||||
@@ -474,32 +525,32 @@
|
||||
|
||||
cpu : [[
|
||||
|
||||
/\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
|
||||
/\b((amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
|
||||
], [[ARCHITECTURE, 'amd64']], [
|
||||
|
||||
/(ia32(?=;))/i, // IA32 (quicktime)
|
||||
/((?:i[346]|x)86)[;\)]/i // IA32 (x86)
|
||||
/\b((i[346]|x)86)(pc)?\b/i // IA32 (x86)
|
||||
], [[ARCHITECTURE, 'ia32']], [
|
||||
|
||||
/\b(aarch64|arm(v?8e?l?|_?64))\b/i // ARM64
|
||||
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i // ARM64
|
||||
], [[ARCHITECTURE, 'arm64']], [
|
||||
|
||||
/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i // ARMHF
|
||||
/\b(arm(v[67])?ht?n?[fl]p?)\b/i // ARMHF
|
||||
], [[ARCHITECTURE, 'armhf']], [
|
||||
|
||||
// PocketPC mistakenly identified as PowerPC
|
||||
/windows (ce|mobile); ppc;/i
|
||||
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
|
||||
], [[ARCHITECTURE, 'arm']], [
|
||||
|
||||
/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i // PowerPC
|
||||
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
|
||||
|
||||
/(sun4\w)[;\)]/i // SPARC
|
||||
/ sun4\w[;\)]/i // SPARC
|
||||
], [[ARCHITECTURE, 'sparc']], [
|
||||
|
||||
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
|
||||
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
||||
], [[ARCHITECTURE, lowerize]]
|
||||
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,
|
||||
/((ppc|powerpc)(64)?)( mac|;|\))/i, // PowerPC
|
||||
/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i // Alpha
|
||||
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
|
||||
/winnt.+\[axp/i
|
||||
], [[ARCHITECTURE, 'alpha']]
|
||||
],
|
||||
|
||||
device : [[
|
||||
@@ -512,7 +563,7 @@
|
||||
/\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)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
||||
/samsung[- ]((?!sm-[lr])[-\w]+)/i,
|
||||
/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,
|
||||
/sec-(sgh\w+)/i
|
||||
], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [
|
||||
|
||||
@@ -531,37 +582,50 @@
|
||||
], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [
|
||||
|
||||
// Honor
|
||||
/(?:honor)([-\w ]+)[;\)]/i
|
||||
/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
|
||||
], [MODEL, [VENDOR, HONOR], [TYPE, TABLET]], [
|
||||
/honor([-\w ]+)[;\)]/i
|
||||
], [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]], [
|
||||
|
||||
// Huawei
|
||||
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
||||
/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
|
||||
], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [
|
||||
/(?:huawei)([-\w ]+)[;\)]/i,
|
||||
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
||||
], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [
|
||||
|
||||
// Xiaomi
|
||||
/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
|
||||
/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i // Mi Pad tablets
|
||||
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [
|
||||
|
||||
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: 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
|
||||
/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, // Xiaomi Redmi 'numeric' models
|
||||
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i // Xiaomi Mi
|
||||
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i, // Xiaomi Mi
|
||||
/ ([\w ]+) miui\/v?\d/i
|
||||
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
|
||||
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, // Redmi Pad
|
||||
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i // Mi Pad tablets
|
||||
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [
|
||||
|
||||
// OnePlus
|
||||
/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,
|
||||
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
||||
], [MODEL, [VENDOR, ONEPLUS], [TYPE, MOBILE]], [
|
||||
|
||||
// OPPO
|
||||
/; (\w+) bui.+ oppo/i,
|
||||
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
|
||||
], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [
|
||||
/\b(opd2\d{3}a?) bui/i
|
||||
], [MODEL, [VENDOR, 'OPPO'], [TYPE, TABLET]], [
|
||||
], [MODEL, [VENDOR, OPPO], [TYPE, MOBILE]], [
|
||||
/\b(opd2(\d{3}a?))(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, strMapper, { 'OnePlus' : ['203', '304', '403', '404', '413', '415'], '*' : OPPO }], [TYPE, TABLET]], [
|
||||
|
||||
// BLU
|
||||
/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i // Vivo series
|
||||
], [MODEL, [VENDOR, 'BLU'], [TYPE, MOBILE]], [
|
||||
|
||||
// Vivo
|
||||
/vivo (\w+)(?: bui|\))/i,
|
||||
/; vivo (\w+)(?: bui|\))/i,
|
||||
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i
|
||||
], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [
|
||||
|
||||
@@ -569,10 +633,17 @@
|
||||
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i
|
||||
], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [
|
||||
|
||||
// Lenovo
|
||||
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
|
||||
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
|
||||
], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [
|
||||
/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i
|
||||
], [MODEL, [VENDOR, LENOVO], [TYPE, MOBILE]], [
|
||||
|
||||
// Motorola
|
||||
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
|
||||
/\bmot(?:orola)?[- ](\w*)/i,
|
||||
/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
||||
/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,
|
||||
/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i
|
||||
], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [
|
||||
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
||||
], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [
|
||||
@@ -581,38 +652,33 @@
|
||||
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
||||
], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [
|
||||
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
||||
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
|
||||
/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,
|
||||
/\blg-?([\d\w]+) bui/i
|
||||
], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [
|
||||
|
||||
// Lenovo
|
||||
/(ideatab[-\w ]+)/i,
|
||||
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
|
||||
], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [
|
||||
|
||||
// Nokia
|
||||
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
||||
/nokia[-_ ]?([-\w\.]*)/i
|
||||
], [[MODEL, /_/g, ' '], [VENDOR, 'Nokia'], [TYPE, MOBILE]], [
|
||||
/(nokia) (t[12][01])/i
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
|
||||
/nokia[-_ ]?(([-\w\. ]*))/i
|
||||
], [[MODEL, /_/g, ' '], [TYPE, MOBILE], [VENDOR, 'Nokia']], [
|
||||
|
||||
// Google
|
||||
/(pixel c)\b/i // Google Pixel C
|
||||
/(pixel (c|tablet))\b/i // Google Pixel C/Tablet
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [
|
||||
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i // Google Pixel
|
||||
// Google Pixel
|
||||
/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [
|
||||
/(google) (pixelbook( go)?)/i
|
||||
], [VENDOR, MODEL], [
|
||||
|
||||
// Sony
|
||||
/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
|
||||
/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
||||
], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [
|
||||
/sony tablet [ps]/i,
|
||||
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
||||
], [[MODEL, 'Xperia Tablet'], [VENDOR, SONY], [TYPE, TABLET]], [
|
||||
|
||||
// OnePlus
|
||||
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
||||
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
||||
], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [
|
||||
|
||||
// Amazon
|
||||
/(alexa)webm/i,
|
||||
/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, // Kindle Fire without Silk / Echo Show
|
||||
@@ -683,24 +749,36 @@
|
||||
], [MODEL, [VENDOR, 'Smartfren'], [TYPE, MOBILE]], [
|
||||
|
||||
// Nothing
|
||||
/droid.+; (a(?:015|06[35]|142p?))/i
|
||||
/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i
|
||||
], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [
|
||||
|
||||
// Archos
|
||||
/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
|
||||
/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
|
||||
], [MODEL, [VENDOR, 'Archos'], [TYPE, TABLET]], [
|
||||
/archos ([\w ]+)( b|\))/i,
|
||||
/; (ac[3-6]\d\w{2,8})( b|\))/i
|
||||
], [MODEL, [VENDOR, 'Archos'], [TYPE, MOBILE]], [
|
||||
|
||||
// HMD
|
||||
/; (n159v)/i
|
||||
], [MODEL, [VENDOR, 'HMD'], [TYPE, MOBILE]], [
|
||||
|
||||
// MIXED
|
||||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
|
||||
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
|
||||
/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i, // IMO
|
||||
/(imo) (tab \w+)/i, // IMO
|
||||
/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i // Infinix XPad / Tecno
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
|
||||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
|
||||
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Tecno/Micromax/Advan
|
||||
/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i, // BLU/HMD/IMO/Infinix/Lava/OnePlus/TCL
|
||||
/(hp) ([\w ]+\w)/i, // HP iPAQ
|
||||
/(asus)-?(\w+)/i, // Asus
|
||||
/(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia
|
||||
/(lenovo)[-_ ]?([-\w]+)/i, // Lenovo
|
||||
/(jolla)/i, // Jolla
|
||||
/(oppo) ?([\w ]+) bui/i // OPPO
|
||||
/(oppo) ?([\w ]+) bui/i, // OPPO
|
||||
/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i // Philips
|
||||
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
/(imo) (tab \w+)/i, // IMO
|
||||
/(kobo)\s(ereader|touch)/i, // Kobo
|
||||
/(archos) (gamepad2?)/i, // Archos
|
||||
/(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad
|
||||
/(kindle)\/([\w\.]+)/i // Kindle
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
@@ -709,8 +787,8 @@
|
||||
], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [
|
||||
/droid [\d\.]+; (fp\du?)(?: b|\))/i // Fairphone
|
||||
], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [
|
||||
/(shield[\w ]+) b/i // Nvidia Shield Tablets
|
||||
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [
|
||||
/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i // Nvidia Tablets
|
||||
], [MODEL, [VENDOR, NVIDIA], [TYPE, TABLET]], [
|
||||
/(sprint) (\w+)/i // Sprint Phones
|
||||
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
||||
/(kin\.[onetw]{3})/i // Microsoft Kin
|
||||
@@ -724,11 +802,15 @@
|
||||
// SMARTTVS
|
||||
///////////////////
|
||||
|
||||
/(philips)[\w ]+tv/i, // Philips
|
||||
/smart-tv.+(samsung)/i // Samsung
|
||||
], [VENDOR, [TYPE, SMARTTV]], [
|
||||
/hbbtv.+maple;(\d+)/i
|
||||
], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [
|
||||
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i // LG SmartTV
|
||||
/(vizio)(?: |.+model\/)(\w+-\w+)/i, // Vizio
|
||||
/tcast.+(lg)e?. ([-\w]+)/i // LG SmartTV
|
||||
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
|
||||
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
||||
], [[VENDOR, LG], [TYPE, SMARTTV]], [
|
||||
/(apple) ?tv/i // Apple TV
|
||||
], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [
|
||||
@@ -740,47 +822,61 @@
|
||||
], [[MODEL, CHROMECAST+' Nest Hub'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
|
||||
/crkey/i // Google Chromecast, Linux-based or unknown
|
||||
], [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
|
||||
/(portaltv)/i // Facebook Portal TV
|
||||
], [MODEL, [VENDOR, FACEBOOK], [TYPE, SMARTTV]], [
|
||||
/droid.+aft(\w+)( bui|\))/i // Fire TV
|
||||
], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [
|
||||
/(shield \w+ tv)/i // Nvidia Shield TV
|
||||
], [MODEL, [VENDOR, NVIDIA], [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
|
||||
/(mi(tv|box)-?\w+) bui/i // Xiaomi
|
||||
], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [
|
||||
/Hbbtv.*(technisat) (.*);/i // TechniSAT
|
||||
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
|
||||
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku
|
||||
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i // HbbTV devices
|
||||
], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [
|
||||
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i // SmartTV from Unidentified Vendors
|
||||
], [[TYPE, SMARTTV]], [
|
||||
], [[VENDOR, /.+\/(\w+)/, '$1', strMapper, {'LG':'lge'}], [MODEL, trim], [TYPE, SMARTTV]], [
|
||||
|
||||
///////////////////
|
||||
// CONSOLES
|
||||
///////////////////
|
||||
|
||||
/(ouya)/i, // Ouya
|
||||
/(nintendo) (\w+)/i // Nintendo
|
||||
], [VENDOR, MODEL, [TYPE, CONSOLE]], [
|
||||
/droid.+; (shield) bui/i // Nvidia
|
||||
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
|
||||
/(playstation \w+)/i // Playstation
|
||||
], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [
|
||||
/\b(xbox(?: one)?(?!; xbox))[\); ]/i // Microsoft Xbox
|
||||
], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [
|
||||
/(ouya)/i, // Ouya
|
||||
/(nintendo) (\w+)/i, // Nintendo
|
||||
/(retroid) (pocket ([^\)]+))/i // Retroid Pocket
|
||||
], [VENDOR, MODEL, [TYPE, CONSOLE]], [
|
||||
/droid.+; (shield)( bui|\))/i // Nvidia Portable
|
||||
], [MODEL, [VENDOR, NVIDIA], [TYPE, CONSOLE]], [
|
||||
|
||||
///////////////////
|
||||
// WEARABLES
|
||||
///////////////////
|
||||
|
||||
/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i // Samsung Galaxy Watch
|
||||
/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i // Samsung Galaxy Watch
|
||||
], [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]], [
|
||||
/((pebble))app/i // Pebble
|
||||
/((pebble))app/i, // Pebble
|
||||
/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i // Asus ZenWatch / LG Watch / Pixel Watch
|
||||
], [VENDOR, MODEL, [TYPE, WEARABLE]], [
|
||||
/(ow(?:19|20)?we?[1-3]{1,3})/i // Oppo Watch
|
||||
], [MODEL, [VENDOR, OPPO], [TYPE, WEARABLE]], [
|
||||
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i // Apple Watch
|
||||
], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [
|
||||
/(opwwe\d{3})/i // OnePlus Watch
|
||||
], [MODEL, [VENDOR, ONEPLUS], [TYPE, WEARABLE]], [
|
||||
/(moto 360)/i // Motorola 360
|
||||
], [MODEL, [VENDOR, MOTOROLA], [TYPE, WEARABLE]], [
|
||||
/(smartwatch 3)/i // Sony SmartWatch
|
||||
], [MODEL, [VENDOR, SONY], [TYPE, WEARABLE]], [
|
||||
/(g watch r)/i // LG G Watch R
|
||||
], [MODEL, [VENDOR, LG], [TYPE, WEARABLE]], [
|
||||
/droid.+; (wt63?0{2,3})\)/i
|
||||
], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [
|
||||
|
||||
@@ -790,10 +886,12 @@
|
||||
|
||||
/droid.+; (glass) \d/i // Google Glass
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, XR]], [
|
||||
/(pico) (4|neo3(?: link|pro)?)/i // Pico
|
||||
/(pico) ([\w ]+) os\d/i // Pico
|
||||
], [VENDOR, MODEL, [TYPE, XR]], [
|
||||
/; (quest( \d| pro)?)/i // Oculus Quest
|
||||
/(quest( \d| pro)?s?).+vr/i // Meta Quest
|
||||
], [MODEL, [VENDOR, FACEBOOK], [TYPE, XR]], [
|
||||
/mobile vr; rv.+firefox/i // Unidentifiable VR device using Firefox Reality / Wolvic
|
||||
], [[TYPE, XR]], [
|
||||
|
||||
///////////////////
|
||||
// EMBEDDED
|
||||
@@ -803,20 +901,26 @@
|
||||
], [VENDOR, [TYPE, EMBEDDED]], [
|
||||
/(aeobc)\b/i // Echo Dot
|
||||
], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [
|
||||
/(homepod).+mac os/i // Apple HomePod
|
||||
], [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]], [
|
||||
/windows iot/i // Unidentifiable embedded device using Windows IoT
|
||||
], [[TYPE, EMBEDDED]], [
|
||||
|
||||
////////////////////
|
||||
// MIXED (GENERIC)
|
||||
///////////////////
|
||||
|
||||
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
|
||||
], [MODEL, [TYPE, MOBILE]], [
|
||||
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
|
||||
], [MODEL, [TYPE, TABLET]], [
|
||||
/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i // Unidentifiable SmartTV
|
||||
], [MODEL, [TYPE, SMARTTV]], [
|
||||
/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i
|
||||
], [[TYPE, SMARTTV]], [
|
||||
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i
|
||||
], [MODEL, [TYPE, strMapper, { 'mobile' : 'Mobile', 'xr' : 'VR', '*' : TABLET }]], [
|
||||
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
|
||||
], [[TYPE, TABLET]], [
|
||||
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
|
||||
], [[TYPE, MOBILE]], [
|
||||
/(android[-\w\. ]{0,9});.+buil/i // Generic Android Device
|
||||
/droid .+?; ([\w\. -]+)( bui|\))/i // Generic Android Device
|
||||
], [MODEL, [VENDOR, 'Generic']]
|
||||
],
|
||||
|
||||
@@ -836,8 +940,11 @@
|
||||
/ekioh(flow)\/([\w\.]+)/i, // Flow
|
||||
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
|
||||
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
|
||||
/\b(libweb)/i
|
||||
|
||||
/\b(libweb)/i // LibWeb
|
||||
], [NAME, VERSION], [
|
||||
/ladybird\//i
|
||||
], [[NAME, 'LibWeb']], [
|
||||
|
||||
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko
|
||||
], [VERSION, NAME]
|
||||
@@ -846,22 +953,25 @@
|
||||
os : [[
|
||||
|
||||
// Windows
|
||||
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
|
||||
/(windows nt) (6\.[23]); arm/i // Windows RT
|
||||
], [[NAME, /N/, 'R'], [VERSION, strMapper, windowsVersionMap]], [
|
||||
/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i, // Windows IoT/Mobile/Phone
|
||||
// Windows NT/3.1/95/98/ME/2000/XP/Vista/7/8/8.1/10/11
|
||||
/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i
|
||||
], [NAME, VERSION], [
|
||||
/windows nt ?([\d\.\)]*)(?!.+xbox)/i,
|
||||
/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i
|
||||
], [[VERSION, /(;|\))/g, '', strMapper, windowsVersionMap], [NAME, WINDOWS]], [
|
||||
/(windows ce)\/?([\d\.]*)/i // Windows CE
|
||||
], [NAME, VERSION], [
|
||||
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i // Windows Phone
|
||||
], [NAME, [VERSION, strMapper, windowsVersionMap]], [
|
||||
/windows nt 6\.2; (arm)/i, // Windows RT
|
||||
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
||||
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
||||
], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [
|
||||
|
||||
// iOS/macOS
|
||||
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
||||
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
||||
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
|
||||
/cfnetwork\/.+darwin/i
|
||||
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [
|
||||
/(mac os x) ?([\w\. ]*)/i,
|
||||
/(macintosh|mac_powerpc\b)(?!.+haiku)/i // Mac OS
|
||||
/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i // Mac OS
|
||||
], [[NAME, 'macOS'], [VERSION, /_/g, '.']], [
|
||||
|
||||
// Google Chromecast
|
||||
@@ -877,22 +987,26 @@
|
||||
], [VERSION, [NAME, CHROMECAST]], [
|
||||
|
||||
// Mobile OSes
|
||||
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS
|
||||
], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS/OpenHarmony
|
||||
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,
|
||||
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry
|
||||
/(tizen|kaios)[\/ ]([\w\.]+)/i, // Tizen/KaiOS
|
||||
/\((series40);/i // Series 40
|
||||
/droid ([\w\.]+)\b.+(android[- ]x86)/i // Android-x86
|
||||
], [VERSION, NAME], [
|
||||
/(ubuntu) ([\w\.]+) like android/i // Ubuntu Touch
|
||||
], [[NAME, /(.+)/, '$1 Touch'], VERSION], [
|
||||
/(harmonyos)[\/ ]?([\d\.]*)/i, // HarmonyOS
|
||||
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
|
||||
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i
|
||||
], [NAME, VERSION], [
|
||||
/\(bb(10);/i // BlackBerry 10
|
||||
], [VERSION, [NAME, BLACKBERRY]], [
|
||||
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i // Symbian
|
||||
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i // Symbian
|
||||
], [VERSION, [NAME, 'Symbian']], [
|
||||
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS
|
||||
], [VERSION, [NAME, FIREFOX+' OS']], [
|
||||
/web0s;.+rt(tv)/i,
|
||||
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i // WebOS
|
||||
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i, // WebOS
|
||||
/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i
|
||||
], [VERSION, [NAME, 'webOS']], [
|
||||
/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i
|
||||
// https://webostv.developer.lge.com/develop/specifications/web-api-and-web-engine
|
||||
], [[VERSION, strMapper, {'25':'120','24':'108','23':'94','22':'87','6':'79','5':'68','4':'53','3':'38','2':'538','1':'537','*':'TV'}], [NAME, 'webOS']], [
|
||||
/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i // watchOS
|
||||
], [VERSION, [NAME, 'watchOS']], [
|
||||
|
||||
@@ -912,20 +1026,20 @@
|
||||
|
||||
// Other
|
||||
/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, // Joli/Palm
|
||||
/(mint)[\/\(\) ]?(\w*)/i, // Mint
|
||||
/(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux
|
||||
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
||||
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
|
||||
/(hurd|linux) ?([\w\.]*)/i, // Hurd/Linux
|
||||
/linux.+(mint)[\/\(\) ]?([\w\.]*)/i, // Mint
|
||||
/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i, // Mageia/VectorLinux/Fuchsia/ArcaOS/Arch
|
||||
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
||||
// Ubuntu/Debian/SUSE/Gentoo/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire/Knoppix
|
||||
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, // Solaris
|
||||
/\b(aix)[; ]([1-9\.]{0,4})/i, // AIX
|
||||
/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i, // Hurd/Linux/MorphOS
|
||||
/(gnu) ?([\w\.]*)/i, // GNU
|
||||
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
|
||||
/(haiku) (\w+)/i // Haiku
|
||||
/(haiku) ?(r\d)?/i // Haiku
|
||||
], [NAME, VERSION], [
|
||||
/(sunos) ?([\w\.\d]*)/i // Solaris
|
||||
/(sunos) ?([\d\.]*)/i // Solaris
|
||||
], [[NAME, 'Solaris'], VERSION], [
|
||||
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, // Solaris
|
||||
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i, // AIX
|
||||
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
|
||||
/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/OpenVMS/HP-UX/SerenityOS
|
||||
/(unix) ?([\w\.]*)/i // UNIX
|
||||
], [NAME, VERSION]
|
||||
]
|
||||
@@ -1153,16 +1267,29 @@
|
||||
|
||||
switch (this.itemType) {
|
||||
case UA_BROWSER:
|
||||
case UA_ENGINE:
|
||||
var brands = uaCH[FULLVERLIST] || uaCH[BRANDS], prevName;
|
||||
if (brands) {
|
||||
for (var i in brands) {
|
||||
var brandName = strip(/(Google|Microsoft) /, brands[i].brand || brands[i]),
|
||||
for (var i=0; i<brands.length; i++) {
|
||||
var brandName = brands[i].brand || brands[i],
|
||||
brandVersion = brands[i].version;
|
||||
if (!/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && !/chromi/i.test(brandName)))) {
|
||||
this.set(NAME, brandName)
|
||||
.set(VERSION, brandVersion)
|
||||
.set(MAJOR, majorize(brandVersion));
|
||||
prevName = brandName;
|
||||
if (this.itemType == UA_BROWSER &&
|
||||
!/not.a.brand/i.test(brandName) &&
|
||||
(!prevName ||
|
||||
(/Chrom/.test(prevName) && brandName != CHROMIUM) ||
|
||||
(prevName == EDGE && /WebView2/.test(brandName))
|
||||
)) {
|
||||
brandName = strMapper(brandName, browserHintsMap);
|
||||
prevName = this.get(NAME);
|
||||
if (!(prevName && !/Chrom/.test(prevName) && /Chrom/.test(brandName))) {
|
||||
this.set(NAME, brandName)
|
||||
.set(VERSION, brandVersion)
|
||||
.set(MAJOR, majorize(brandVersion));
|
||||
}
|
||||
prevName = brandName;
|
||||
}
|
||||
if (this.itemType == UA_ENGINE && brandName == CHROMIUM) {
|
||||
this.set(VERSION, brandVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1180,11 +1307,16 @@
|
||||
}
|
||||
if (uaCH[MODEL]) {
|
||||
this.set(MODEL, uaCH[MODEL]);
|
||||
}
|
||||
// Xbox-Specific Detection
|
||||
if (uaCH[MODEL] == 'Xbox') {
|
||||
this.set(TYPE, CONSOLE)
|
||||
.set(VENDOR, MICROSOFT);
|
||||
if (!this.get(TYPE) || !this.get(VENDOR)) {
|
||||
var reParse = {};
|
||||
rgxMapper.call(reParse, 'droid 9; ' + uaCH[MODEL] + ')', rgxMap);
|
||||
if (!this.get(TYPE) && !!reParse.type) {
|
||||
this.set(TYPE, reParse.type);
|
||||
}
|
||||
if (!this.get(VENDOR) && !!reParse.vendor) {
|
||||
this.set(VENDOR, reParse.vendor);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (uaCH[FORMFACTORS]) {
|
||||
var ff;
|
||||
@@ -1260,11 +1392,22 @@
|
||||
extensions = undefined;
|
||||
}
|
||||
|
||||
// Convert Headers object into a plain object
|
||||
if (headers && typeof headers.append === FUNC_TYPE) {
|
||||
var kv = {};
|
||||
headers.forEach(function (v, k) { kv[k] = v; });
|
||||
headers = kv;
|
||||
if (headers) {
|
||||
if (typeof headers.append === FUNC_TYPE) {
|
||||
// Convert Headers object into a plain object
|
||||
var kv = {};
|
||||
headers.forEach(function (v, k) { kv[String(k).toLowerCase()] = v; });
|
||||
headers = kv;
|
||||
} else {
|
||||
// Normalize headers field name into lowercase
|
||||
var normalized = {};
|
||||
for (var header in headers) {
|
||||
if (headers.hasOwnProperty(header)) {
|
||||
normalized[String(header).toLowerCase()] = headers[header];
|
||||
}
|
||||
}
|
||||
headers = normalized;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(this instanceof UAParser)) {
|
||||
|
||||
242
test/data/ua-ch/headers.js
Normal file
242
test/data/ua-ch/headers.js
Normal file
@@ -0,0 +1,242 @@
|
||||
const UACHTests = [
|
||||
{
|
||||
desc: 'Avast Secure Browser',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Avast Secure Browser";v="131", "Chromium";v="131", "Not_A Brand";v="24"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Avast Secure Browser',
|
||||
version : '131',
|
||||
major : '131',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Brave',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Not A(Brand";v="8", "Chromium";v="132", "Brave";v="132"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Brave',
|
||||
version : '132',
|
||||
major : '132',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Chrome',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Chrome',
|
||||
version : '111',
|
||||
major : '111',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Chrome Headless',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Chromium";v="124", "HeadlessChrome";v="124", "Not-A.Brand";v="99"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Chrome Headless',
|
||||
version : '124',
|
||||
major : '124',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Chrome WebView',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Android WebView";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Chrome WebView',
|
||||
version : '123',
|
||||
major : '123',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'DuckDuckGo',
|
||||
headers : {
|
||||
'sec-ch-ua': '"DuckDuckGo";v="131", "Chromium";v="131", "Not_A Brand";v="24"'
|
||||
},
|
||||
expect : {
|
||||
browser : {
|
||||
name : 'DuckDuckGo',
|
||||
version : '131',
|
||||
major : '131',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Edge',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Edge',
|
||||
version : '120',
|
||||
major : '120',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Edge WebView2',
|
||||
headers : {
|
||||
'sec-ch-ua': '" Not;A Brand";v="99", "Microsoft Edge";v="103", "Chromium";v="103", "Microsoft Edge WebView2";v="104"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Edge WebView2',
|
||||
version : '104',
|
||||
major : '104',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Huawei Browser',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "HuaweiBrowser";v="114"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Huawei Browser',
|
||||
version : '114',
|
||||
major : '114',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'MIUI Browser',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Miui Browser";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'MIUI Browser',
|
||||
version : '123',
|
||||
major : '123',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Oculus Browser',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Chromium";v="130", "Oculus Browser";v="36", "Not?A_Brand";v="99"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Oculus Browser',
|
||||
version : '36',
|
||||
major : '36',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Opera',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Opera";v="116", "Chromium";v="131", "Not_A Brand";v="24"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Opera',
|
||||
version : '116',
|
||||
major : '116',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Opera GX',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Chromium";v="128", "Not;A=Brand";v="24", "Opera GX";v="114"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Opera GX',
|
||||
version : '114',
|
||||
major : '114',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Opera Mobi',
|
||||
headers : {
|
||||
'sec-ch-ua': '"OperaMobile";v="86", ";Not A Brand";v="99", "Opera";v="115", "Chromium";v="130"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Opera Mobi',
|
||||
version : '86',
|
||||
major : '86',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Opera Mobi',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Chromium";v="132", "OperaMobile";v="87", "Opera";v="117", " Not A;Brand";v="99"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Opera Mobi',
|
||||
version : '87',
|
||||
major : '87',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Samsung Internet',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Chromium";v="125", "Not.A/Brand";v="24", "Samsung Internet";v="27.0"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Samsung Internet',
|
||||
version : '27.0',
|
||||
major : '27',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'Yandex',
|
||||
headers : {
|
||||
'sec-ch-ua': '"Chromium";v="130", "YaBrowser";v="24.12", "Not?A_Brand";v="99", "Yowser";v="2.5"'
|
||||
},
|
||||
expect: {
|
||||
browser : {
|
||||
name : 'Yandex',
|
||||
version : '24.12',
|
||||
major : '24',
|
||||
type : undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
module.exports = UACHTests;
|
||||
@@ -511,6 +511,16 @@
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Dooble",
|
||||
"ua" : "Mozilla/5.0 (X11; Haiku BePC) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.17 Chrome/87.0.4280.144 Safari/537.36 Dooble/2023.12.25 Dooble/2023.12.25",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Dooble",
|
||||
"version" : "2023.12.25",
|
||||
"major" : "2023"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Doris",
|
||||
"ua" : "Doris/1.15 [en] (Symbian)",
|
||||
@@ -541,6 +551,26 @@
|
||||
"major" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Ecosia on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 10; SM-G975U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36 (Ecosia android@85.0.4183.127)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Ecosia",
|
||||
"version" : "85.0.4183.127",
|
||||
"major" : "85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Ecosia on iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 (Ecosia ios@3.0.1.533)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Ecosia",
|
||||
"version" : "3.0.1.533",
|
||||
"major" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Epiphany",
|
||||
"ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6",
|
||||
@@ -1006,6 +1036,16 @@
|
||||
"major" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Otter",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/602.1 (KHTML, like Gecko) Otter/1.0.81",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Otter",
|
||||
"version" : "1.0.81",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PicoBrowser",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; Pico Neo3 Link OS5.8.4.0 like Quest) AppleWebKit/537.36 (KHTML, like Gecko) PicoBrowser/3.3.22 Chrome/105.0.5195.68 VR Safari/537.36",
|
||||
@@ -1067,13 +1107,33 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "LibreWolf",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 LibreWolf/91.0",
|
||||
"desc" : "Surf Browser",
|
||||
"ua" : "Mozilla/5.0 (Android 6.0; HUAWEI ALE-L21) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 SurfBrowser/3.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "LibreWolf",
|
||||
"version" : "91.0",
|
||||
"major" : "91"
|
||||
"name" : "Surf",
|
||||
"version" : "3.0",
|
||||
"major" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "LG Browser",
|
||||
"ua" : "Mozilla/5.0 (Unknown; Linux armv7l) AppleWebKit/537.1+ (KHTML, like Gecko) Safari/537.1+ LG Browser/6.00.00(+mouse+3D+SCREEN+TUNER; LGE; 47LA621V-ZD; 04.28.17; 0x00000001;); LG NetCast.TV-2013 /04.28.17 (LG, 47LA621V-ZD, wired)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "LG Browser",
|
||||
"version" : "6.00.00",
|
||||
"major" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Ladybird",
|
||||
"ua" : "Mozilla/5.0 (Linux; x86_64) Ladybird/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Ladybird",
|
||||
"version" : "1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1618,6 +1678,16 @@
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "qutebrowser",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) qutebrowser/2.4.0 QtWebEngine/5.15.6 Chrome/95.0.4628.2 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "qutebrowser",
|
||||
"version" : "2.4.0",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rekonq 2",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) rekonq/2.2.1 Safari/537.21",
|
||||
@@ -2159,6 +2229,26 @@
|
||||
"major" : "74"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Edge WebView",
|
||||
"ua" : "Mozilla/5.0 (Windows IoT 10.0; Android 6.0.1; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Mobile Safari/537.36 Edge/18.17763",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Edge WebView",
|
||||
"version" : "18.17763",
|
||||
"major" : "18"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Edge WebView2",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 11; SM-G991B Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.120 Mobile Safari/537.36 EdgW/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Edge WebView2",
|
||||
"version" : "91.0.4472.120",
|
||||
"major" : "91"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Iridium",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Iridium/43.8 Safari/537.36 Chrome/43.0.2357.132",
|
||||
@@ -2493,6 +2583,26 @@
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Daum App Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 11; SM-G970N Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 DaumApps/7.5.0 DaumDevice/mobile",
|
||||
"expect" : {
|
||||
"name" : "Daum",
|
||||
"version": "7.5.0",
|
||||
"major" : "7",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Daum App iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Safari/605.1.15 Mobile/15E148 DaumApps/7.5.1 DaumDevice/mobile",
|
||||
"expect" : {
|
||||
"name" : "Daum",
|
||||
"version": "7.5.1",
|
||||
"major" : "7",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "TikTok",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 11; 21061119AG Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile Safari/537.36 trill_2022109040 JsSdk/1.0 NetType/MOBILE Channel/googleplay AppName/musical_ly app_version/21.9.4 ByteLocale/ru-RU ByteFullLocale/ru-RU Region/KG BytedanceWebview/d8a21c6",
|
||||
@@ -2585,5 +2695,27 @@
|
||||
"major" : "10",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Zalo on iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Zalo/20.05.01 Mobile/15E148",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Zalo",
|
||||
"version" : "20.05.01",
|
||||
"major" : "20",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Zalo on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 10; Vsmart Live Build/QKQ1.190918.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36 Zalo/20.04.02.r1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Zalo",
|
||||
"version" : "20.04.02.r1",
|
||||
"major" : "20",
|
||||
"type" : "inapp"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -87,6 +87,22 @@
|
||||
"architecture" : "amd64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Alpha",
|
||||
"ua" : "Mozilla/3.01 (WinNT; I) [AXP]",
|
||||
"expect" :
|
||||
{
|
||||
"architecture" : "alpha"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Alpha",
|
||||
"ua" : "Mozilla/5.0 (X11; OpenBSD alpha; rv:78.0) Gecko/20100101 Firefox/78.0",
|
||||
"expect" :
|
||||
{
|
||||
"architecture" : "alpha"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ARM",
|
||||
"ua" : "Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537",
|
||||
@@ -175,6 +191,14 @@
|
||||
"architecture" : "arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Search App",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 9; JAT-LX1 Build/HONORJAT-LX1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.96 Mobile Safari/537.36 GoogleApp/11.11.10.21.arm",
|
||||
"expect" :
|
||||
{
|
||||
"architecture" : "arm"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Search App",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 6.0; M5s Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.147 Mobile Safari/537.36 GSA/12.40.17.23.arm64",
|
||||
@@ -270,5 +294,13 @@
|
||||
{
|
||||
"architecture" : "68k"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "x86",
|
||||
"ua" : "Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.8.1.20) Gecko/20090127 BonEcho/2.0.0.20",
|
||||
"expect" :
|
||||
{
|
||||
"architecture" : "ia32"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
[
|
||||
{
|
||||
"desc": "Generic Android Device",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 9; X96mini_RP Build/X96mini_RP)",
|
||||
"expect": {
|
||||
"vendor": "Generic",
|
||||
"model": "X96mini_RP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Generic Android Device",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; i980 Build/MRA58K)",
|
||||
"expect": {
|
||||
"vendor": "Generic",
|
||||
"model": "Android 6.0.1"
|
||||
"model": "i980"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -16,6 +24,14 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Unknown VR Device",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; Unknown Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile VR Safari/537.36",
|
||||
"expect": {
|
||||
"model": "Unknown",
|
||||
"type": "xr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Desktop (IE11 with Tablet string)",
|
||||
"ua": "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; GWX:MANAGED; rv:11.0) like Gecko",
|
||||
@@ -34,6 +50,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ChangHong Android TV",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; ChangHong Android TV Build/LMY49J) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/10.8 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "ChangHong",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "MStar Android TV",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.3.1; MStar Android TV Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "MStar",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ONIDA Android TV",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; ONIDA Android TV Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/48.0.2542.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "ONIDA",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "JVC LT-43V55LFA Smart TV",
|
||||
"ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 OPR/40.0.2207.0 OMI/4.9.0.237.DOM3-OPT.245 Model/Vestel-MB211 VSTVB MB200 HbbTV/1.2.1 (; JVC; MB211; 3.19.4.2; _TV_NT72563_2017 SmartTvA/3.0.0",
|
||||
@@ -79,51 +122,6 @@
|
||||
"type": "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 7T Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; HD1913) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.5563.57 Mobile Safari/537.36 EdgA/110.0.1587.66",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "HD1913",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips SmartTV",
|
||||
"ua": "Opera/9.80 HbbTV/1.1.1 (; Philips; ; ; ; ) NETTV/4.0.2; en) Version/11.60",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips 32PFL6606K/02 SmartTV (2011)",
|
||||
"ua": "Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips 32PFL6606K/02 SmartTV (2013)",
|
||||
"ua": "Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips 32PHS5301/12 SmartTV (2016)",
|
||||
"ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36 OPR/29.0.1803.0 OMI/4.5.23.37.MOT2.13 HbbTV/1.2.1 (;Philips;32PHS5301/12;;_TV_MT5800;) Firmware/TPM161E_012.002.045.001 en",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "32PHS5301/12",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung SmartTV",
|
||||
"ua": "Mozilla/5.0 (SMART-TV; X11; Linux armv7l) AppleWebkit/537.42 (KHTML, like Gecko) Safari/537.42",
|
||||
@@ -238,6 +236,69 @@
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Unknown TV",
|
||||
"ua": "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/ 162671",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Unknown TV",
|
||||
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.41 (KHTML, like Gecko) Large Screen WebAppManager Safari/537.41",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Unknown VR Device using Firefox Reality",
|
||||
"ua": "Mozilla/5.0 (Android 10; Mobile VR; rv:123.0) Gecko/123.0 Firefox/123.0",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "undefined",
|
||||
"type": "xr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Unknown VR Device using Wolvic",
|
||||
"ua": "Mozilla/5.0 (Android 14; Mobile VR; rv:128.0) Gecko/128.0 Firefox/128.0 Wolvic/1.8",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "undefined",
|
||||
"type": "xr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Smart TV",
|
||||
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 HbbTV/1.6.1 ( DRM; LGE/ATMACA/GRAETZ; GR32S1470; WEBOS22 04.41.53; W22_K8AP; DTV_C22L;) LaTivu_1.0.1_2022",
|
||||
"expect": {
|
||||
"vendor": "GRAETZ",
|
||||
"model": "GR32S1470",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Smart TV",
|
||||
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 HbbTV/1.5.1 (+DRM; LGE/DUALSHINE/SKYTECH; ST-5090; WEBOS5.0 04.50.63; W50_K6LP; DTV_C20P;)",
|
||||
"expect": {
|
||||
"vendor": "SKYTECH",
|
||||
"model": "ST-5090",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Smart TV",
|
||||
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 HbbTV/1.6.1 (+DRM; LGE/SILICONPLAYER/Hyundai; 50HYN3205; WEBOS22 04.42.26; W22_K8LP; DTV_C22P;)",
|
||||
"expect": {
|
||||
"vendor": "Hyundai",
|
||||
"model": "50HYN3205",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "PDA with Windows CE",
|
||||
"ua": "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0",
|
||||
@@ -246,5 +307,14 @@
|
||||
"model": "undefined",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows IoT",
|
||||
"ua" : "Mozilla/5.0 (Windows IoT 10.0; Android 6.0.1; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Mobile Safari/537.36 Edge/18.17763",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "undefined",
|
||||
"type": "embedded"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,6 +1,15 @@
|
||||
[
|
||||
{
|
||||
"desc": "Alcatel",
|
||||
"desc": "Alcatel 4056W",
|
||||
"ua": "Mozilla/5.0 (Mobile; ALCATEL 4056W; rv:84.0) Gecko/84.0 Firefox/84.0 KAIOS/3.0",
|
||||
"expect": {
|
||||
"vendor": "ALCATEL",
|
||||
"model": "4056W",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Alcatel A564C",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; ALCATEL A564C Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ALCATEL",
|
||||
|
||||
@@ -116,6 +116,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Apple HomePod",
|
||||
"ua": "AppleCoreMedia/1.0.0.15D61 (HomePod; U; CPU OS 11_2_5 like Mac OS X; en_us)",
|
||||
"expect": {
|
||||
"vendor": "Apple",
|
||||
"model": "HomePod",
|
||||
"type": "embedded"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Issue #519",
|
||||
"ua": "ios/iPhone/14.2/SOME_CUSTOM_APP_VERSION",
|
||||
|
||||
227
test/data/ua/device/archos.json
Normal file
227
test/data/ua/device/archos.json
Normal file
@@ -0,0 +1,227 @@
|
||||
[
|
||||
{
|
||||
"desc": "Archos 5",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 1.6; fr-fr; Archos5 Build/Donut) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "5",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 40b Titanium Surround",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Archos 40b Titanium Surround Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "40b Titanium Surround",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 40c Titanium v2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; ARCHOS 40C TIv2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "40C TIv2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 45 Neon",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Archos 45 Neon Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "45 Neon",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 45 Neon",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; AC45NE Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 YaBrowser/15.6.2311.6088.00 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "AC45NE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 45B Helium",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; AC45BHE Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "AC45BHE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 45B Titanium",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Archos 45B Titanium) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "45B Titanium",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 50 Cesium",
|
||||
"ua": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; ARCHOS; AC50CE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "AC50CE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 50B Helium 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; AC50BHE Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "AC50BHE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 55 diamond Selfie",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; Archos 55 diamond Selfie Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "55 diamond Selfie",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 80 G9",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; zh-tw; ARCHOS 80G9 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "80G9",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 80 Xenon",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.1.2; Archos 80 Xenon Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.99 Safari/537.36 OPR/50.6.2426.201126",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "80 Xenon",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 97c Platinum",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; Archos 97c Platinum Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "97c Platinum",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 101 Access 3G V2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; Archos Access 101 3G V2 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.130 Safari/537.36[FBAN/EMA;FBLC/pt_PT;FBAV/360.0.0.7.53;]",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "Access 101 3G V2",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 101 Oxygen 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Archos 101 Oxygen 4G Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.71 Safari/537.36 [FB_IAB/FB4A;FBAV/374.0.0.20.109;]",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "101 Oxygen 4G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 101 Platinum 3G V2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; AC101PL3GV2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "AC101PL3GV2",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 101B Helium 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; AC101BHE Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "AC101BHE",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos 101s Oxygen Ardoiz",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Archos Oxygen 101S ARDOIZ Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.102 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "Oxygen 101S ARDOIZ",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos GAMEPAD2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; ARCHOS GAMEPAD2 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.94 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "GAMEPAD2",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos Hello 7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Archos Hello 7 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.53 Safari/537.36 GoogleApp/13.24.9.26.arm64",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "Hello 7",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos Sense 101 X",
|
||||
"ua": "Mozilla/5.0 (Linux; arm; Android 7.0; Archos Sense 101 X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 YaBrowser/20.2.0.215.01 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "Sense 101 X",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos T101 FHD WiFi",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; ARCHOS T101 FHD WiFi Build/T00624; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.159 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "T101 FHD WiFi",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos Tikeasy 10d",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; Tikeasy 10d Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.260 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "Tikeasy 10d",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos T96 WIFI",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; ARCHOS T96 WIFI_EEA Build/RP1A.201005.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.78 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "T96 WIFI_EEA",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Archos X67 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; X67 5G Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.58 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Archos",
|
||||
"model": "X67 5G",
|
||||
"type": "tablet"
|
||||
}
|
||||
}
|
||||
]
|
||||
101
test/data/ua/device/blu.json
Normal file
101
test/data/ua/device/blu.json
Normal file
@@ -0,0 +1,101 @@
|
||||
[
|
||||
{
|
||||
"desc": "BLU Grand X LTE",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; BLU Grand X LTE Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.137 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "Grand X LTE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU Neo Energy Mini",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; BLU_NEO_ENERGY_MINI Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.54 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "NEO_ENERGY_MINI",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU NEO X PLUS",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; BLU NEO X PLUS Build/N090U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "NEO X PLUS",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU STUDIO X MINI",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; BLU STUDIO X MINI Build/S0150UU) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "STUDIO X MINI",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU Tank Mega",
|
||||
"ua": "Mozilla/5.0 (Mobile; BLU_TankMega_3G; rv:48.0; CAEN) Gecko/48.0 Firefox/48.0 KAIOS/2.5.1.1",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "TankMega_3G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU TOUCHBOOK G7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; BLU TOUCHBOOK G7 Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.107 Safari/537.36 OPR/29.0.1809.91837",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "TOUCHBOOK G7",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU Vivo 5 Mini",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; Vivo 5 Mini Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "Vivo 5 Mini",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU VIVO AIR LTE",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; BLU VIVO AIR LTE Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.107 Mobile Safari/537.36 OPR/29.0.1809.91837",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "VIVO AIR LTE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU VIVO GO",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 9; VIVO GO Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.121 Mobile Safari/537.36 OPR/50.0.2254.149182",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "VIVO GO",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU Vivo One Plus 2019",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Vivo One Plus 2019 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/277.0.0.41.126;]",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "Vivo One Plus 2019",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "BLU VIVO SELFIE",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 5.0; es-LA; BLU VIVO SELFIE Build/LRX21M) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/11.3.5.972 U3/0.8.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "BLU",
|
||||
"model": "VIVO SELFIE",
|
||||
"type": "mobile"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -34,5 +34,14 @@
|
||||
"model": "Quest Pro",
|
||||
"type": "xr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Portal TV",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; PortalTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.120 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Facebook",
|
||||
"model": "PortalTV",
|
||||
"type": "smarttv"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -71,51 +71,6 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel Tablet Build/AP2A.240905.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.107 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel Tablet",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel Watch",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 13; Google Pixel Watch Build/TWD4.231005.002)",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel Watch",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel Watch 2",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 13; Google Pixel Watch 2 Build/TWD9.240605.001.A1)",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel Watch 2",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel XL",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1; Pixel XL Build/NDE63X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel XL",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel XL",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Pixel XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel XL",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Pixel 2 Build/OPM1.171019.013) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Safari/537.36",
|
||||
@@ -125,6 +80,24 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Pixel 2) AppleWebKit/537.36 (KHTML, like Gecko) Edg/57.0.986.6",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.2; G011A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 Safari/537.36 OPR/68.3.3557.64528",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G011A",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 2 XL",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Pixel 2 XL Build/OPM1.171019.013) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Safari/537.36",
|
||||
@@ -152,6 +125,24 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 3",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; G013A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G013A",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 3a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; G020E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G020E",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 3 XL",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Pixel 3 XL Build/PD1A.180720.030) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36",
|
||||
@@ -197,6 +188,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 4",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; G020M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G020M",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 4a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Pixel 4a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36",
|
||||
@@ -206,6 +206,42 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 4a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; G025J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G025J",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 4a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; GA02099) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GA02099",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 4a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; G025N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G025N",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 4a (5G)",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel 4a (5G) Build/UP1A.231105.001.B2; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 EdgA/124.0.2478.64",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 4a (5G)",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 4 XL",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Pixel 4 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36",
|
||||
@@ -215,6 +251,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 5",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; G5NZ6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G5NZ6",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 5",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; GD1YQ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GD1YQ",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 5",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; GTT9Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GTT9Q",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 5",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.120 Mobile Safari/537.36",
|
||||
@@ -224,6 +287,51 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 5a 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; G4S1M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G4S1M",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 5a 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; G1F8F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G1F8F",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 6",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; Pixel 6 Build/QP1A.190711.020) AppleWebKit/545.31 (KHTML, like Gecko) Firefox/109.0.2318.118 Mobile Safari/545.22",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 6",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 6 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; Pixel 6 Pro Build/AP4A.241205.013; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/132.0.6834.163 Mobile Safari/537.36 Line/15.0.0/IAB",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 6 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 6 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; G8VOU) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G8VOU",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
@@ -232,5 +340,275 @@
|
||||
"model": "Pixel 7",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 7 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; Pixel 7 Pro Build/AP4A.250205.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/133.0.6943.121 Mobile Safari/537.36 musical_ly_2023808030 BytedanceWebview/d8a21c6",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 7 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 7 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; GP4BC) AppleWebKit/537.46 (KHTML, like Gecko) Chrome/118.0.5993.80 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GP4BC",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 7 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; GE2AE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.48 Mobile Safari/537.46",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GE2AE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 7a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel 7a Build/AP2A.240905.003; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 EdgA/124.0.2478.64",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 7a",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 8",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel 8 Build/UPB2.230407.014) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.2.7822.95 Mobile Safari/537.36 Vivaldi/5.2.9076.131",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 8",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 8",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro Build/UPB1.230309.017; Rooted) AppleWebKit/537.36 (KHTML, like Gecko) Puffin/10.9.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 8 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 8a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Google Pixel 8a) Chrome/121.0.6167 Mobile",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 8a",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 8a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; GKV4X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GKV4X",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 8a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; G8HHN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G8HHN",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 8a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; G576D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G576D",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 14; Pixel 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.119 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 9",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; G2YBB) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G2YBB",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; GUR25) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GUR25",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; GWVK6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GWVK6",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; G1B60) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "G1B60",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro Build/AD1A.240530.047; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.170 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/506.1.0.74.27;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 9 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; GR83Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GR83Y",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; GEC77) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GEC77",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9 Pro Fold",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro Fold) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 9 Pro Fold",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9 Pro Fold",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; GC15S) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GC15S",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9 Pro Fold",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; GGH2X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "GGH2X",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel 9 Pro XL",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 15; Pixel 9 Pro XL Build/AP4A.250105.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/133.0.6943.89 Mobile Safari/537.36 OPR/88.0.2254.75874",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel 9 Pro XL",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel Fold",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; Pixel Fold Build/AP4A.250105.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/132.0.6834.97 Safari/537.36 [FB_IAB/FB4A;FBAV/497.0.0.40.36;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel Fold",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Pixel Tablet Build/AP2A.240905.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.107 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel Tablet",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel Watch",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 13; Google Pixel Watch Build/TWD4.231005.002)",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel Watch",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel Watch 2",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 13; Google Pixel Watch 2 Build/TWD9.240605.001.A1)",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel Watch 2",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel XL",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1; Pixel XL Build/NDE63X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel XL",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixel XL",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Pixel XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixel XL",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixelbook",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Google Pixelbook) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixelbook",
|
||||
"type": "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Google Pixelbook Go",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Google Pixelbook Go) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OPR/62.3.3146.57763",
|
||||
"expect": {
|
||||
"vendor": "Google",
|
||||
"model": "Pixelbook Go",
|
||||
"type": "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"desc": "HMD Barbie Phone",
|
||||
"ua": "Mozilla/5.0 (Mobile; HMD Barbie Phone; rv:84.0) Gecko/84.0 Firefox/84.0 KAIOS/3.1",
|
||||
"expect": {
|
||||
"vendor": "HMD",
|
||||
"model": "Barbie Phone",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "HMD Fusion",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; HMD Fusion) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "HMD",
|
||||
"model": "Fusion",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "HMD Pulse",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; HMD Pulse) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36",
|
||||
@@ -25,5 +43,23 @@
|
||||
"model": "Pulse Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "HMD Skyline",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 14; HMD Skyline) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.1804 YaApp_Android/24.120.1 YaSearchBrowser/24.120.1 BroPP/1.0 SA/3 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "HMD",
|
||||
"model": "Skyline",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "HMD Vibe",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; N159V Build/UKQ1.231025.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/135.0.7049.111 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/497.0.0.47.36;]",
|
||||
"expect": {
|
||||
"vendor": "HMD",
|
||||
"model": "N159V",
|
||||
"type": "mobile"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"desc": "Infinix Hot 4",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 7.0; en-us; Infinix HOT 4 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36 PHX/17.9",
|
||||
"expect": {
|
||||
"vendor": "Infinix",
|
||||
"model": "HOT 4",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Infinix Hot 4 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; Infinix_X556_LTE Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/390.0.0.27.105;]",
|
||||
"expect": {
|
||||
"vendor": "Infinix",
|
||||
"model": "X556_LTE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Infinix Hot 7 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Infinix X625C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
@@ -26,6 +44,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Infinix Note 3",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; Infinix_X601_LTE Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.111 Mobile Safari/537.36 GSA/11.5.9.21.arm64",
|
||||
"expect": {
|
||||
"vendor": "Infinix",
|
||||
"model": "X601_LTE",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Infinix Smart 5",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Infinix X657C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36",
|
||||
|
||||
110
test/data/ua/device/lava.json
Normal file
110
test/data/ua/device/lava.json
Normal file
@@ -0,0 +1,110 @@
|
||||
[
|
||||
{
|
||||
"desc": "Lava Agni 2 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; LAVA LXX504 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/133.0.6943.46 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/499.0.0.31.60;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LXX504",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Agni 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; LAVA LXX501 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.119 Mobile Safari/537.36[FBAN/EMA;FBLC/hi_IN;FBAV/396.0.0.9.115;]",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LXX501",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Blaze",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 12; en-US; LAVA Blaze Build/SP1A.210812.016) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 UCBrowser/13.4.0.1306 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "Blaze",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Blaze 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; LAVA LZX409 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/132.0.6834.97 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/497.0.0.47.36;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LZX409",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Blaze 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; LAVA LXX503) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/23.0 Chrome/115.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LXX503",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Blaze Curve",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; LAVA LXX505 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.105 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/505.0.0.57.45;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LXX505",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Blaze Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; LAVA LZX404 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.50 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/503.0.0.69.76;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LZX404",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Iris 46",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; LAVA LH9950) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/21.0 Chrome/110.0.5481.154 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LH9950",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Iris 54",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 9; LAVA LH9931 Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.116 Mobile Safari/537.36 OPR/39.1.2254.136708",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LH9931",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava Storm 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; LAVA LXX508 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LXX508",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava V7 Prime",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; LAVA LE9940) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LE9940",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Lava V7s Prime",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 9; LAVA LE9940_W Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.116 Mobile Safari/537.36 OPR/43.2.2254.140294",
|
||||
"expect": {
|
||||
"vendor": "LAVA",
|
||||
"model": "LE9940_W",
|
||||
"type": "mobile"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -134,6 +134,33 @@
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "LG Smart TV",
|
||||
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.41 (KHTML, like Gecko) Large Screen Safari/537.41 LG Browser/7.00.00(LGE; 42LB670V-ZA; 05.05.90; 1); webOS.TV-2014; LG NetCast.TV-2013 Compatible (LGE, 42LB670V-ZA, wireless)",
|
||||
"expect": {
|
||||
"vendor": "LG",
|
||||
"model": "42LB670V-ZA",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "LG Smart TV",
|
||||
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chr0me/53.0.2785.34 Safari/537.36 LG Browser/8.00.00(LGE; 32LM627BPSB; 05.40.45; 1; DTV_W19R); webOS.TV-2019; LG NetCast.TV-2013 Compatible (LGE, 32LM627BPSB, wireless)",
|
||||
"expect": {
|
||||
"vendor": "LG",
|
||||
"model": "32LM627BPSB",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "LG Smart TV",
|
||||
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 HbbTV/1.3.1 ( DRM; LGE; OLED55B7V_Z; WEBOS3.5 06.10.60; W3_M16P; ) FVC/2.0 (LGE; WEBOS3.5 ;)",
|
||||
"expect": {
|
||||
"vendor": "LG",
|
||||
"model": "OLED55B7V_Z",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "LG Android TV",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; LG Android TV Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
||||
|
||||
@@ -1,28 +1,10 @@
|
||||
[
|
||||
{
|
||||
"desc": "Motorola Moto X",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; XT1097 Build/KXE21.187-38) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36",
|
||||
"desc": "Motorola Defy XT",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; XT555C Build/V1.67D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT1097",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto Z3 Play",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Moto Z3 Play) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "Moto Z3 Play",
|
||||
"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",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "Nexus 6",
|
||||
"model": "XT555C",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
@@ -35,6 +17,42 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Edge 30 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; XT2201-1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT2201-1",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Edge 30 Ultra",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; motorola edge 30 ultra Build/U1SQS34.52-21-1-13; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.107 M",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "edge 30 ultra",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Edge 40",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; motorola edge 40 Build/U1TL34.115-16-1-7; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.104 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "edge 40",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Edge X30",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; XT2201-2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.59 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT2201-2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola RAZR 2019",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; motorola razr) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/11.1 Chrome/75.0.3770.143 Mobile Safari/537.36",
|
||||
@@ -45,11 +63,65 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Moto X",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2; xx-xx; XT1058 Build/13.9.0Q2.X-70-GHOST-ATT_LE-2) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"desc": "Motorola Moto 360",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4; Moto 360 Build/KNX01S) AppleWebKit/537.36 (KHTML, like Gecko) WIB/0.9.8 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT1058",
|
||||
"model": "Moto 360",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto E",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; Moto E (4) Build/NDQS26.69-64-11-7; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "Moto E (4)",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto E6s",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; MOTOROLA E6S) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "E6S",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto E7 Plus",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; moto e(7) plus Build/QPZS30.30-Q3-38-69-12; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.14 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "moto e(7) plus",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto E7 Plus",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; XT2081-1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5790.171 Mobile Safari/537.36 OPR/102.0.4864.0",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT2081-1",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto G 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; moto g 5G - 2023 Build/U1TPNS34.26-48-2-7; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 EdgA/124.0.2478.64",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "moto g 5G - 2023",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto G 5G (2022)",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; moto g 5G (2022) Build/S1SAS32.47-77-9; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 [FB_IAB/Orca-Android;FBAV/402.0.0.11.101;]",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "moto g 5G (2022)",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
@@ -72,21 +144,156 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto E",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; Moto E (4) Build/NDQS26.69-64-11-7; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36",
|
||||
"desc": "Motorola Moto G10",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; XT2127-2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "Moto E (4)",
|
||||
"model": "XT2127-2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto 360",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4; Moto 360 Build/KNX01S) AppleWebKit/537.36 (KHTML, like Gecko) WIB/0.9.8 Mobile Safari/537.36",
|
||||
"desc": "Motorola Moto G24 Power",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 14; moto g24 power Build/UTAS34.82-97-1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/133.0.6943.138 Mobile Safari/537.36 OPR/89.0.2254.76420",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "Moto 360",
|
||||
"type": "wearable"
|
||||
"model": "moto g24 power",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto G30",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; XT2129-3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT2129-3",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto G54 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; moto g54 5G Build/U1TDS34.94-12-9-10-2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.6834.122 Mobile Safari/537.36 OPX/2",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "moto g54 5G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto X",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; XT1097 Build/KXE21.187-38) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT1097",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto X",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2; xx-xx; XT1058 Build/13.9.0Q2.X-70-GHOST-ATT_LE-2) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT1058",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto X Force",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 7.0; XT1580 Build/NPKS25.200-12-9; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/65.0.3325.109 Mobile Safari/537.36 OPR/32.0.2254.123747",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT1580",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto S30",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; XT2243-2 Build/T1SJC33.51-19-7; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 T7/13.30 SP-engine/2.53.0 matrixstyle/0 lite baiduboxapp/6.2.0.10 (Baidu; P1 13) NABar/1.0",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT2243-2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto X30 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 13; zh-CN; XT2241-1 Build/T1SQ33.111-12-19) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.58 UCBrowser/16.1.3.1264 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT2241-1",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto Z3 Play",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; Moto Z3 Play) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "Moto Z3 Play",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Moto Z4",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 10; moto z4 Build/QDF30.130-42-5-17; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.128 Mobile Safari/537.36 OPR/2.3.0",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "moto z4",
|
||||
"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",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "Nexus 6",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola One 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; motorola one 5G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "one 5G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola P30",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; XT1943-1 Build/OPM1.171019.019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 T7/13.50 SP-engine/2.88.0 baiduboxapp/13.50.5.10 (Baidu; P1 8.1.0) NABar/1.0",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT1943-1",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Razr 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; motorola razr 5G Build/S2PS32.57-23-21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/132.0.6834.97 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/497.0.0.47.36;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "razr 5G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Razr 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; XT2071-4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "XT2071-4",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Motorola Razr 50 Ultra",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; motorola razr 50 ultra Build/U3UX34.56-29-2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.260 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Motorola",
|
||||
"model": "razr 50 ultra",
|
||||
"type": "mobile"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -17,6 +17,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia 5800 XpressMusic",
|
||||
"ua": "Mozilla/5.0 (SymbianOS/9.4; U; Series60/5.0 Nokia5800d-1/10.4.016; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413",
|
||||
"expect": {
|
||||
"vendor": "Nokia",
|
||||
"model": "5800d-1",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia 7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; Nokia 7.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36",
|
||||
@@ -26,6 +35,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia 808 PureView",
|
||||
"ua": "Mozilla/5.0 (Symbian; U; Nokia808 PureView; en-GB) AppleWebKit/534.3 (KHTML, like Gecko) Version/3.0 Mobile/1A543a Mobile Safari/534.3",
|
||||
"expect": {
|
||||
"vendor": "Nokia",
|
||||
"model": "808 PureView",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia 808 PureView",
|
||||
"ua": "Mozilla/5.0 (Symbian/3; Series60/5.5 Nokia808PureView/113.010.1508; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/535.1 (KHTML, like Gecko) NokiaBrowser/8.3.2.21 Mobile Safari/535.1 3gpp-gba",
|
||||
"expect": {
|
||||
"vendor": "Nokia",
|
||||
"model": "808PureView",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia Lumia 630",
|
||||
"ua": "UCWEB/2.0 (Windows; U; wds 8.10; en-IN; NOKIA; RM-978_1046) U2/1.0.0 UCBrowser/4.2.0.524 U2/1.0.0 Mobile",
|
||||
"expect": {
|
||||
"vendor": "Nokia",
|
||||
"model": "RM-978",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia N9",
|
||||
"ua": "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",
|
||||
@@ -35,6 +71,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia N900",
|
||||
"ua": "Mozilla/5.0 (Linux; Maemo 5.0; Nokia N900; Build/4.0.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nokia",
|
||||
"model": "N900",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nokia T20",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; Nokia T20) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
|
||||
|
||||
@@ -17,6 +17,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; AIN065 Build/AQ3A.240929.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/132.0.6834.90 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/496.0.0.45.65;IABMV/1;] FBNV/500",
|
||||
"expect": {
|
||||
"vendor": "Nothing",
|
||||
"model": "AIN065",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 2a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; A142 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.71 Mobile Safari/537.36",
|
||||
@@ -25,5 +34,32 @@
|
||||
"model": "A142",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 2a Plus",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; A142P Build/UP1A.231005.007) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.107 Mobile Safari/537.36 OPX/2.6",
|
||||
"expect": {
|
||||
"vendor": "Nothing",
|
||||
"model": "A142P",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 3a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; A059 Build/AQ3A.241015.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nothing",
|
||||
"model": "A059",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 3a Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; A059P Build/AQ3A.241015.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.57 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/511.0.0.73.36;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "Nothing",
|
||||
"model": "A059P",
|
||||
"type": "mobile"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"desc": "Tegra Note 7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; TegraNote-P1640 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nvidia",
|
||||
"model": "TegraNote-P1640",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nvidia Shield",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; SHIELD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nvidia",
|
||||
"model": "SHIELD",
|
||||
"type": "console"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nvidia Shield Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; SHIELD Tablet Build/LVY48E; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/45.0.2454.19 Safari/537.36",
|
||||
@@ -7,5 +25,23 @@
|
||||
"model": "SHIELD Tablet",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nvidia Shield Tablet K1",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; SHIELD Tablet K1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.98 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nvidia",
|
||||
"model": "SHIELD Tablet K1",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nvidia Shield TV",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; SHIELD Android TV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36 ",
|
||||
"expect": {
|
||||
"vendor": "Nvidia",
|
||||
"model": "SHIELD Android TV",
|
||||
"type": "smarttv"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -54,11 +54,20 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 8T",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; KB2005) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36",
|
||||
"desc": "OnePlus 7T Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; HD1913) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.5563.57 Mobile Safari/537.36 EdgA/110.0.1587.66",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "KB2005",
|
||||
"model": "HD1913",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 8 Lite",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; OnePlus 8 Lite) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4741.47 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "8 Lite",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
@@ -72,11 +81,191 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Nord N100",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; BE2015 Build/QKQ1.200719.002; xx-xx) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36",
|
||||
"desc": "OnePlus 8T",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; KB2005) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "BE2015",
|
||||
"model": "KB2005",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 9",
|
||||
"ua": "Mozilla/5.0 (Android 14; SDK 28; OnePlus 9) Gecko/128.0 Firefox/128.0",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "9",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 9",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; LE2113 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.162 Mobile Safari/537.36 Flipboard/4.3.14/5377,4.3.14.5377",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "LE2113",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 9 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; LE2123) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.128 Mobile Safari/537.36 OPR/73.0.3832.69371",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "LE2123",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 9R",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 11; LE2100) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 YaApp_Android/21.114.1 YaSearchBrowser/21.114.1 BroPP/1.0 SA/3 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "LE2100",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 9RT 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 11; en-in; MT2111 Build/RKQ1.210614.002) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 GSA/13.14.15.23.arm64",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "MT2111",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 10 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 12; NE2213) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.148 YaBrowser/22.7.5.90.00 SA/3 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "NE2213",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 10RT",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; CPH2413) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "CPH2413",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 11R",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; CPH2487) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "CPH2487",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus 13",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 15; CPH2653 Build/AP3A.240617.008; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.92 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/504.0.0.69.64;IABMV/1;] FBNV/5",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "CPH2653",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 15; zh-cn; PGKM10 Build/AP3A.240617.008) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.168 Mobile Safari/537.36 HeyTapBrowser/40.9.6.2",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PGKM10",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace 2",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 14; zh-CN; PHK110 Build/UKQ1.231108.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.58 UCBrowser/17.3.6.1367 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PHK110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace 2 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; arm; Android 13; PJA110) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 YaBrowser/23.1.0.284.00 (beta) SA/3 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PJA110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace 2V",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 15; zh-cn; PHP110 Build/AP3A.240617.008) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/121.0.6167.71 MQQBrowser/16.3 Mobile Safari/537.36 COVC/047707",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PHP110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace 3",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 15; zh-CN; PJE110 Build/TP1A.220905.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/123.0.6312.80 Quark/7.9.7.782 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PJE110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace 3 Pro 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 15; zh-CN; PJX110 Build/UKQ1.231108.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/123.0.6312.80 Quark/7.11.4.814 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PJX110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace 3V",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 14; zh-cn; PJF110 Build/UP1A.231005.007) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/90.0.4430.61 Mobile Safari/537.36 HeyTapBrowser/40.8.33.1.2beta",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PJF110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace 5",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 15; zh-cn; PKG110 Build/UKQ1.231108.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.168 Mobile Safari/537.36 HeyTapBrowser/40.9.9.2",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PKG110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 14; zh-CN; PGP110 Build/UKQ1.230924.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.58 UCBrowser/17.2.9.1360 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PGP110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Ace Racing Edition",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 13; zh-CN; PGZ110 Build/TP1A.220905.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.58 UCBrowser/17.3.6.1367 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "PGZ110",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Nord CE 4",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; CPH2613) AppleWebKit/537.36 (KHTML, like Gecko) JioSphere/5.0.4 Chrome/119.0.6045.193 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "CPH2613",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
@@ -89,6 +278,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Nord N30 SE 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; CPH2605 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/135.0.7049.92 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/509.0.0.67.28;IABMV/1;]",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "CPH2605",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Nord N100",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; BE2015 Build/QKQ1.200719.002; xx-xx) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "BE2015",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Open",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 15; CPH2551 Build/AP3A.240617.008)",
|
||||
"expect": {
|
||||
"vendor": "OnePlus",
|
||||
"model": "CPH2551",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OnePlus Pad Go 11.35",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 14; OPD2304) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.629 YaApp_Android/24.101/apad YaSearchBrowser/24.101/apad BroPP/1.0 SA/3 Mobile Safari/537.36",
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
[
|
||||
{
|
||||
"desc": "OnePlus 10RT",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; CPH2413) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OPPO",
|
||||
"model": "CPH2413",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OPPO Pad",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 13; zh-CN; OPD2101 Build/TP1A.220905.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.58 UCBrowser/16.3.9.1290 Mobile Safari/537.36",
|
||||
|
||||
83
test/data/ua/device/philips.json
Normal file
83
test/data/ua/device/philips.json
Normal file
@@ -0,0 +1,83 @@
|
||||
[
|
||||
{
|
||||
"desc": "Philips S616",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; Philips S616 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "S616",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips W8510",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Philips W8510 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.68 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "W8510",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips SmartTV",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; PHILIPS 4k TV Build/RTXC.231010.082.A1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.71 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "PHILIPS",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips SmartTV",
|
||||
"ua": "Opera/9.80 HbbTV/1.1.1 (; Philips; ; ; ; ) NETTV/4.0.2; en) Version/11.60",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips 32PFL6606K/02 SmartTV (2011)",
|
||||
"ua": "Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips 32PFL6606K/02 SmartTV (2013)",
|
||||
"ua": "Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips 32PHS5301/12 SmartTV (2016)",
|
||||
"ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36 OPR/29.0.1803.0 OMI/4.5.23.37.MOT2.13 HbbTV/1.2.1 (;Philips;32PHS5301/12;;_TV_MT5800;) Firmware/TPM161E_012.002.045.001 en",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "32PHS5301/12",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips PH0M_EA_T32",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Philips FHD Android TV Build/QTG3.201102.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.186 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Philips PH3M_AL_T32",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; Philips Google TV TA7 Build/RTM5.220609.199; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.58 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Philips",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -25,5 +25,23 @@
|
||||
"model": "Neo3 Link",
|
||||
"type": "xr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Pico Neo 3",
|
||||
"ua": "Mozilla/5.0 (X11; Linux x86_64; Pico Neo 3 OS5.12.2 like Quest) AppleWebKit/537.36 (KHTML, like Gecko) PicoBrowser/3.3.48 Chrome/105.0.5195.68 VR Safari/537.36 OculusBrowser/7.0",
|
||||
"expect": {
|
||||
"vendor": "Pico",
|
||||
"model": "Neo 3",
|
||||
"type": "xr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Pico Neo 3 Pro",
|
||||
"ua": "Mozilla/5.0 (X11; Linux x86_64; Pico Neo 3 Pro OS5.9.9.0 like Quest) AppleWebKit/537.36 (KHTML, like Gecko) PicoBrowser/3.3.46 Chrome/105.0.5195.68 VR Safari/537.36 OculusBrowser/7.0",
|
||||
"expect": {
|
||||
"vendor": "Pico",
|
||||
"model": "Neo 3 Pro",
|
||||
"type": "xr"
|
||||
}
|
||||
}
|
||||
]
|
||||
11
test/data/ua/device/retroid.json
Normal file
11
test/data/ua/device/retroid.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"desc": "Retroid Pocket 4 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 13; Retroid Pocket 4 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.96 YaBrowser/24.4.3.96.00 SA/3 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Retroid",
|
||||
"model": "Pocket 4 Pro",
|
||||
"type": "console"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -296,6 +296,15 @@
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung SmartTV",
|
||||
"ua": "Mozilla/5.0 (SMART-TV; Linux; Tizen 8.0) AppleWebKit/537.36 (KHTML, like Gecko) Samsung Browser/7.0 Chrome/108.0.5359.1 TV Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Samsung",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung SmartTV HBBTV",
|
||||
"ua": "HbbTV/1.5.1 (+DRM;Samsung;SmartTV2021:UAU7000;T-KSU2EDEUC-1506.0;KantSU2e;urn:samsungtv:familyname:21_KANTSU2E_UHD_BASIC:2021;) Tizen/6.0 (+TVPLUS+SmartHubLink) Chrome/76 LaTivu_1.0.1_2021 RVID/17",
|
||||
|
||||
@@ -98,6 +98,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony Xperia 1 VI",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; XQ-EC44) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Sony",
|
||||
"model": "XQ-EC44",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony Xperia 10ii",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; XQ-AU52) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36",
|
||||
@@ -107,6 +116,24 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony Xperia 10 III Lite",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; XQ-BT44 Build/62.1.A.1.227; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Mobile Safari/537.36 Sleipnir/3.6.0",
|
||||
"expect": {
|
||||
"vendor": "Sony",
|
||||
"model": "XQ-BT44",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony Xperia 10 VI",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; XQ-ES72 Build/70.0.A.2.233; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.71 Mobile Safari/537.36 Line/14.16.0/IAB",
|
||||
"expect": {
|
||||
"vendor": "Sony",
|
||||
"model": "XQ-ES72",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony Xperia Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; XQ-AQ52) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.185 Mobile Safari/537.36",
|
||||
@@ -116,6 +143,24 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony Xperia Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; Sony XQ-AQ52) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/23.0 Chrome/115.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Sony",
|
||||
"model": "XQ-AQ52",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony Xperia Pro I",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 11; XQ-BE72) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.148 YaBrowser/22.7.3.82.00 SA/3 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Sony",
|
||||
"model": "XQ-BE72",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Sony SGP521 (Xperia Z2 Tablet)",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4; SGP521 Build/17.1.A.0.432) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36",
|
||||
|
||||
@@ -296,6 +296,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL 4056S",
|
||||
"ua": "Mozilla/5.0 (Mobile; TCL 4056S; rv:84.0) Gecko/84.0 Firefox/84.0 KAIOS/3.0",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "4056S",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL A3",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; A509DL Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Mobile Safari/537.36 GSA/13.18.7.23.arm64",
|
||||
|
||||
@@ -1,4 +1,31 @@
|
||||
[
|
||||
{
|
||||
"desc": "Tecno DroiPad 8D",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 5.1; TECNO DP8D Build/LMY47D; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Safari/537.36 OPR/42.0.2254.139280",
|
||||
"expect": {
|
||||
"vendor": "TECNO",
|
||||
"model": "DP8D",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Tecno DroiPad 10A Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; TECNO DP10A Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TECNO",
|
||||
"model": "DP10A Pro",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Tecno DroiPad 10D 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; TECNO P904) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Mobile Safari/537.36 OPR/77.0.4054.90",
|
||||
"expect": {
|
||||
"vendor": "TECNO",
|
||||
"model": "P904",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Tecno KC8",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; TECNO KC8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
|
||||
20
test/data/ua/device/vizio.json
Normal file
20
test/data/ua/device/vizio.json
Normal file
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"desc": "VIZIO",
|
||||
"ua": "Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36 CrKey/1.0.999999 VIZIO SmartCast(Conjure/SX7B-4.6.419.12 FW/7.0.23.2-4 Model/M557-G0)",
|
||||
"expect": {
|
||||
"vendor": "VIZIO",
|
||||
"model": "M557-G0",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "VIZIO",
|
||||
"ua": "VIZIO V506-J09 ViziOS/1.4.512.847.1 WatchFree/24.06.13.2 FancyPlayer/1.1.30-qa ",
|
||||
"expect": {
|
||||
"vendor": "VIZIO",
|
||||
"model": "V506-J09",
|
||||
"type": "smarttv"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -62,6 +62,15 @@
|
||||
"version" : "4.5.4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "LibWeb",
|
||||
"ua" : "Mozilla/5.0 (Linux; x86_64) Ladybird/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "LibWeb",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "LibWeb",
|
||||
"ua" : "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,16 @@
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Apple Mail",
|
||||
"ua" : "Mail/3826.500.181.1.5 CFNetwork/3826.500.111.1.1 Darwin/24.4.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mail",
|
||||
"version" : "3826.500.181.1.5",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "BlueMail",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) BlueMail/0.10.31 Chrome/61.0.3163.100 Electron/2.0.18 Safari/537.36",
|
||||
@@ -29,6 +39,16 @@
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "DaumMail",
|
||||
"ua" : "DaumMobileApp (LG-KU5400; U; Android 2.3.7|10; ko-kr) DaumMail/1.0.8 ",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "DaumMail",
|
||||
"version" : "1.0.8",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Evolution",
|
||||
"ua" : "Evolution/3.52.3",
|
||||
@@ -119,6 +139,36 @@
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Polymail",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Polymail/2.3.12 Chrome/114.0.5735.134 Electron/25.2.0 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Polymail",
|
||||
"version" : "2.3.12",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ProtonMail",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) ProtonMail/1.4.0 Chrome/122.0.6261.156 Electron/29.4.6 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ProtonMail",
|
||||
"version" : "1.4.0",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "SparkDesktop",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) SparkDesktop/3.0.30 Chrome/102.0.5005.63 Electron/19.0.4 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "SparkDesktop",
|
||||
"version" : "3.0.30",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Sparrow",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Sparrow/1043.1",
|
||||
@@ -158,5 +208,25 @@
|
||||
"version" : "1.3.10",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Zimbra",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 6.2; it; rv:1.9.2.19pre) Gecko/20110902 Prism zdesktop/7.2.8",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Zimbra",
|
||||
"version" : "7.2.8",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ZohoMail",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) ZohoMail-Desktop/1.6.3 Chrome/124.0.6367.207 Electron/30.0.6 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ZohoMail-Desktop",
|
||||
"version" : "1.6.3",
|
||||
"type" : "email"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -9,6 +9,26 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Asana",
|
||||
"ua" : "Asana/1.4.0 WebsiteMetadataRetriever",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Asana",
|
||||
"version" : "1.4.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Better Uptime Bot",
|
||||
"ua" : "Better Uptime Bot Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Better Uptime Bot",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "BingPreview",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b",
|
||||
@@ -19,6 +39,46 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Bit.ly",
|
||||
"ua" : "bitlybot/3.0 (+http://bit.ly/)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "bitlybot",
|
||||
"version" : "3.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Blueno",
|
||||
"ua" : "acebookexternalhit/1.1 (compatible; Blueno/1.0; +http://naver.me/scrap)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Blueno",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Bluesky",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Bluesky Cardyb/1.1; +mailto:support@bsky.app) Chrome/100.0.0.0 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Bluesky",
|
||||
"version" : "1.1",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "BufferLinkPreviewBot",
|
||||
"ua" : "BufferLinkPreviewBot/1.0 (+https://scraper.buffer.com/about/bots/link-preview-bot)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "BufferLinkPreviewBot",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ChatGPT-User",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot",
|
||||
@@ -29,6 +89,36 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Chrome-Lighthouse",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4590.2 Mobile Safari/537.36 Chrome-Lighthouse",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Chrome-Lighthouse",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Claude-User",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Claude-User/1.0; +Claude-User@anthropic.com)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Claude-User",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Cohere-AI",
|
||||
"ua" : "Mozilla/5.0 (compatible; Cohere-AI/1.0; +https://cohere.com/)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Cohere-AI",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "DuckAssistBot",
|
||||
"ua" : "DuckAssistBot/1.2; (+http://duckduckgo.com/duckassistbot.html)",
|
||||
@@ -39,6 +129,16 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Gemini-Deep-Research",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Gemini-Deep-Research; +https://gemini.google/overview/deep-research/) Chrome/135.0.0.0 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Gemini-Deep-Research",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google FeedFetcher",
|
||||
"ua" : "FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)",
|
||||
@@ -49,6 +149,16 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Image Proxy",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "GoogleImageProxy",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Read Aloud - Mobile agent",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36 (compatible; Google-Read-Aloud; +https://support.google.com/webmasters/answer/1061943)",
|
||||
@@ -69,6 +179,16 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Page Renderer",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Google-PageRenderer Google (+https://developers.google.com/+/web/snippet/) ",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Google-PageRenderer",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Publisher Center",
|
||||
"ua" : "GoogleProducer; (+https://developers.google.com/search/docs/crawling-indexing/google-producer)",
|
||||
@@ -89,6 +209,36 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HubSpot Page Fetcher",
|
||||
"ua" : "HubSpot Page Fetcher/1.0 http://www.hubspot.com/ web-crawlers@hubspot.com",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HubSpot Page Fetcher",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Iframely",
|
||||
"ua" : "Iframely/1.3.1 (+https://iframely.com/docs/about)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Iframely",
|
||||
"version" : "1.3.1",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "kakaotalk-scrap",
|
||||
"ua" : "facebookexternalhit/1.1; kakaotalk-scrap/1.0; +https://devtalk.kakao.com/t/scrap/33984",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "kakaotalk-scrap",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Meta-ExternalFetcher",
|
||||
"ua" : "meta-externalfetcher/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)",
|
||||
@@ -99,6 +249,46 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "MicrosoftPreview",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; MicrosoftPreview/2.0; +https://aka.ms/MicrosoftPreview) Chrome/W.X.Y.Z Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "MicrosoftPreview",
|
||||
"version" : "2.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "MistralAI-User",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; MistralAI-User/1.0; +https://docs.mistral.ai/robots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "MistralAI-User",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Perplexity-User",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Perplexity-User/1.0; +https://perplexity.ai/perplexity-user)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Perplexity-User",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Pinterestbot",
|
||||
"ua" : "Mozilla/5.0 (compatible; Pinterestbot/1.0; +http://www.pinterest.com/bot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Pinterestbot",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rogerbot",
|
||||
"ua" : "Mozilla/5.0 (compatible; rogerBot/1.0; UrlCrawler; http://www.seomoz.org/dp/rogerbot)",
|
||||
@@ -109,6 +299,46 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "SiteAuditBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; SiteAuditBot/0.97; +http://www.semrush.com/bot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "SiteAuditBot",
|
||||
"version" : "0.97",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Snap URL Preview",
|
||||
"ua" : "Snap URL Preview Service; bot; snapchat; https://developers.snap.com/robots ",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Snap URL Preview",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "SkypeUriPreview",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) SkypeUriPreview Preview/0.5 skype-url-preview@microsoft.com",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "SkypeUriPreview",
|
||||
"version" : "0.5",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "TelegramBot",
|
||||
"ua" : "TelegramBot (like TwitterBot)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "TelegramBot",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "UptimeRobot",
|
||||
"ua" : "Mozilla/5.0 (compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)",
|
||||
@@ -119,6 +349,26 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "vercel-favicon-bot",
|
||||
"ua" : "vercel-favicon-bot",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "vercel-favicon-bot",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "vercel-screenshot-bot",
|
||||
"ua" : "vercel-screenshot-bot",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "vercel-screenshot-bot",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Vercelbot",
|
||||
"ua" : "Vercelbot (+https://vercel.com)",
|
||||
@@ -128,5 +378,135 @@
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "vercelflags",
|
||||
"ua" : "vercelflags",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "vercelflags",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "verceltracing",
|
||||
"ua" : "verceltracing",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "verceltracing",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WhatsApp",
|
||||
"ua" : "WhatsApp/2.23.20.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "WhatsApp",
|
||||
"version" : "2.23.20.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YaDirectFetcher",
|
||||
"ua" : "Mozilla/5.0 (compatible; YaDirectFetcher/1.0; Dyatel; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YaDirectFetcher",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexCalendar",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexCalendar/1.0; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexCalendar",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexDirect",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexDirect/3.0; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexDirect",
|
||||
"version" : "3.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexDirectDyn",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexDirectDyn/1.0; +http://yandex.com/bots",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexDirectDyn",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexForDomain",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexForDomain/1.0; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexForDomain",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexPagechecker",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexPagechecker/1.0; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexPagechecker",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexSearchShop",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexSearchShop/1.0; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexSearchShop",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexSitelinks",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexSitelinks; Dyatel; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexSitelinks",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YandexUserproxy",
|
||||
"ua" : "Mozilla/5.0 (compatible; YandexUserproxy; robot; +http://yandex.com/bots)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YandexUserproxy",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Zoombot",
|
||||
"ua" : "Mozilla/5.0 (compatible; Zoombot/1.0; +https://zoom.us; crawler@domain.com)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Zoombot",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
}
|
||||
]
|
||||
202
test/data/ua/extension/inapp.json
Normal file
202
test/data/ua/extension/inapp.json
Normal file
@@ -0,0 +1,202 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Discord on Linux",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) discord/0.0.26 Chrome/108.0.5359.215 Electron/22.3.2 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "discord",
|
||||
"version" : "0.0.26",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Discord on iPad",
|
||||
"ua" : "Discord/52.0 (iPad; iOS 14.4; Scale/2.00)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Discord",
|
||||
"version" : "52.0",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Evernote on Windows",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Evernote Windows/306387 (pt-PT, DDL); Windows/6.1.0 (Win32); Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Evernote",
|
||||
"version" : "undefined",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Figma on Mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_4_0) AppleWebKit/537.36 (KHTML, like Gecko) Figma/99.0.0 Chrome/89.0.4389.128 Electron/12.0.9 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Figma",
|
||||
"version" : "99.0.0",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Flipboard on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 8.0.0; SM-A720F Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Mobile Safari/537.36 Flipboard/4.1.13/4342,4.1.13.4342",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Flipboard",
|
||||
"version" : "4.1.13",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mattermost on Mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Mattermost/4.4.0 Chrome/76.0.3809.146 Electron/6.1.7 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mattermost",
|
||||
"version" : "4.4.0",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mattermost on iPad",
|
||||
"ua" : "Mattermost/1.49.1 (iPad; iOS 15.3.1; Scale/2.00)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mattermost",
|
||||
"version" : "1.49.1",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Teams on Mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_3_1) AppleWebKit/537.36 (KHTML, like Gecko) Teams/1.8.00.3758 Chrome/126.0.6478.261 Electron/31.7.7 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Teams",
|
||||
"version" : "1.8.00.3758",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Teams on iPad",
|
||||
"ua" : "Mozilla/5.0 (iPad; CPU OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 TeamsMobile-iOS",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Teams",
|
||||
"version" : "undefined",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Teams on iPhone",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 TeamsMobile-iOS",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Teams",
|
||||
"version" : "undefined",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Teams on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 8.1.0; SM-G610F Build/M1AJQ; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.101 Mobile Safari/537.36 TeamsMobile-Android",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Teams",
|
||||
"version" : "undefined",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Notion on Mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Notion/2.0.23 Chrome/91.0.4472.164 Electron/13.6.9 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Notion",
|
||||
"version" : "2.0.23",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Postman on Mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Postman/9.29.0 Chrome/94.0.4606.81 Electron/15.5.7 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Postman",
|
||||
"version" : "9.29.0",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rambox on mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Rambox/0.7.7 Chrome/78.0.3904.130 Electron/7.2.4 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Rambox",
|
||||
"version" : "0.7.7",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rocket.Chat on mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Rocket.Chat/3.8.16 Chrome/106.0.5249.199 Electron/21.3.3 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Rocket.Chat",
|
||||
"version" : "3.8.16",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Slack on mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Slack/4.39.90 Chrome/127.0.6533.72 Electron/13.1.9 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Slack",
|
||||
"version" : "4.39.90",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "TikTok Lite",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 8.0.0; SM-J400F Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36 Channel/release AppName/ultralite app_version/27.2.3 Region/ID ByteLocale/id-ID ByteFullLocale/id-ID",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "TikTok Lite",
|
||||
"version" : "27.2.3",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "VS Code on Windows",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.85.1 Chrome/114.0.5735.289 Electron/25.9.7 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "VS Code",
|
||||
"version" : "1.85.1",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Yahoo! Japan on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 13; SH-M20 Build/TKQ1.220915.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/132.0.6834.163 Mobile Safari/537.36 YJApp-ANDROID jp.co.yahoo.android.yjtop/3.187.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Yahoo! Japan",
|
||||
"version" : "3.187.0",
|
||||
"type" : "inapp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Yahoo! Japan on iOS",
|
||||
"ua" : "Mozilla/5.0 (iPad; CPU OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 YJApp-IOS jp.co.yahoo.ipn.appli/4.131.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Yahoo! Japan",
|
||||
"version" : "4.131.0",
|
||||
"type" : "inapp"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,24 @@
|
||||
[
|
||||
{
|
||||
"desc" : "AdobeAIR",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) AdobeAIR/3.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "AdobeAIR",
|
||||
"version" : "3.1",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "aiohttp",
|
||||
"ua" : "Python/3.9 aiohttp/3.8.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "aiohttp",
|
||||
"version" : "3.8.1",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Apache-HttpClient",
|
||||
"ua" : "Apache-HttpClient/4.5.14 (Java/17.0.12)",
|
||||
@@ -109,6 +129,16 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nutch",
|
||||
"ua" : "AliyunSecBot/Nutch-1.21-SNAPSHOT",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Nutch",
|
||||
"version" : "1.21-SNAPSHOT",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "OkHttp",
|
||||
"ua" : "okhttp/3.2.0",
|
||||
@@ -149,6 +179,16 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Python httpx",
|
||||
"ua" : "python-httpx/0.27.2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "python-httpx",
|
||||
"version" : "0.27.2",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Python urllib",
|
||||
"ua" : "Python-urllib/2.6",
|
||||
@@ -159,6 +199,16 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Python urllib3",
|
||||
"ua" : "python-urllib3/1.26.18",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "python-urllib3",
|
||||
"version" : "1.26.18",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Python requests",
|
||||
"ua" : "python-requests/2.32",
|
||||
|
||||
62
test/data/ua/extension/vehicle.json
Normal file
62
test/data/ua/extension/vehicle.json
Normal file
@@ -0,0 +1,62 @@
|
||||
[
|
||||
{
|
||||
"desc" : "BMW",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 9; AFTLBT962E2) AppleWebKit/537.36 (KHTML, like Gecko) Silk/118.3.1 like Chrome/118.0.5993.155 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "BMW",
|
||||
"model" : "undefined",
|
||||
"type" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "BYD",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 10; DiLink3.0 For BYD AUTO Build/QKQ1.200816.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "BYD",
|
||||
"model" : "undefined",
|
||||
"type" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Jeep",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 9; AFTLFT962X3) AppleWebKit/537.36 (KHTML, like Gecko) Silk/124.5.2 like Chrome/124.0.6367.248 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "Jeep",
|
||||
"model" : "Wagooner",
|
||||
"type" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rivian",
|
||||
"ua" : "Dalvik/2.1.0 (Linux; U; Android 10; Rivian R1T Build/QQ3A.200605.002)",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "Rivian",
|
||||
"model" : "R1T",
|
||||
"type" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Tesla",
|
||||
"ua" : "Mozilla/5.0 (X11; GNU/Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chromium/79.0.3945.130 Chrome/79.0.3945.130 Safari/537.36 Tesla/2020.36.16-3e9e4e8dd287",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "Tesla",
|
||||
"model" : "undefined",
|
||||
"type" : "embedded"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Volvo",
|
||||
"ua" : "Mozilla/5.0 (VCC; 1.0; like Gecko) NetFront/4.2",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "Volvo",
|
||||
"model" : "undefined",
|
||||
"type" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,32 @@
|
||||
"name" : "AIX",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AIX",
|
||||
"ua" : "Mozilla/5.0 (AIX; SPARC64; smart-thumbtack; Mosaic/2.7) Gecko/20100101 Mosaic/2.7",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "AIX",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AIX",
|
||||
"ua" : "Mozilla/5.0 (X11; N; Linux i686; en-US; rv:1.8.1.12) Gecko/20080219 Firefox/2.0.0.12 Mozilla/3.0 (X11; I; AIX 2) Navigator/9.0.0.6",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "AIX",
|
||||
"version" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AIX",
|
||||
"ua" : "Mozilla/5.0 (X11; U; AIX 7.2; en-US; rv:1.7.12) Gecko/20100101 Firefox/126.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "AIX",
|
||||
"version" : "7.2"
|
||||
}
|
||||
}
|
||||
]
|
||||
20
test/data/ua/os/arcaos.json
Normal file
20
test/data/ua/os/arcaos.json
Normal file
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"desc" : "ArcaOS",
|
||||
"ua" : "Mozilla/5.0 (OS/2; ArcaOS 5.0.6; x86_64; rv:89.0) Gecko/20100101 Firefox/89.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ArcaOS",
|
||||
"version" : "5.0.6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ArcaOS",
|
||||
"ua" : "Mozilla/5.0 (OS/2; ArcaOS; x64; rv:89.0) Gecko/20100101 Firefox/89.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ArcaOS",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Arch",
|
||||
"ua" : "Mozilla/5.0 (X11; Arch Linux i686; rv:2.0) Gecko/20100101 Firefox/126.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Arch",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Arch",
|
||||
"ua" : "Mozilla/5.0 ArchLinux (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Arch",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Arch",
|
||||
"ua" : "Uzbl (Webkit 1.1.10) (Arch Linux)",
|
||||
|
||||
@@ -52,5 +52,14 @@
|
||||
"name" : "Debian",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Debian",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux sparc64; es-PY; rv:5.0) Gecko/20100101 IceCat/5.0 (like Firefox/5.0; Debian-6.0.1)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Debian",
|
||||
"version" : "6.0.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,14 @@
|
||||
"name" : "Fuchsia",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Fuchsia",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Mozilla/5.0 (X11; Linux; Fuchsia; GoogleTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Large Screen Safari/537.36 GoogleTV",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Fuchsia",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,32 @@
|
||||
"name" : "Haiku",
|
||||
"version" : "R1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Haiku",
|
||||
"ua" : "Mozilla/5.0 (X11; Haiku x86_64; rv:128.0) Gecko/20100101 Firefox/128.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Haiku",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Haiku",
|
||||
"ua" : "Mozilla/5.0 (Haiku; BeOS; rv:99.0) Gecko/20100101 Firefox/99.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Haiku",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Haiku",
|
||||
"ua" : "Mozilla/5.0 (X11; Haiku BePC) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.17 Chrome/87.0.4280.144 Safari/537.36 Dooble/2023.12.25 Dooble/2023.12.25",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Haiku",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5,7 +5,52 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HarmonyOS",
|
||||
"version" : "10"
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HarmonyOS 2",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 10; STK-AL00 Build/HUAWEISTK-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.93 Mobile Safari/537.36 BDOS/1.0 (HarmonyOS 2.2.0) SP-engine/2.72.0 baiduboxapp/13.34.5.10 (Baidu; P1 10) NABar/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HarmonyOS",
|
||||
"version" : "2.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HarmonyOS 3",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 12; Huawei P60 Pro Build/HarmonyOS 3.1.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.1.6136.139 Mobile Safari/537.36 OPR/111.11",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HarmonyOS",
|
||||
"version" : "3.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HarmonyOS 4",
|
||||
"ua" : "Mozilla/5.0 (Android 12; HarmonyOS 4.0.0.118; OXF-AN00 Build/HUAWEIOXF-AN00; HMSCore 6.13.0.302; wv) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36 EdgA/125.0.0.0 Language/zh_TW ABI/arm64-v8a",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HarmonyOS",
|
||||
"version" : "4.0.0.118"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HarmonyOS 4",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 12; HarmonyOS/4.0.3.601; JAD-AL50; HMSCore/6.13.0.320 Build/AP31.240223.016.A3; x64; ARM64) AppleWebKit/537.36 (KHTML, like Gecko) HuaweiBrowser/14.0.7.302 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HarmonyOS",
|
||||
"version" : "4.0.3.601"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HarmonyOS 5",
|
||||
"ua" : "Mozilla/5.0 (PC; OpenHarmony 5.0; HarmonyOS 5.0) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/114.0.0.0 Safari/537.36 ArkWeb/4.1.6.1 Browser/harmony360Browser/1.0.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HarmonyOS",
|
||||
"version" : "5.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -52,5 +52,14 @@
|
||||
"name" : "iOS",
|
||||
"version" : "7.0.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Apple HomePod",
|
||||
"ua": "AppleCoreMedia/1.0.0.15D61 (HomePod; U; CPU OS 11_2_5 like Mac OS X; en_us)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "iOS",
|
||||
"version" : "11.2.5"
|
||||
}
|
||||
}
|
||||
]
|
||||
11
test/data/ua/os/knoppix.json
Normal file
11
test/data/ua/os/knoppix.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Knoppix",
|
||||
"ua" : "Mozilla/5.0 (Knoppix; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Knoppix",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,14 @@
|
||||
"name" : "Kubuntu",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Kubuntu",
|
||||
"ua" : "Mozilla/5.0 (Kubuntu; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Kubuntu",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5,7 +5,16 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Linux",
|
||||
"version" : "x86_64"
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Linux",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Linux",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,23 @@
|
||||
"name" : "Maemo",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nokia N900 Linux mobile, on the Maemo browser",
|
||||
"ua" : "Mozilla/5.0(X11; U; Linux armv7l; fr-FR; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Maemo",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nokia N900 Linux mobile, on the Maemo browser",
|
||||
"ua" : "Mozilla/5.0 (Linux; Maemo 5.0; Nokia N900; Build/4.0.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Maemo",
|
||||
"version" : "5.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -25,5 +25,104 @@
|
||||
"name" : "Mint",
|
||||
"version" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Linux Mint/6 (Felicia) Firefox/3.0.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Opera/9.80 (X11; Linux i686; Edition Linux Mint) Presto/2.12.388 Version/12.15",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Opera/9.51 (X11; Linux i686; U; Linux Mint; en)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux Mint/19.3 x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Brave Chrome/83.0.4103.97 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "19.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux Mint/20 x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Kiwi Chrome/100.0.0.0 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "20"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux Mint/20.2; x86_64) Gecko/20100101 Firefox/92.0.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "20.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.0.10) Gecko/2009042513 Linux Mint/5 (Elyssa) Firefox/3.0.10",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Linux Mint/7 (Gloria) Firefox/54.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20091020 Linux Mint/8 (Helena) Firefox/3.5.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:2.0) Gecko/20100101 Linux Mint 16/Petra Firefox/25.0.1.",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "16"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mint",
|
||||
"ua" : "Mozilla/5.0 (Linux x86_64; Mint 21.3) AppleWebKit/537.36 (KHTML, like Gecko) Brave/128.0.0.0 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mint",
|
||||
"version" : "21.3"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,32 @@
|
||||
"name" : "MorphOS",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "MorphOS",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; PowerPC MorphOS 3.7; Odyssey Web Browser; rv:1.23) AppleWebKit/538.1 (KHTML, like Gecko) OWB/1.23 Safari/538.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "MorphOS",
|
||||
"version" : "3.7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "MorphOS",
|
||||
"ua" : "Mozilla/5.0 (X11; MorphOS ppc64; rv:88.0) Gecko/20100101 Firefox/88.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "MorphOS",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "MorphOS",
|
||||
"ua" : "Mozilla/5.0 (compatible; Origyn Web Browser; MorphOS; PPC; U) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "MorphOS",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,23 @@
|
||||
"name" : "OS/2",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "OS/2",
|
||||
"ua" : "Mozilla/5.0 (OS/2; OS/2 i386) AppleWebKit/538.36 (KHTML, like Gecko) QtWebEngine/5.15.2 Chrome/127.0.6533.72",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "OS/2",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "OS/2",
|
||||
"ua" : "Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101 Firefox/45.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "OS/2",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5,7 +5,7 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "QNX",
|
||||
"version" : "x86pc"
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5,7 +5,16 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Solaris",
|
||||
"version" : "sun4u"
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Solaris",
|
||||
"ua" : "Mozilla/5.0 (Solaris; SPARC; w3m/0.5.3; rv:1.0) Gecko/20100101 w3m/0.5.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Solaris",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -16,5 +25,23 @@
|
||||
"name" : "Solaris",
|
||||
"version" : "4.1.4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Solaris",
|
||||
"ua" : "Opera/5.0 (SunOS 5.8 sun4m; U) [en]",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Solaris",
|
||||
"version" : "5.8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Solaris",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100215 Solaris/10.1 (GNU) Superswan/3.5.8 (Byte/me)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Solaris",
|
||||
"version" : "10.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,14 @@
|
||||
"name" : "SUSE",
|
||||
"version" : "3.6.17-0.2.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "SUSE",
|
||||
"ua" : "Mozilla/5.0 (X11; SUSE; Linux amd64; rv:86.0) Gecko/20100101 Firefox/86.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "SUSE",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Symbian",
|
||||
"desc" : "Nokia 5250",
|
||||
"ua" : "Nokia5250/10.0.011 (SymbianOS/9.4; U; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Safari/525 3gpp-gba",
|
||||
"expect" :
|
||||
{
|
||||
@@ -9,12 +9,57 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Symbian",
|
||||
"desc" : "Nokia N79",
|
||||
"ua" : "Mozilla/5.0 (SymbianOS/9.3; U; Series60/3.2 NokiaN79-1/32.001; Profile/MIDP-2.1 Configuration/CLDC-1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Symbian",
|
||||
"version" : "9.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nokia E71",
|
||||
"ua" : "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaE71-1/110.07.127; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Symbian",
|
||||
"version" : "9.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Opera Mini on S60",
|
||||
"ua" : "Opera/9.80 (Series 60; Opera Mini/7.1.32444/191.361; U; de) Presto/2.12.423 Version/12.16",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Symbian",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "NokiaBrowser on Nokia C7",
|
||||
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaC7-00/024.001; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Symbian",
|
||||
"version" : "5.2"
|
||||
"version" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nokia 808 PureView",
|
||||
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.5 Nokia808PureView/113.010.1508; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/535.1 (KHTML, like Gecko) NokiaBrowser/8.3.2.21 Mobile Safari/535.1 3gpp-gba",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Symbian",
|
||||
"version" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nokia 808 PureView",
|
||||
"ua" : "Mozilla/5.0 (Symbian; U; Nokia808 PureView; en-GB) AppleWebKit/534.3 (KHTML, like Gecko) Version/3.0 Mobile/1A543a Mobile Safari/534.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Symbian",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
11
test/data/ua/os/ubuntu-touch.json
Normal file
11
test/data/ua/os/ubuntu-touch.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Ubuntu Touch",
|
||||
"ua" : "Mozilla/5.0 (Linux; Ubuntu 16.04 like Android 4.4) AppleWebKit/537.36 Chromium/65.0.3325.151 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Ubuntu Touch",
|
||||
"version" : "16.04"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -16,5 +16,32 @@
|
||||
"name" : "Ubuntu",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Ubuntu",
|
||||
"ua" : "Mozilla/5.0 (Wayland; Linux x86_64; Huawei) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Ubuntu/23.04 Edg/110.0.1587.41",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Ubuntu",
|
||||
"version" : "23.04"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Ubuntu",
|
||||
"ua" : "Mozilla/5.0 (X11; Ubuntu 20.04; Linux arm; rv:99.0) Gecko/20100101 Firefox/99.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Ubuntu",
|
||||
"version" : "20.04"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Ubuntu",
|
||||
"ua" : "Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Ubuntu",
|
||||
"version" : "14.10"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"desc" : "WebOS",
|
||||
"desc" : "HP WebOS",
|
||||
"ua" : "Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.5; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.83 Safari/534.6 TouchPad/1.0",
|
||||
"expect" :
|
||||
{
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS",
|
||||
"desc" : "Palm WebOS",
|
||||
"ua" : "Mozilla/5.0 (webOS/1.4.5; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.0",
|
||||
"expect" :
|
||||
{
|
||||
@@ -17,13 +17,58 @@
|
||||
"version" : "1.4.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS TV 22",
|
||||
"ua" : " Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chr0me/87.0.4280.88 Safari/537.36 LG Browser/8.00.00(LGE; ST50K-LG2200WEB; 04.42.26; 0x00000001; DTV_C22P); webOS.TV-2022; LG NetCast.TV-2013 Compatible (LGE, ST50K-LG2200WEB, wireless)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "22"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS TV 22",
|
||||
"ua" : "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 HbbTV/1.6.1 (+DRM; LGE/SILICONPLAYER/Hyundai; 50HYN3205; WEBOS22 04.42.26; W22_K8LP; DTV_C22P;)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "22"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS TV 5.0",
|
||||
"ua" : "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chr0me/68.0.3440.106 Safari/537.36 LG Browser/8.00.00(LGE; SWU-6522; 04.50.63; 0x00000001; DTV_C20P); webOS.TV-2020; LG NetCast.TV-2013 Compatible (LGE, SWU-6522, wireless)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS TV 5.0",
|
||||
"ua" : "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 HbbTV/1.5.1 (+DRM; LGE/WALTON/Hyundai; 50HYN3205; WEBOS5.0 04.50.63; W50_K6LP; DTV_C20P;)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS TV 5.x",
|
||||
"ua" : "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 WebAppManager",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "TV"
|
||||
"version" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS TV 5.x",
|
||||
"ua" : "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chr0me/68.0.3440.106 Safari/537.36 LG Browser/8.00.00(LGE; E65A71B-S; 04.50.63; 0x00000001; DTV_C20P); webOS.TV-2020; LG NetCast.TV-2013 Compatible (LGE, E65A71B-S, wired)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -32,7 +77,16 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "TV"
|
||||
"version" : "4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WebOS TV 3.5",
|
||||
"ua" : "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 HbbTV/1.3.1 ( DRM; LGE; OLED55B7V-T; WEBOS3.5 06.10.60; W3_M16P; ) FVC/2.0 (LGE; WEBOS3.5 ;)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "3.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -41,7 +95,7 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "TV"
|
||||
"version" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -50,7 +104,7 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "TV"
|
||||
"version" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -59,7 +113,7 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "webOS",
|
||||
"version" : "TV"
|
||||
"version" : "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
20
test/data/ua/os/windows-ce.json
Normal file
20
test/data/ua/os/windows-ce.json
Normal file
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Windows CE",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows CE",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows CE",
|
||||
"ua" : "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows CE",
|
||||
"version" : "1.0.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
11
test/data/ua/os/windows-iot.json
Normal file
11
test/data/ua/os/windows-iot.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Windows IoT",
|
||||
"ua" : "Mozilla/5.0 (Windows IoT 10.0; Android 6.0.1; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Mobile Safari/537.36 Edge/18.17763",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows IoT",
|
||||
"version" : "10.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -16,5 +16,23 @@
|
||||
"name" : "Windows Mobile",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Mobile",
|
||||
"ua" : "Opera/9.7 (Windows Mobile; PPC; Opera Mobi/35166; U; en) Presto/2.2.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows Mobile",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Mobile 6.1",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11) 320x240; VZW; Motorola-Q9c; Windows Mobile 6.1 Standard",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows Mobile",
|
||||
"version" : "6.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -9,14 +9,32 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Phone OS",
|
||||
"desc" : "Windows Phone 6.5",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HTC_Touch2_T3333; Windows Phone 6.5)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows Phone",
|
||||
"version" : "6.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Phone 7.0",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; DELL; Venue Pro)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows Phone OS",
|
||||
"name" : "Windows Phone",
|
||||
"version" : "7.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Phone 7.5",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 800)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows Phone",
|
||||
"version" : "7.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Phone 8",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; Windows Phone 8X by HTC)",
|
||||
@@ -25,5 +43,14 @@
|
||||
"name" : "Windows Phone",
|
||||
"version" : "8.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Phone 8.1",
|
||||
"ua" : "Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows Phone",
|
||||
"version" : "8.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
20
test/data/ua/os/windows-rt.json
Normal file
20
test/data/ua/os/windows-rt.json
Normal file
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Windows RT 8",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows RT",
|
||||
"version" : "8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows RT 8.1",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows RT",
|
||||
"version" : "8.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,103 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Windows 3.1",
|
||||
"ua" : "NCSA_Mosaic/2.0 (Windows 3.1)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "3.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 3.1",
|
||||
"ua" : "Mozilla/1.22 (compatible; MSIE 2.0; Windows 3.1)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "3.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows NT",
|
||||
"ua" : "Mozilla/4.51 [de] (WinNT; I)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "NT"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows NT 3.51",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 4.0; Windows NT)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "NT"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows NT 3.51",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 5.05; Windows NT 3.51)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "NT 3.51"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows NT 4.0",
|
||||
"ua" : "Opera/8.41.(Windows NT 4.0; ts-ZA) Presto/2.9.178 Version/11.00",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "NT 4.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows NT 4.0",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; WinNT4.0; de-DE; rv:1.7.5) Gecko/20041108 Firefox/52.7.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "NT 4.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Netscape on Windows 95",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Win95; de-DE; rv:0.9.2) Gecko/20010726 Netscape6/6.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "95"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 95",
|
||||
"ua" : "Mozilla/3.0 (Win95)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "95"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 95",
|
||||
"ua" : "Mozilla/3.0 (compatible; Opera/3.0; Windows 95/NT4) 3.2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "95"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 95",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.02 [en]",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "95"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 95",
|
||||
"ua" : "Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)",
|
||||
@@ -17,6 +116,24 @@
|
||||
"version" : "98"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Firebird on Windows 98",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 Firebird/0.7",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "98"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "K-Meleon on Windows 98",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "98"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows ME",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Win 9x 4.90) Gecko/20020502 CS 2000 7.0/7.0",
|
||||
@@ -26,6 +143,51 @@
|
||||
"version" : "ME"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Opera on Windows ME",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.12 [de]",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "ME"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Netscape on Windows ME",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8.1.8pre) Gecko/20071015 Firefox/2.0.0.7 Navigator/9.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "ME"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Netscape on Windows 2000",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "2000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Opera on Windows 2000",
|
||||
"ua" : "Opera/6.05 (Windows 2000; U)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "2000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Opera on Windows 2000",
|
||||
"ua" : "Opera/9.69 (Windows NT 5.01; en-US) Presto/2.8.160 Version/10.00",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "2000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 2000",
|
||||
"ua" : "Mozilla/3.0 (compatible; MSIE 3.0; Windows NT 5.0)",
|
||||
@@ -44,6 +206,15 @@
|
||||
"version" : "XP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows XP",
|
||||
"ua" : "Mozilla/5.0 (Windows XP; U) Opera 6.05 [de]",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "XP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Vista",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; fr-FR)",
|
||||
@@ -53,6 +224,33 @@
|
||||
"version" : "Vista"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 7",
|
||||
"ua" : "Microsoft Windows 7",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 7",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Evernote Windows/306387 (pt-PT, DDL); Windows/6.1.0 (Win32); Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 7",
|
||||
"ua" : "Mozilla/5.0 (Windows 7 Enterprise; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6099.71 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 7",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",
|
||||
@@ -71,6 +269,15 @@
|
||||
"version" : "8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 8.1",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:66.0.5) Gecko/20100101 Firefox/66.0.5",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "8.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows 10",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0",
|
||||
@@ -80,6 +287,15 @@
|
||||
"version" : "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows Server 2012 R2",
|
||||
"ua" : "Mozilla/5.0 (Windows Server 2012 R2 Standard; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5975.80 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "Server 2012 R2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
||||
@@ -99,48 +315,75 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows RT",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "RT"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows CE",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "CE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows NT on x86 or aarch64 CPU using Firefox",
|
||||
"ua" : "Mozilla/5.0 (Windows NT x.y; rv:10.0) Gecko/20100101 Firefox/10.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "NT x"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows NT on x64 CPU using Firefox",
|
||||
"ua" : "Mozilla/5.0 (Windows NT x.y; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "NT x"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes Windows Vista",
|
||||
"desc" : "iTunes on Windows Vista",
|
||||
"ua" : "iTunes/10.7 (Windows; Microsoft Windows Vista Home Premium Edition Service Pack 1 (Build 6001)) AppleWebKit/536.26.9",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "Vista"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes on Windows 7",
|
||||
"ua" : "iTunes/10.6.3 (Windows; Microsoft Windows 7 x64 Business Edition Service Pack 1 (Build 7601)) AppleWebKit/534.57.2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes on Windows 8",
|
||||
"ua" : "iTunes/12.1.1 (Windows; Microsoft Windows 8 x64 Business Edition (Build 9200)) AppleWebKit/7600.1017.9000.2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes on Windows 8.1",
|
||||
"ua" : "iTunes/12.4 (Windows; Microsoft Windows 8.1 x64 Business Edition (Build 9200); x64) AppleWebKit/7601.6016.1000.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "8.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes on Windows 10",
|
||||
"ua" : "iTunes/12.9.1 (Windows; Microsoft Windows 10 x64 Professional Edition (Build 18362); x64) AppleWebKit/7606.2104.0.21",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes on Windows 10",
|
||||
"ua" : "iTunes/12.6.3 (Windows; Microsoft Windows 10.0 x64 (Build 17763); x64) AppleWebKit/7604.1038.1006.6",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes on Windows 10 S",
|
||||
"ua" : "iTunes/12.12 (Windows; Microsoft Windows 10 S x64; x64) AppleWebKit/7613.2007",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "iTunes on Windows 11",
|
||||
"ua" : "iTunes/12.13 (Windows; Microsoft Windows 11 x64; x64) AppleWebKit/7613.2007",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "11"
|
||||
}
|
||||
}
|
||||
]
|
||||
20
test/data/ua/os/xubuntu.json
Normal file
20
test/data/ua/os/xubuntu.json
Normal file
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Xubuntu",
|
||||
"ua" : "Mozilla/5.0 (X11; Xubuntu Linux 21.10 x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.57 Vivaldi/5.1.2 (Blink)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Xubuntu",
|
||||
"version" : "21.10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Xubuntu",
|
||||
"ua" : "Mozilla/5.0 (X11; Xubuntu 14.04.5 LTS) AppleWebKit/537.36 (KHTML, like Gecko) Xubuntu Chrome/66.0.2623.87 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Xubuntu",
|
||||
"version" : "14.04.5"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,14 @@
|
||||
"name" : "Zenwalk",
|
||||
"version" : "7.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Zenwalk",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.13) Gecko/20101221 IceCat/3.6.13 (like Firefox/3.6.13) (Zenwalk GNU Linux)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Zenwalk",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,5 +1,5 @@
|
||||
import { UAParser } from '../../src/main/ua-parser.mjs';
|
||||
import { CPU, Device, Engine } from '../../src/enums/ua-parser-enums.mjs';
|
||||
import { CPUArch, DeviceType, EngineName } from '../../src/enums/ua-parser-enums.mjs';
|
||||
import * as assert from 'assert';
|
||||
|
||||
describe('Returns', () => {
|
||||
@@ -19,8 +19,8 @@ describe('Returns', () => {
|
||||
describe('Enums', () => {
|
||||
it('Can use enum', () => {
|
||||
const { cpu, device, engine } = UAParser('Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2a1pre) Gecko/20090928 Firefox/3.5 Maemo Browser 1.4.1.22 RX-51 N900');
|
||||
assert.strictEqual(cpu.is(CPU.ARM), true);
|
||||
assert.strictEqual(device.is(Device.MOBILE), true);
|
||||
assert.strictEqual(engine.is(Engine.GECKO), true);
|
||||
assert.strictEqual(cpu.is(CPUArch.ARM), true);
|
||||
assert.strictEqual(device.is(DeviceType.MOBILE), true);
|
||||
assert.strictEqual(engine.is(EngineName.GECKO), true);
|
||||
});
|
||||
});
|
||||
@@ -4,29 +4,35 @@ const parseJS = require('@babel/parser').parse;
|
||||
const traverse = require('@babel/traverse').default;
|
||||
const safe = require('safe-regex');
|
||||
const { UAParser } = require('../../src/main/ua-parser');
|
||||
const clis = require('../data/ua/extension/cli.json');
|
||||
const crawlers = require('../data/ua/extension/crawler.json');
|
||||
const emails = require('../data/ua/extension/email.json');
|
||||
const fetchers = require('../data/ua/extension/fetcher.json');
|
||||
const libraries = require('../data/ua/extension/library.json');
|
||||
const { Bots, CLIs, Crawlers, Emails, Fetchers, Libraries } = require('../../src/extensions/ua-parser-extensions');
|
||||
const { Bots, CLIs, Crawlers, Emails, Fetchers, InApps, Libraries, Vehicles } = require('../../src/extensions/ua-parser-extensions');
|
||||
const { BrowserType, OSName, Extension } = require('../../src/enums/ua-parser-enums');
|
||||
const { CLI, Crawler, Email, Fetcher, Library } = Extension.BrowserName;
|
||||
|
||||
describe('Extensions', () => {
|
||||
[
|
||||
['CLIs', clis, CLIs],
|
||||
['Crawlers', crawlers, Crawlers],
|
||||
['Emails', emails, Emails],
|
||||
['Fetchers', fetchers, Fetchers],
|
||||
['Libraries', libraries, Libraries]
|
||||
['CLIs', 'cli', CLIs],
|
||||
['Crawlers', 'crawler', Crawlers],
|
||||
['Emails', 'email', Emails],
|
||||
['Fetchers', 'fetcher', Fetchers],
|
||||
['InApps', 'inapp', InApps],
|
||||
['Libraries', 'library', Libraries],
|
||||
['Vehicles', 'vehicle', Vehicles]
|
||||
]
|
||||
.forEach((list) => {
|
||||
describe(list[0], () => {
|
||||
list[1].forEach((agent) => {
|
||||
it(`Can detect ${agent.desc}: "${agent.ua}"`, () => {
|
||||
let browser = UAParser(agent.ua, list[2]).browser;
|
||||
assert.strictEqual(String(browser.name), agent.expect.name);
|
||||
assert.strictEqual(String(browser.version), agent.expect.version);
|
||||
assert.strictEqual(String(browser.type), agent.expect.type);
|
||||
.forEach(([desc, path, ext]) => {
|
||||
const tests = require(`../data/ua/extension/${path}.json`);
|
||||
describe(desc, () => {
|
||||
tests.forEach((test) => {
|
||||
it(`Can detect ${test.desc}: "${test.ua}"`, () => {
|
||||
const { browser, device } = UAParser(test.ua, ext);
|
||||
if ('browser' in ext) {
|
||||
assert.strictEqual(String(browser.name), test.expect.name);
|
||||
assert.strictEqual(String(browser.version), test.expect.version);
|
||||
assert.strictEqual(String(browser.type), test.expect.type);
|
||||
} else if ('device' in ext) {
|
||||
assert.strictEqual(String(device.vendor), test.expect.vendor);
|
||||
assert.strictEqual(String(device.model), test.expect.model);
|
||||
assert.strictEqual(String(device.type), test.expect.type);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -38,16 +44,31 @@ describe('Extensions', () => {
|
||||
const jsdom = 'Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/20.0.3';
|
||||
const scrapy = 'Scrapy/1.5.0 (+https://scrapy.org)';
|
||||
|
||||
assert.equal(UAParser(scrapy, Bots).browser.name, 'Scrapy');
|
||||
assert.equal(UAParser(scrapy, Bots).browser.name, Library.SCRAPY);
|
||||
|
||||
const emailParser = new UAParser(Emails);
|
||||
assert.deepEqual(emailParser.setUA(outlook).getBrowser(), {name: "Microsoft Outlook", version: "16.0.9126", major: "16", type: "email"});
|
||||
assert.deepEqual(emailParser.setUA(thunderbird).getBrowser(), {name: "Thunderbird", version: "78.13.0", major: "78", type: "email"});
|
||||
assert.deepEqual(emailParser.setUA(outlook).getBrowser(), {name: Email.MICROSOFT_OUTLOOK, version: "16.0.9126", major: "16", type: BrowserType.EMAIL});
|
||||
assert.deepEqual(emailParser.setUA(thunderbird).getBrowser(), {name: Email.THUNDERBIRD, version: "78.13.0", major: "78", type: BrowserType.EMAIL});
|
||||
|
||||
const libraryParser = new UAParser(Libraries);
|
||||
assert.deepEqual(libraryParser.setUA(axios).getBrowser(), {name: "axios", version: "1.3.5", major: "1", type: "library"});
|
||||
assert.deepEqual(libraryParser.setUA(jsdom).getBrowser(), {name: "jsdom", version: "20.0.3", major: "20", type: "library"});
|
||||
assert.deepEqual(libraryParser.setUA(scrapy).getBrowser(), {name: "Scrapy", version: "1.5.0", major: "1", type: "library"});
|
||||
assert.deepEqual(libraryParser.setUA(axios).getBrowser(), {name: Library.AXIOS, version: "1.3.5", major: "1", type: BrowserType.LIBRARY});
|
||||
assert.deepEqual(libraryParser.setUA(jsdom).getBrowser(), {name: Library.JSDOM, version: "20.0.3", major: "20", type: BrowserType.LIBRARY});
|
||||
assert.deepEqual(libraryParser.setUA(scrapy).getBrowser(), {name: Library.SCRAPY, version: "1.5.0", major: "1", type: BrowserType.LIBRARY});
|
||||
|
||||
// Bluesky
|
||||
const bluesky = 'Mozilla/5.0 (compatible; Bluesky Cardyb/1.1; +mailto:support@bsky.app)';
|
||||
assert.deepEqual(new UAParser(bluesky, Bots).getBrowser(), {
|
||||
name: Fetcher.BLUESKY,
|
||||
version: '1.1',
|
||||
major: '1',
|
||||
type: BrowserType.FETCHER
|
||||
});
|
||||
|
||||
const whatsapp = "WhatsApp/2.0 A";
|
||||
assert.deepEqual(new UAParser(whatsapp, Fetchers).getOS(), {
|
||||
name : OSName.ANDROID,
|
||||
version : undefined
|
||||
});
|
||||
});
|
||||
|
||||
describe('Merge', () => {
|
||||
@@ -58,14 +79,14 @@ describe('Merge', () => {
|
||||
// try merging crawlers & CLIs
|
||||
const crawlersAndCLIs = { browser : [...Crawlers.browser, ...CLIs.browser]};
|
||||
const crawlersAndCLIsParser = new UAParser(crawlersAndCLIs);
|
||||
assert.deepEqual(crawlersAndCLIsParser.setUA(wget).getBrowser(), {name: "Wget", version: "1.21.1", major: "1", type:"cli"});
|
||||
assert.deepEqual(crawlersAndCLIsParser.setUA(facebookBot).getBrowser(), {name: "FacebookBot", version: "1.0", major: "1", type:"crawler"});
|
||||
assert.deepEqual(crawlersAndCLIsParser.setUA(wget).getBrowser(), {name: CLI.WGET, version: "1.21.1", major: "1", type: BrowserType.CLI});
|
||||
assert.deepEqual(crawlersAndCLIsParser.setUA(facebookBot).getBrowser(), {name: Crawler.META_FACEBOOKBOT, version: "1.0", major: "1", type: BrowserType.CRAWLER});
|
||||
|
||||
// alternative merge options
|
||||
const crawlersAndCLIsParser2 = new UAParser([Crawlers, CLIs]);
|
||||
const crawlersAndCLIsParser3 = new UAParser(facebookBot, [Crawlers, CLIs]);
|
||||
assert.deepEqual(crawlersAndCLIsParser2.setUA(wget).getBrowser(), {name: "Wget", version: "1.21.1", major: "1", type:"cli"});
|
||||
assert.deepEqual(crawlersAndCLIsParser3.getBrowser(), {name: "FacebookBot", version: "1.0", major: "1", type:"crawler"});
|
||||
assert.deepEqual(crawlersAndCLIsParser2.setUA(wget).getBrowser(), {name: CLI.WGET, version: "1.21.1", major: "1", type: BrowserType.CLI});
|
||||
assert.deepEqual(crawlersAndCLIsParser3.getBrowser(), {name: Crawler.META_FACEBOOKBOT, version: "1.0", major: "1", type: BrowserType.CRAWLER});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ const assert = require('assert');
|
||||
const { UAParser } = require('../../src/main/ua-parser');
|
||||
const { getDeviceVendor, isAppleSilicon, isAIBot, isBot, isChromeFamily } = require('../../src/helpers/ua-parser-helpers');
|
||||
const { Bots, Emails } = require('../../src/extensions/ua-parser-extensions');
|
||||
const { DeviceVendor } = require('../../src/enums/ua-parser-enums');
|
||||
|
||||
describe('getDeviceVendor', () => {
|
||||
it('Can guess the device vendor from a model name', () => {
|
||||
@@ -9,14 +10,12 @@ describe('getDeviceVendor', () => {
|
||||
const modelSM = 'SM-A605G';
|
||||
const modelRedmi = 'Redmi Note 8';
|
||||
const modelNexus = 'Nexus 6P';
|
||||
const modelQuest = 'Quest 3';
|
||||
const modelAquos = 'AQUOS-TVX19B';
|
||||
|
||||
assert.equal(getDeviceVendor(modelSM), 'Samsung');
|
||||
assert.equal(getDeviceVendor(modelRedmi), 'Xiaomi');
|
||||
assert.equal(getDeviceVendor(modelNexus), 'Huawei');
|
||||
assert.equal(getDeviceVendor(modelQuest), 'Facebook');
|
||||
assert.equal(getDeviceVendor(modelAquos), 'Sharp');
|
||||
assert.equal(getDeviceVendor(modelSM), DeviceVendor.SAMSUNG);
|
||||
assert.equal(getDeviceVendor(modelRedmi), DeviceVendor.XIAOMI);
|
||||
assert.equal(getDeviceVendor(modelNexus), DeviceVendor.HUAWEI);
|
||||
assert.equal(getDeviceVendor(modelAquos), DeviceVendor.SHARP);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,11 +39,13 @@ describe('isAIBot', () => {
|
||||
const claudeBot = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)';
|
||||
const firefox = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0';
|
||||
const searchGPT = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OAI-SearchBot/1.0; +https://openai.com/searchbot';
|
||||
const semrushAI = 'Mozilla/5.0 (compatible; SemrushBot-OCOB/1; +https://www.semrush.com/bot/)';
|
||||
|
||||
assert.equal(isAIBot(UAParser(claudeBot, Bots)), true);
|
||||
assert.equal(isAIBot(claudeBot), true);
|
||||
assert.equal(isAIBot(firefox), false);
|
||||
assert.equal(isAIBot(searchGPT), true);
|
||||
assert.equal(isAIBot(semrushAI), true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ var cpus = require('../data/ua/cpu/cpu-all.json');
|
||||
var devices = readJsonFiles('test/data/ua/device');
|
||||
var engines = require('../data/ua/engine/engine-all.json');
|
||||
var os = readJsonFiles('test/data/ua/os');
|
||||
var { Headers } = require('node-fetch');
|
||||
var { Headers } = require('undici');
|
||||
|
||||
function readJsonFiles(dir) {
|
||||
var list = [];
|
||||
@@ -91,6 +91,34 @@ describe('Returns', function () {
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
it('works even when Array.prototype has been mangled', function(done) {
|
||||
const result = withMangledArrayProto(() => new UAParser('').getResult());
|
||||
|
||||
function withMangledArrayProto(fn, key = 'isEmpty', value = function() { return this.length === 0; }) {
|
||||
const originalValue = Array.prototype[key];
|
||||
const restore = Object.hasOwnProperty.call(Array.prototype, key)
|
||||
? () => Array.prototype[key] = originalValue
|
||||
: () => delete Array.prototype[key];
|
||||
|
||||
Array.prototype[key] = value;
|
||||
const result = fn();
|
||||
restore();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
assert.deepEqual(result,
|
||||
{
|
||||
ua : '',
|
||||
browser: { name: undefined, version: undefined, major: undefined, type: undefined },
|
||||
cpu: { architecture: undefined },
|
||||
device: { vendor: undefined, model: undefined, type: undefined },
|
||||
engine: { name: undefined, version: undefined},
|
||||
os: { name: undefined, version: undefined }
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Extending Regex', function () {
|
||||
@@ -353,4 +381,18 @@ describe('Read user-agent data from req.headers', function () {
|
||||
const { browser } = UAParser(reqHeaders);
|
||||
assert.strictEqual(browser.is('Midori'), true);
|
||||
});
|
||||
});
|
||||
|
||||
it('Headers field name should be case insensitive', function () {
|
||||
const hEaDeRs = {
|
||||
'uSeR-aGenT' : 'Midori/0.2.2 (X11; Linux i686; U; en-us) WebKit/531.2+'
|
||||
};
|
||||
const { browser } = UAParser(hEaDeRs);
|
||||
assert.strictEqual(browser.toString(), "Midori 0.2.2");
|
||||
});
|
||||
|
||||
it('Empty headers should not raise any error', function () {
|
||||
const emptyHeaders = {};
|
||||
const { browser } = UAParser(emptyHeaders);
|
||||
assert.strictEqual(browser.toString(), "undefined");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
const assert = require('assert');
|
||||
const { UAParser } = require('../../src/main/ua-parser');
|
||||
const { BrowserName, CPUArch, DeviceType, DeviceVendor, EngineName, OSName } = require('../../src/enums/ua-parser-enums');
|
||||
const UACHTests = require('../data/ua-ch/headers');
|
||||
|
||||
describe('Map UA-CH headers', () => {
|
||||
|
||||
@@ -25,27 +27,27 @@ describe('Map UA-CH headers', () => {
|
||||
it('Can read from client-hints headers using `withClientHints()`', () => {
|
||||
|
||||
assert.strictEqual(uap.ua, "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36");
|
||||
assert.strictEqual(uap.browser.name, "Chrome");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(uap.browser.version, "93.0.1.2");
|
||||
assert.strictEqual(uap.browser.major, "93");
|
||||
assert.strictEqual(browser.name, "Chrome");
|
||||
assert.strictEqual(browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(browser.version, "93.0.1.2");
|
||||
assert.strictEqual(browser.major, "93");
|
||||
assert.strictEqual(uap.cpu.architecture, "arm64");
|
||||
assert.strictEqual(cpu.architecture, "arm64");
|
||||
assert.strictEqual(uap.device.type, "mobile");
|
||||
assert.strictEqual(uap.cpu.architecture, CPUArch.ARM_64);
|
||||
assert.strictEqual(cpu.architecture, CPUArch.ARM_64);
|
||||
assert.strictEqual(uap.device.type, DeviceType.MOBILE);
|
||||
assert.strictEqual(uap.device.model, "Pixel 99");
|
||||
assert.strictEqual(uap.device.vendor, "Google");
|
||||
assert.strictEqual(device.type, "mobile");
|
||||
assert.strictEqual(uap.device.vendor, DeviceVendor.GOOGLE);
|
||||
assert.strictEqual(device.type, DeviceType.MOBILE);
|
||||
assert.strictEqual(device.model, "Pixel 99");
|
||||
assert.strictEqual(device.vendor, "Google");
|
||||
assert.strictEqual(uap.engine.name, 'Blink');
|
||||
assert.strictEqual(device.vendor, DeviceVendor.GOOGLE);
|
||||
assert.strictEqual(uap.engine.name, EngineName.BLINK);
|
||||
assert.strictEqual(uap.engine.version, '93.0.1.2');
|
||||
assert.strictEqual(engine.name, 'Blink');
|
||||
assert.strictEqual(engine.name, EngineName.BLINK);
|
||||
assert.strictEqual(engine.version, '93.0.1.2');
|
||||
assert.strictEqual(uap.os.name, "Windows");
|
||||
assert.strictEqual(uap.os.name, OSName.WINDOWS);
|
||||
assert.strictEqual(uap.os.version, "11");
|
||||
assert.strictEqual(os.name, "Windows");
|
||||
assert.strictEqual(os.name, OSName.WINDOWS);
|
||||
assert.strictEqual(os.version, "11");
|
||||
});
|
||||
|
||||
@@ -58,17 +60,17 @@ describe('Map UA-CH headers', () => {
|
||||
engine = new UAParser(headers).getEngine();
|
||||
os = new UAParser(headers).getOS();
|
||||
|
||||
assert.strictEqual(uap.browser.name, "Chrome");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(uap.browser.version, "110.0.0.0");
|
||||
assert.strictEqual(uap.browser.major, "110");
|
||||
assert.strictEqual(uap.cpu.architecture, "amd64");
|
||||
assert.strictEqual(uap.cpu.architecture, CPUArch.X86_64);
|
||||
assert.strictEqual(uap.device.type, undefined);
|
||||
assert.strictEqual(uap.device.model, undefined);
|
||||
assert.strictEqual(uap.device.vendor, undefined);
|
||||
assert.strictEqual(uap.engine.name, 'Blink');
|
||||
assert.strictEqual(uap.engine.name, EngineName.BLINK);
|
||||
assert.strictEqual(uap.engine.version, '110.0.0.0');
|
||||
assert.strictEqual(uap.os.name, "Linux");
|
||||
assert.strictEqual(uap.os.version, "x86_64");
|
||||
assert.strictEqual(uap.os.name, OSName.LINUX);
|
||||
assert.strictEqual(uap.os.version, undefined);
|
||||
});
|
||||
|
||||
it('Fallback to user-agent header when using `withClientHints()` but found no client hints-related headers', () => {
|
||||
@@ -80,17 +82,17 @@ describe('Map UA-CH headers', () => {
|
||||
|
||||
uap = UAParser(headers2).withClientHints();
|
||||
|
||||
assert.strictEqual(uap.browser.name, "Chrome");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(uap.browser.version, "110.0.0.0");
|
||||
assert.strictEqual(uap.browser.major, "110");
|
||||
assert.strictEqual(uap.cpu.architecture, "amd64");
|
||||
assert.strictEqual(uap.device.type, "mobile");
|
||||
assert.strictEqual(uap.cpu.architecture, CPUArch.X86_64);
|
||||
assert.strictEqual(uap.device.type, DeviceType.MOBILE);
|
||||
assert.strictEqual(uap.device.model, undefined);
|
||||
assert.strictEqual(uap.device.vendor, undefined);
|
||||
assert.strictEqual(uap.engine.name, 'Blink');
|
||||
assert.strictEqual(uap.engine.name, EngineName.BLINK);
|
||||
assert.strictEqual(uap.engine.version, '110.0.0.0');
|
||||
assert.strictEqual(uap.os.name, "Linux");
|
||||
assert.strictEqual(uap.os.version, "x86_64");
|
||||
assert.strictEqual(uap.os.name, OSName.LINUX);
|
||||
assert.strictEqual(uap.os.version, undefined);
|
||||
});
|
||||
|
||||
it('Can detect Apple silicon from client hints data', () => {
|
||||
@@ -116,10 +118,10 @@ describe('Map UA-CH headers', () => {
|
||||
}
|
||||
*/
|
||||
|
||||
assert.strictEqual(ua.os.is("macOS"), true);
|
||||
assert.strictEqual(ua.cpu.is("arm"), true);
|
||||
assert.strictEqual(ua.device.is("mobile"), false);
|
||||
assert.strictEqual(ua.device.is("tablet"), false);
|
||||
assert.strictEqual(ua.os.is(OSName.MACOS), true);
|
||||
assert.strictEqual(ua.cpu.is(CPUArch.ARM), true);
|
||||
assert.strictEqual(ua.device.is(DeviceType.MOBILE), false);
|
||||
assert.strictEqual(ua.device.is(DeviceType.TABLET), false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -138,11 +140,11 @@ describe('Map UA-CH headers', () => {
|
||||
};
|
||||
|
||||
UAParser(FFVR).withClientHints().then(ua => {
|
||||
assert.strictEqual(ua.device.type, 'xr');
|
||||
assert.strictEqual(ua.device.type, DeviceType.XR);
|
||||
});
|
||||
|
||||
UAParser(FFEInk).withClientHints().then(ua => {
|
||||
assert.strictEqual(ua.device.type, 'tablet');
|
||||
assert.strictEqual(ua.device.type, DeviceType.TABLET);
|
||||
});
|
||||
|
||||
|
||||
@@ -168,7 +170,7 @@ describe('Map UA-CH headers', () => {
|
||||
|
||||
uap = UAParser(headers2).withClientHints();
|
||||
|
||||
assert.strictEqual(uap.browser.name, "Chrome");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(uap.browser.version, undefined);
|
||||
assert.strictEqual(uap.browser.major, undefined);
|
||||
});
|
||||
@@ -195,69 +197,36 @@ describe('Map UA-CH headers', () => {
|
||||
};
|
||||
|
||||
uap = UAParser(headers3a).withClientHints();
|
||||
assert.strictEqual(uap.browser.name, "Chrome");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(uap.browser.version, "120.0.6099.132");
|
||||
|
||||
uap = UAParser(headers3b).withClientHints();
|
||||
assert.strictEqual(uap.browser.name, "Chrome");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(uap.browser.version, "120.0.6099.132");
|
||||
|
||||
uap = UAParser(headers3c).withClientHints();
|
||||
assert.strictEqual(uap.browser.name, "Chrome");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.CHROME);
|
||||
assert.strictEqual(uap.browser.version, "120.0.6099.132");
|
||||
|
||||
uap = UAParser(headers3d).withClientHints();
|
||||
assert.strictEqual(uap.browser.name, "Edge");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.EDGE);
|
||||
assert.strictEqual(uap.browser.version, "120.0.6099.133");
|
||||
|
||||
uap = UAParser(headers3e).withClientHints();
|
||||
assert.strictEqual(uap.browser.name, "Edge");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.EDGE);
|
||||
assert.strictEqual(uap.browser.version, "120.0.6099.133");
|
||||
|
||||
uap = UAParser(headers3f).withClientHints();
|
||||
assert.strictEqual(uap.browser.name, "Edge");
|
||||
assert.strictEqual(uap.browser.name, BrowserName.EDGE);
|
||||
assert.strictEqual(uap.browser.version, "120.0.6099.133");
|
||||
});
|
||||
});
|
||||
|
||||
describe('Browser naming adjustments', () => {
|
||||
[
|
||||
{
|
||||
ua_ch: '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',
|
||||
expect: {
|
||||
before: 'Google Chrome',
|
||||
after: 'Chrome'
|
||||
}
|
||||
},
|
||||
{
|
||||
ua_ch: '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
|
||||
expect: {
|
||||
before: "Microsoft Edge",
|
||||
after: "Edge"
|
||||
}
|
||||
},
|
||||
{
|
||||
ua_ch: '"Android WebView";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
|
||||
expect: {
|
||||
before: "Android WebView",
|
||||
after: "Chrome WebView"
|
||||
}
|
||||
},
|
||||
{
|
||||
ua_ch: '"Chromium";v="124", "HeadlessChrome";v="124", "Not-A.Brand";v="99"',
|
||||
expect: {
|
||||
before: "HeadlessChrome",
|
||||
after: "Chrome Headless"
|
||||
}
|
||||
},
|
||||
]
|
||||
.forEach(test => {
|
||||
it(`"${test.expect.before}" => "${test.expect.after}"`, () => {
|
||||
const headers = {
|
||||
'sec-ch-ua' : test.ua_ch,
|
||||
};
|
||||
const { browser } = UAParser(headers).withClientHints();
|
||||
assert.strictEqual(browser.name, test.expect.after);
|
||||
describe('UA-CH Headers tests', () => {
|
||||
UACHTests.forEach(test => {
|
||||
it(`Test for ${test.desc}`, () => {
|
||||
const { browser } = UAParser(test.headers).withClientHints();
|
||||
assert.deepEqual(browser, test.expect.browser);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -267,169 +236,169 @@ describe('Identify vendor & type of device from given model name', () => {
|
||||
{
|
||||
model: '220733SG',
|
||||
expect: {
|
||||
vendor : 'Xiaomi',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.XIAOMI,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: '5087Z',
|
||||
expect: {
|
||||
vendor : 'TCL',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.TCL,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: '9137W',
|
||||
expect: {
|
||||
vendor : 'TCL',
|
||||
type : 'tablet'
|
||||
vendor : DeviceVendor.TCL,
|
||||
type : DeviceType.TABLET
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'BE2015',
|
||||
expect: {
|
||||
vendor : 'OnePlus',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.ONEPLUS,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'CPH2389',
|
||||
expect: {
|
||||
vendor : 'OPPO',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.ONEPLUS,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'Infinix X669C',
|
||||
expect: {
|
||||
vendor : 'Infinix',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.INFINIX,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'itel L6502',
|
||||
expect: {
|
||||
vendor : 'itel',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.ITEL,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'Lenovo TB-X606F',
|
||||
expect: {
|
||||
vendor : 'Lenovo',
|
||||
type : 'tablet'
|
||||
vendor : DeviceVendor.LENOVO,
|
||||
type : DeviceType.TABLET
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'LM-Q720',
|
||||
expect: {
|
||||
vendor : 'LG',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.LG,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'M2003J15SC',
|
||||
expect: {
|
||||
vendor : 'Xiaomi',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.XIAOMI,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'MAR-LX1A',
|
||||
expect: {
|
||||
vendor : 'Huawei',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.HUAWEI,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'moto g(20)',
|
||||
expect: {
|
||||
vendor : 'Motorola',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.MOTOROLA,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'Nokia C210',
|
||||
expect: {
|
||||
vendor : 'Nokia',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.NOKIA,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'Pixel 8',
|
||||
expect: {
|
||||
vendor : 'Google',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.GOOGLE,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'Redmi Note 9S',
|
||||
expect: {
|
||||
vendor : 'Xiaomi',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.XIAOMI,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'RMX3830',
|
||||
expect: {
|
||||
vendor : 'Realme',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.REALME,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'SM-S536DL',
|
||||
expect: {
|
||||
vendor : 'Samsung',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.SAMSUNG,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'SM-S546VL',
|
||||
expect: {
|
||||
vendor : 'Samsung',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.SAMSUNG,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'SM-T875',
|
||||
expect: {
|
||||
vendor : 'Samsung',
|
||||
type : 'tablet'
|
||||
vendor : DeviceVendor.SAMSUNG,
|
||||
type : DeviceType.TABLET
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'STK-L21',
|
||||
expect: {
|
||||
vendor : 'Huawei',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.HUAWEI,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'T430W',
|
||||
expect: {
|
||||
vendor : 'TCL',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.TCL,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'TECNO KI5k',
|
||||
expect: {
|
||||
vendor : 'TECNO',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.TECNO,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'vivo 1820',
|
||||
expect: {
|
||||
vendor : 'Vivo',
|
||||
type : 'mobile'
|
||||
vendor : DeviceVendor.VIVO,
|
||||
type : DeviceType.MOBILE
|
||||
}
|
||||
},
|
||||
{
|
||||
model: 'Xbox',
|
||||
expect: {
|
||||
vendor : 'Microsoft',
|
||||
type : 'console'
|
||||
vendor : DeviceVendor.MICROSOFT,
|
||||
type : DeviceType.CONSOLE
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user