mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 22:52:16 +03:00
Compare commits
40 Commits
2.0.0-rc.2
...
2.0.0-pro-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e006e5a129 | ||
|
|
38baf844fc | ||
|
|
70b3003344 | ||
|
|
5b375b90d5 | ||
|
|
b1c7dfcc3a | ||
|
|
2b125c8de4 | ||
|
|
2181559b01 | ||
|
|
14caf6d204 | ||
|
|
4a12562946 | ||
|
|
fdcb01d64e | ||
|
|
b960c42691 | ||
|
|
abde14f2a5 | ||
|
|
138e6b7e55 | ||
|
|
ba980c8250 | ||
|
|
ee51caf422 | ||
|
|
84c4613145 | ||
|
|
6b8920c700 | ||
|
|
49151e478c | ||
|
|
cbe06acaf2 | ||
|
|
a0e11b701e | ||
|
|
3b3361fe53 | ||
|
|
19e5d322e2 | ||
|
|
75690f16cc | ||
|
|
d5edcbae12 | ||
|
|
be2f167f90 | ||
|
|
d50be39f3b | ||
|
|
44d9d5700f | ||
|
|
99d59f7e4c | ||
|
|
768b622603 | ||
|
|
10ec6349e2 | ||
|
|
6f02da06e0 | ||
|
|
23dc320be4 | ||
|
|
8852b03739 | ||
|
|
f9ac3566cb | ||
|
|
1d776d469b | ||
|
|
e6a085f710 | ||
|
|
37c61736c3 | ||
|
|
5948060729 | ||
|
|
420bf1066c | ||
|
|
b20d09655c |
111
CHANGELOG.md
111
CHANGELOG.md
@@ -2,34 +2,89 @@
|
||||
|
||||
## Migrating from v1 to v2
|
||||
|
||||
- What's breaking:
|
||||
- Licensed under AGPLv3 (open-source) or PRO License (commercial)
|
||||
- Browser detection on mobile device: `"Chrome" => "Mobile Chrome"`, `"Firefox" => "Mobile Firefox"`
|
||||
- OS detection: `"Mac OS" => "macOS"`, `"Chromium OS" => "Chrome OS"`
|
||||
- What's new:
|
||||
- New device type: `xr`, to identify AR/VR devices
|
||||
- New browser property: `browser.type`, to identify the type of the browser: `crawler`, `cli`, `email`, `fetcher`, `inapp`, `mediaplayer`, `module`
|
||||
- New methods in result object (all of `get*()` return value):
|
||||
- Support for client hints: `withClientHints()`
|
||||
- Support for feature detection: `withFeatureCheck()`
|
||||
- Utility for easy comparison: `is()`
|
||||
- Utility to print full-name: `toString()`
|
||||
- Parse directly from command line using `npx ua-parser-js`
|
||||
- Extensions can be passed as a list to `UAParser()`
|
||||
- Support for ES module & TypeScript `import { UAParser } from 'ua-parser-js'`
|
||||
- Provided Enums submodule `'ua-parser-js/enums'`
|
||||
- Provided Extensions submodule `'ua-parser-js/extensions'`
|
||||
- Provided Helpers submodule `'ua-parser-js/helpers'`:
|
||||
- `getDeviceVendor()` to guess for a device vendor based on its model name
|
||||
- `isAppleSilicon()` to check if the device has Apple Silicon Mac device properties
|
||||
- `isBot()` to check if the browser is identified as a bot
|
||||
- `isChromeFamily()` to check if the browser is Chrome-based / has Blink engine (i.e: New Opera, New Edge, Vivaldi, Brave, Arc, etc.)
|
||||
- `isElectron()` to check if current window is running inside Electron
|
||||
- `isFromEU()` to check if current window is from an EU (European Union) country
|
||||
- `isFrozenUA()` to check if a user-agent string match with the reduced/frozen user-agent pattern
|
||||
- `isStandalonePWA()` to check if current window is a standalone PWA
|
||||
### What's Breaking:
|
||||
|
||||
--
|
||||
- **Licensing Changes:**
|
||||
- UAParser.js is now licensed under AGPLv3 for open-source use, with PRO Licenses available for commercial/proprietary use
|
||||
|
||||
- **Browser Detection on Mobile Devices:**
|
||||
- `"Chrome"` => `"Mobile Chrome"`
|
||||
- `"Firefox"` => `"Mobile Firefox"`
|
||||
|
||||
- **OS Detection:**
|
||||
- `"Mac OS"` => `"macOS"`
|
||||
- `"Chromium OS"` => `"Chrome OS"`
|
||||
|
||||
### What's New:
|
||||
|
||||
- **Support for ES Modules & TypeScript:**
|
||||
- Import directly as an ES module with TypeScript support: `import { UAParser } from 'ua-parser-js'`
|
||||
|
||||
- **Support for Custom/Predefined Extensions:**
|
||||
- Pass custom regexes or predefined extensions as a list to `UAParser()`
|
||||
|
||||
- **Support for CLI Parsing:**
|
||||
- Parse a user-agent directly from the command line using `npx ua-parser-js "[User-Agent]"`
|
||||
|
||||
- **Enhanced Detection with Client Hints:**
|
||||
- `withClientHints()`: Improves detection accuracy by leveraging client hints
|
||||
|
||||
- **Enhanced Detection with Feature Detection:**
|
||||
- `withFeatureCheck()`: Refines detection results using feature detection
|
||||
|
||||
- **Simple Comparison for Detection Results:**
|
||||
- `is()`: Enables easy comparison checks against the detection result
|
||||
|
||||
- **Detailed Result Output:**
|
||||
- `toString()`: Returns the detection result in form of a full-name string
|
||||
|
||||
- **New Device Type:**
|
||||
- Added `xr` to identify AR/VR devices
|
||||
|
||||
- **New Browser Property:**
|
||||
- Added `browser.type` to identify additional browser types:
|
||||
- `crawler`, `cli`, `email`, `fetcher`, `inapp`, `library`, `mediaplayer`
|
||||
|
||||
- **New Submodules:**
|
||||
- **`'ua-parser-js/enums'`**: Provides constants for these specific properties:
|
||||
- `browser.name`, `browser.type`, `cpu.architecture`, `device.type`, `device.vendor`, `engine.name`, `os.name`
|
||||
|
||||
- **`'ua-parser-js/extensions'`**: Predefined extensions for various use cases:
|
||||
- `Bots`, `Crawlers`, `CLIs`, `Emails`, `ExtraDevices`, `Fetchers`, `InApps`, `Libraries`, `Mediaplayers`
|
||||
|
||||
- **`'ua-parser-js/helpers'`**: Provides utility methods to extend detection functionality:
|
||||
- `getDeviceVendor()`: Guesses the device vendor based on its model name
|
||||
- `isAppleSilicon()`: Detects Apple Silicon device properties
|
||||
- `isAIBot()`: Checks if the user-agent is an AI bot
|
||||
- `isBot()`: Checks if the user-agent is a bot
|
||||
- `isChromeFamily()`: Checks if the browser is Chrome-based (uses Blink engine) — e.g., New Opera, New Edge, Vivaldi, Brave, Arc, etc.
|
||||
- `isElectron()`: Detects if current window is running within Electron
|
||||
- `isFromEU()`: Detects if current browser's timezone is from an EU country
|
||||
- `isFrozenUA()`: Checks if the user-agent matches a frozen/reduced user-agent pattern
|
||||
- `isStandalonePWA()`: Detects if current window is a standalone PWA
|
||||
|
||||
---
|
||||
|
||||
## Version 2.0.0
|
||||
|
||||
- `ua-parser-js/extensions` submodule:
|
||||
- Add new CLI: ELinks, HTTPie
|
||||
- Add new crawler: AI2Bot, aiHitBot, anthropic-ai, Diffbot, ImagesiftBot, magpie-crawler, Omgilibot, Screaming Frog SEO Spider, Seznambot, Teoma, Timpibot, VelenPublicWebCrawler, Webzio-Extended, YouBot
|
||||
- Add new email: Airmail, BlueMail, eMClient, NaverMailApp, Sparrow, Yahoo
|
||||
- Add new fetcher: cohere-ai, Vercelbot
|
||||
- Add new library: java, python-urllib, python-requests
|
||||
- `ua-parser-js/helpers` submodule:
|
||||
- Add new method `isAIBot()`: Checks if the user-agent is an AI bot
|
||||
|
||||
## Version 2.0.0-rc.3
|
||||
|
||||
- Add support for Headers object
|
||||
- Add new device: Advan, Cat, Energizer, Honor, IMO, Micromax, Smartfren
|
||||
- Add new engine: Servo
|
||||
- `ua-parser-js/extensions` submodule:
|
||||
- Breaking change: rename `module` to `library`
|
||||
- Add new email clients: Evolution, KMail, Kontact
|
||||
- Add new bots: 360Spider, Archive.org Bots, CCBot, DataForSeoBot, DuckAssistBot, Exabot, Google Bots, Meta Bots, MojeekBot, PerplexityBot, PetalBot, TurnitinBot, Yeti, YisouSpider
|
||||
|
||||
## Version 2.0.0-rc.2
|
||||
|
||||
@@ -59,7 +114,7 @@
|
||||
- Rename `isChromiumBased()` to `isChromeFamily()`
|
||||
- Update `isAppleSilicon()` to also checks for WebGL renderer info
|
||||
- `ua-parser-js/extensions` submodule:
|
||||
- Restore `bots` as a compilation of all these browser types: `clis`, `crawlers`, `fetchers`, and `modules`
|
||||
- Restore `Bots` as a compilation of all these browser types: `cli`, `crawler`, `fetcher`, and `library`
|
||||
|
||||
## Version 2.0.0-beta.3
|
||||
|
||||
|
||||
683
LICENSE.md
683
LICENSE.md
@@ -1,616 +1,71 @@
|
||||
# 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 ENTERPRISE 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, organization, or company 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 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, organization, or company and cannot be transferred to another individual, organization, or company.
|
||||
|
||||
---
|
||||
|
||||
## Rights
|
||||
|
||||
You may use, copy, and modify The Code for an indefinite number of Projects.
|
||||
|
||||
You have the right to receive lifetime updates and one (1) year of support, starting from the time you make the purchase.
|
||||
|
||||
---
|
||||
|
||||
## Restrictions
|
||||
|
||||
You may not redistribute The Code, as-is or modified, except as a part of a Project that you made.
|
||||
|
||||
If You transfer a Project to a client, the use of The Code must be limited to the original functionality that You created for them. The Code must not be extracted, reproduced, or used in any other way. You must inform your client of this condition.
|
||||
|
||||
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
|
||||
229
README.md
229
README.md
@@ -1,224 +1,29 @@
|
||||
<p align="center">
|
||||
<a href="https://uaparser.dev"><img src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/uap-header.png"></a>
|
||||
</p>
|
||||
# UAParser.js PRO Enterprise License
|
||||
|
||||
<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>
|
||||
Thank you for choosing the UAParser.js PRO Enterprise License.
|
||||
|
||||
# UAParser.js
|
||||
Please be aware that using this package without a valid license purchase is strictly prohibited and constitutes a violation of applicable copyright laws.
|
||||
|
||||
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).
|
||||
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.
|
||||
|
||||
# Demo
|
||||
If you have not yet purchased a license, you may do so at https://store.faisalman.com.
|
||||
|
||||
* Live demo: https://uaparser.dev
|
||||
# Download
|
||||
|
||||
```sh
|
||||
npm install @ua-parser-js/pro-enterprise
|
||||
```
|
||||
|
||||
# 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-enterprise';
|
||||
```
|
||||
|
||||
# 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 (v1.x)</td>
|
||||
<td>AGPL (v2.x)</td>
|
||||
<td>PRO Personal</td>
|
||||
<td>PRO Business</td>
|
||||
<td>PRO Enterprise</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Browser detection</td>
|
||||
<td><strong title="Basic detection">⚠️</strong></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CPU detection</td>
|
||||
<td><strong title="Basic detection">⚠️</strong></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Device detection</td>
|
||||
<td><strong title="Basic detection">⚠️</strong></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Engine detection</td>
|
||||
<td><strong title="Basic detection">⚠️</strong></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OS detection</td>
|
||||
<td><strong title="Basic detection">⚠️</strong></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Enhanced detection</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>Extras (Apps, Bots, Libs, Emails, Media Players, etc)</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 available</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TypeScript declarations available</td>
|
||||
<td><strong title="Community version">⚠️</strong></td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Allowed for 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 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="$588 (one-time fee)">$588 (<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">
|
||||
<a target="_blank" href="https://store.faisalman.com/checkout/buy/e236ea87-9b2b-400e-9683-24367f731b35"> GET THE PRO PACKAGES 📥</a>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
UAParser.js PRO Enterprise
|
||||
|
||||
# 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 versions 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
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
1672
package-lock.json
generated
1672
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"title": "UAParser.js",
|
||||
"name": "ua-parser-js",
|
||||
"version": "2.0.0-rc.2",
|
||||
"title": "UAParser.js PRO Enterprise",
|
||||
"name": "@ua-parser-js/pro-enterprise",
|
||||
"version": "2.0.0",
|
||||
"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": [
|
||||
@@ -180,7 +180,8 @@
|
||||
},
|
||||
"./enums": {
|
||||
"require": "./src/enums/ua-parser-enums.js",
|
||||
"import": "./src/enums/ua-parser-enums.mjs"
|
||||
"import": "./src/enums/ua-parser-enums.mjs",
|
||||
"types": "./src/enums/ua-parser-enums.d.ts"
|
||||
},
|
||||
"./extensions": {
|
||||
"require": "./src/extensions/ua-parser-extensions.js",
|
||||
@@ -211,9 +212,9 @@
|
||||
"test:playwright": "playwright test"
|
||||
},
|
||||
"dependencies": {
|
||||
"detect-europe-js": "^0.1.1",
|
||||
"is-standalone-pwa": "^0.1.0",
|
||||
"ua-is-frozen": "^0.1.1"
|
||||
"detect-europe-js": "^0.1.2",
|
||||
"is-standalone-pwa": "^0.1.1",
|
||||
"ua-is-frozen": "^0.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/parser": "7.15.8",
|
||||
@@ -231,7 +232,7 @@
|
||||
"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": "*"
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Enums for UAParser.js v2.0.0-rc.2
|
||||
/* Enums for UAParser.js v2.0.0
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Enterprise License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
@@ -55,6 +55,7 @@ const Browser = Object.freeze({
|
||||
GOOGLE_SEARCH: 'GSA',
|
||||
HELIO: 'Helio',
|
||||
HEYTAP: 'HeyTap',
|
||||
HONOR: 'Honor',
|
||||
HUAWEI: 'Huawei Browser',
|
||||
ICAB: 'iCab',
|
||||
ICE: 'ICE Browser',
|
||||
@@ -158,7 +159,7 @@ const BrowserType = Object.freeze({
|
||||
FETCHER: 'fetcher',
|
||||
INAPP: 'inapp',
|
||||
MEDIAPLAYER: 'mediaplayer',
|
||||
MODULE: 'module'
|
||||
LIBRARY: 'library'
|
||||
});
|
||||
|
||||
const CPU = Object.freeze({
|
||||
@@ -194,6 +195,7 @@ const Device = Object.freeze({
|
||||
|
||||
const Vendor = Object.freeze({
|
||||
ACER: 'Acer',
|
||||
ADVAN: 'Advan',
|
||||
ALCATEL: 'Alcatel',
|
||||
APPLE: 'Apple',
|
||||
AMAZON: 'Amazon',
|
||||
@@ -202,7 +204,9 @@ const Vendor = Object.freeze({
|
||||
ATT: 'AT&T',
|
||||
BENQ: 'BenQ',
|
||||
BLACKBERRY: 'BlackBerry',
|
||||
CAT: 'Cat',
|
||||
DELL: 'Dell',
|
||||
ENERGIZER: 'Energizer',
|
||||
ESSENTIAL: 'Essential',
|
||||
FACEBOOK: 'Facebook',
|
||||
FAIRPHONE: 'Fairphone',
|
||||
@@ -212,6 +216,7 @@ const Vendor = Object.freeze({
|
||||
HP: 'HP',
|
||||
HTC: 'HTC',
|
||||
HUAWEI: 'Huawei',
|
||||
IMO: 'IMO',
|
||||
INFINIX: 'Infinix',
|
||||
ITEL: 'itel',
|
||||
JOLLA: 'Jolla',
|
||||
@@ -219,6 +224,7 @@ const Vendor = Object.freeze({
|
||||
LENOVO: 'Lenovo',
|
||||
LG: 'LG',
|
||||
MEIZU: 'Meizu',
|
||||
MICROMAX: 'Micromax',
|
||||
MICROSOFT: 'Microsoft',
|
||||
MOTOROLA: 'Motorola',
|
||||
NEXIAN: 'Nexian',
|
||||
@@ -240,6 +246,7 @@ const Vendor = Object.freeze({
|
||||
SAMSUNG: 'Samsung',
|
||||
SHARP: 'Sharp',
|
||||
SIEMENS: 'Siemens',
|
||||
SMARTFREN: 'Smartfren',
|
||||
SONY: 'Sony',
|
||||
SPRINT: 'Sprint',
|
||||
TCL: 'TCL',
|
||||
@@ -273,6 +280,7 @@ const Engine = Object.freeze({
|
||||
NETFRONT: 'NetFront',
|
||||
NETSURF: 'NetSurf',
|
||||
PRESTO: 'Presto',
|
||||
SERVO: 'Servo',
|
||||
TASMAN: 'Tasman',
|
||||
TRIDENT: 'Trident',
|
||||
W3M: 'w3m',
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
// Source: /src/enums/ua-parser-enums.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Enums for UAParser.js v2.0.0-rc.2
|
||||
/* Enums for UAParser.js v2.0.0
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Enterprise License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
@@ -59,6 +59,7 @@ const Browser = Object.freeze({
|
||||
GOOGLE_SEARCH: 'GSA',
|
||||
HELIO: 'Helio',
|
||||
HEYTAP: 'HeyTap',
|
||||
HONOR: 'Honor',
|
||||
HUAWEI: 'Huawei Browser',
|
||||
ICAB: 'iCab',
|
||||
ICE: 'ICE Browser',
|
||||
@@ -162,7 +163,7 @@ const BrowserType = Object.freeze({
|
||||
FETCHER: 'fetcher',
|
||||
INAPP: 'inapp',
|
||||
MEDIAPLAYER: 'mediaplayer',
|
||||
MODULE: 'module'
|
||||
LIBRARY: 'library'
|
||||
});
|
||||
|
||||
const CPU = Object.freeze({
|
||||
@@ -198,6 +199,7 @@ const Device = Object.freeze({
|
||||
|
||||
const Vendor = Object.freeze({
|
||||
ACER: 'Acer',
|
||||
ADVAN: 'Advan',
|
||||
ALCATEL: 'Alcatel',
|
||||
APPLE: 'Apple',
|
||||
AMAZON: 'Amazon',
|
||||
@@ -206,7 +208,9 @@ const Vendor = Object.freeze({
|
||||
ATT: 'AT&T',
|
||||
BENQ: 'BenQ',
|
||||
BLACKBERRY: 'BlackBerry',
|
||||
CAT: 'Cat',
|
||||
DELL: 'Dell',
|
||||
ENERGIZER: 'Energizer',
|
||||
ESSENTIAL: 'Essential',
|
||||
FACEBOOK: 'Facebook',
|
||||
FAIRPHONE: 'Fairphone',
|
||||
@@ -216,6 +220,7 @@ const Vendor = Object.freeze({
|
||||
HP: 'HP',
|
||||
HTC: 'HTC',
|
||||
HUAWEI: 'Huawei',
|
||||
IMO: 'IMO',
|
||||
INFINIX: 'Infinix',
|
||||
ITEL: 'itel',
|
||||
JOLLA: 'Jolla',
|
||||
@@ -223,6 +228,7 @@ const Vendor = Object.freeze({
|
||||
LENOVO: 'Lenovo',
|
||||
LG: 'LG',
|
||||
MEIZU: 'Meizu',
|
||||
MICROMAX: 'Micromax',
|
||||
MICROSOFT: 'Microsoft',
|
||||
MOTOROLA: 'Motorola',
|
||||
NEXIAN: 'Nexian',
|
||||
@@ -244,6 +250,7 @@ const Vendor = Object.freeze({
|
||||
SAMSUNG: 'Samsung',
|
||||
SHARP: 'Sharp',
|
||||
SIEMENS: 'Siemens',
|
||||
SMARTFREN: 'Smartfren',
|
||||
SONY: 'Sony',
|
||||
SPRINT: 'Sprint',
|
||||
TCL: 'TCL',
|
||||
@@ -277,6 +284,7 @@ const Engine = Object.freeze({
|
||||
NETFRONT: 'NetFront',
|
||||
NETSURF: 'NetSurf',
|
||||
PRESTO: 'Presto',
|
||||
SERVO: 'Servo',
|
||||
TASMAN: 'Tasman',
|
||||
TRIDENT: 'Trident',
|
||||
W3M: 'w3m',
|
||||
|
||||
6
src/extensions/ua-parser-extensions.d.ts
vendored
6
src/extensions/ua-parser-extensions.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.0-rc.2
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
||||
// Project: https://github.com/faisalman/ua-parser-js
|
||||
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||
|
||||
@@ -11,5 +11,5 @@ export const ExtraDevices: UAParserExt;
|
||||
export const Emails: UAParserExt;
|
||||
export const Fetchers: UAParserExt;
|
||||
export const InApps: UAParserExt;
|
||||
export const MediaPlayers: UAParserExt;
|
||||
export const Modules: UAParserExt;
|
||||
export const Libraries: UAParserExt;
|
||||
export const MediaPlayers: UAParserExt;
|
||||
@@ -1,8 +1,8 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Extensions for UAParser.js v2.0.0-rc.2
|
||||
/* Extensions for UAParser.js v2.0.0
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Enterprise License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
@@ -20,7 +20,7 @@ const EMAIL = 'email';
|
||||
const FETCHER = 'fetcher';
|
||||
const INAPP = 'inapp';
|
||||
const MEDIAPLAYER = 'mediaplayer';
|
||||
const MODULE = 'module';
|
||||
const LIBRARY = 'library';
|
||||
|
||||
//////////////////////
|
||||
// COMMAND LINE APPS
|
||||
@@ -28,8 +28,8 @@ const MODULE = 'module';
|
||||
|
||||
const CLIs = Object.freeze({
|
||||
browser : [
|
||||
// wget / curl / lynx
|
||||
[/(wget|curl|lynx)[\/ ]([\w\.]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
||||
// wget / curl / Lynx / ELinks / HTTPie
|
||||
[/(wget|curl|lynx|elinks|httpie)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -42,28 +42,41 @@ const Crawlers = Object.freeze({
|
||||
[
|
||||
// AhrefsBot - https://ahrefs.com/robot
|
||||
// Amazonbot - https://developer.amazon.com/amazonbot
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
// Bingbot - http://www.bing.com/bingbot.htm
|
||||
// CCBot - https://commoncrawl.org/faq
|
||||
// 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
|
||||
// MJ12bot - https://mj12bot.com/
|
||||
// OpenAI Search - https://platform.openai.com/docs/bots
|
||||
// MojeekBot - https://www.mojeek.com/bot.html
|
||||
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
|
||||
// PerplexityBot - https://perplexity.ai/perplexitybot
|
||||
// SemrushBot - http://www.semrush.com/bot.html
|
||||
/((?:ahrefs|amazon|apple|bing|dot|duckduck|facebook|gpt|mj12|oai-search|semrush)bot)\/([\w\.]+)/i,
|
||||
// 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,
|
||||
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
/(applebot(?:-extended)?)\/([\w\.]+)/i,
|
||||
|
||||
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
||||
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
|
||||
|
||||
// ClaudeBot
|
||||
/(claude(?:bot|-web))\/([\w\.]+)/i,
|
||||
// ClaudeBot (Anthropic)
|
||||
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
||||
|
||||
// Coc Coc Bot - https://help.coccoc.com/en/search-engine
|
||||
/(coccocbot-(?:image|web))\/([\w\.]+)/i,
|
||||
|
||||
// Facebook / Meta
|
||||
// https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
|
||||
/(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
|
||||
|
||||
// Googlebot - http://www.google.com/bot.html
|
||||
/(google(?:bot|other)(?:-image|-video|-news|-extended)?|(?:storebot-)?google(?:-inspectiontool)?)\/?([\w\.]*)/i,
|
||||
/(google(?:bot|other|-inspectiontool)(?:-image|-video|-news)?|storebot-google)\/?([\w\.]*)/i,
|
||||
|
||||
// Internet Archive (archive.org)
|
||||
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
|
||||
|
||||
// Sogou Spider
|
||||
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
|
||||
@@ -72,14 +85,31 @@ 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|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,
|
||||
|
||||
// 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
|
||||
],
|
||||
|
||||
[NAME, VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
// Bytespider
|
||||
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
||||
[/((?:bytespider|(?=yahoo! )slurp))/i],
|
||||
[
|
||||
// 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
|
||||
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
|
||||
// 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
|
||||
],
|
||||
[NAME, [TYPE, CRAWLER]]
|
||||
]
|
||||
});
|
||||
@@ -170,8 +200,10 @@ const ExtraDevices = Object.freeze({
|
||||
|
||||
const Emails = Object.freeze({
|
||||
browser : [
|
||||
// Microsoft Outlook / Thunderbird
|
||||
[/(microsoft outlook|thunderbird)[\s\/]([\w\.]+)/i], [NAME, VERSION, [TYPE, EMAIL]]
|
||||
[
|
||||
// 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]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -184,8 +216,15 @@ const Fetchers = Object.freeze({
|
||||
[
|
||||
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
|
||||
// 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|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
||||
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
||||
|
||||
// Google Site Verifier
|
||||
/(google-site-verification)\/([\w\.]+)/i,
|
||||
|
||||
// Meta
|
||||
/(meta-externalfetcher)\/([\w\.]+)/i,
|
||||
|
||||
// Slackbot - https://api.slack.com/robots
|
||||
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
|
||||
@@ -202,8 +241,8 @@ const Fetchers = Object.freeze({
|
||||
],
|
||||
[NAME, VERSION, [TYPE, FETCHER]],
|
||||
|
||||
// Google Bots / Snapchat
|
||||
[/(feedfetcher-google|google-read-aloud|(?=bot; )snapchat)/i],
|
||||
// Google Bots / Cohere / Snapchat / Vercelbot
|
||||
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
|
||||
[NAME, [TYPE, FETCHER]],
|
||||
]
|
||||
});
|
||||
@@ -252,8 +291,8 @@ const MediaPlayers = Object.freeze({
|
||||
/(flrp)\/([\w\.-]+)/i // Flip Player
|
||||
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i
|
||||
// FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit
|
||||
/(fstream|nativehost|queryseekspider)/i
|
||||
// FStream/NativeHost/QuerySeekSpider
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
||||
@@ -261,8 +300,6 @@ const MediaPlayers = Object.freeze({
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
|
||||
/(java|python-urllib|python-requests|wget|libcurl)\/([\w\.-_]+)/i,
|
||||
// Java/urllib/requests/wget/cURL
|
||||
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
@@ -332,14 +369,14 @@ const MediaPlayers = Object.freeze({
|
||||
]
|
||||
});
|
||||
|
||||
////////////////////////
|
||||
// MODULES / LIBRARIES
|
||||
///////////////////////
|
||||
/////////////
|
||||
// LIBRARIES
|
||||
//////////////
|
||||
|
||||
const Modules = Object.freeze({
|
||||
const Libraries = Object.freeze({
|
||||
browser : [
|
||||
// Axios/jsdom/Scrapy
|
||||
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, MODULE]]
|
||||
// Axios/jsdom/Scrapy/Java/urllib/requests
|
||||
[/\b(axios|jsdom|scrapy|java|python-urllib|python-requests)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, LIBRARY]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -352,7 +389,7 @@ const Bots = Object.freeze({
|
||||
...CLIs.browser,
|
||||
...Crawlers.browser,
|
||||
...Fetchers.browser,
|
||||
...Modules.browser
|
||||
...Libraries.browser
|
||||
]
|
||||
});
|
||||
|
||||
@@ -364,6 +401,6 @@ module.exports = {
|
||||
Emails,
|
||||
Fetchers,
|
||||
InApps,
|
||||
MediaPlayers,
|
||||
Modules
|
||||
Libraries,
|
||||
MediaPlayers
|
||||
};
|
||||
@@ -3,10 +3,10 @@
|
||||
// Source: /src/extensions/ua-parser-extensions.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Extensions for UAParser.js v2.0.0-rc.2
|
||||
/* Extensions for UAParser.js v2.0.0
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Enterprise License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
@@ -24,7 +24,7 @@ const EMAIL = 'email';
|
||||
const FETCHER = 'fetcher';
|
||||
const INAPP = 'inapp';
|
||||
const MEDIAPLAYER = 'mediaplayer';
|
||||
const MODULE = 'module';
|
||||
const LIBRARY = 'library';
|
||||
|
||||
//////////////////////
|
||||
// COMMAND LINE APPS
|
||||
@@ -32,8 +32,8 @@ const MODULE = 'module';
|
||||
|
||||
const CLIs = Object.freeze({
|
||||
browser : [
|
||||
// wget / curl / lynx
|
||||
[/(wget|curl|lynx)[\/ ]([\w\.]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
||||
// wget / curl / Lynx / ELinks / HTTPie
|
||||
[/(wget|curl|lynx|elinks|httpie)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -46,28 +46,41 @@ const Crawlers = Object.freeze({
|
||||
[
|
||||
// AhrefsBot - https://ahrefs.com/robot
|
||||
// Amazonbot - https://developer.amazon.com/amazonbot
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
// Bingbot - http://www.bing.com/bingbot.htm
|
||||
// CCBot - https://commoncrawl.org/faq
|
||||
// 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
|
||||
// MJ12bot - https://mj12bot.com/
|
||||
// OpenAI Search - https://platform.openai.com/docs/bots
|
||||
// MojeekBot - https://www.mojeek.com/bot.html
|
||||
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots
|
||||
// PerplexityBot - https://perplexity.ai/perplexitybot
|
||||
// SemrushBot - http://www.semrush.com/bot.html
|
||||
/((?:ahrefs|amazon|apple|bing|dot|duckduck|facebook|gpt|mj12|oai-search|semrush)bot)\/([\w\.]+)/i,
|
||||
// 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,
|
||||
|
||||
// Applebot - http://apple.com/go/applebot
|
||||
/(applebot(?:-extended)?)\/([\w\.]+)/i,
|
||||
|
||||
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
|
||||
/(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
|
||||
|
||||
// ClaudeBot
|
||||
/(claude(?:bot|-web))\/([\w\.]+)/i,
|
||||
// ClaudeBot (Anthropic)
|
||||
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
|
||||
|
||||
// Coc Coc Bot - https://help.coccoc.com/en/search-engine
|
||||
/(coccocbot-(?:image|web))\/([\w\.]+)/i,
|
||||
|
||||
// Facebook / Meta
|
||||
// https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
|
||||
/(facebook(?:externalhit|catalog)|meta-externalagent)\/([\w\.]+)/i,
|
||||
|
||||
// Googlebot - http://www.google.com/bot.html
|
||||
/(google(?:bot|other)(?:-image|-video|-news|-extended)?|(?:storebot-)?google(?:-inspectiontool)?)\/?([\w\.]*)/i,
|
||||
/(google(?:bot|other|-inspectiontool)(?:-image|-video|-news)?|storebot-google)\/?([\w\.]*)/i,
|
||||
|
||||
// Internet Archive (archive.org)
|
||||
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
|
||||
|
||||
// Sogou Spider
|
||||
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
|
||||
@@ -76,14 +89,31 @@ 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|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,
|
||||
|
||||
// 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
|
||||
],
|
||||
|
||||
[NAME, VERSION, [TYPE, CRAWLER]],
|
||||
|
||||
// Bytespider
|
||||
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
|
||||
[/((?:bytespider|(?=yahoo! )slurp))/i],
|
||||
[
|
||||
// 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
|
||||
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
|
||||
// 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
|
||||
],
|
||||
[NAME, [TYPE, CRAWLER]]
|
||||
]
|
||||
});
|
||||
@@ -174,8 +204,10 @@ const ExtraDevices = Object.freeze({
|
||||
|
||||
const Emails = Object.freeze({
|
||||
browser : [
|
||||
// Microsoft Outlook / Thunderbird
|
||||
[/(microsoft outlook|thunderbird)[\s\/]([\w\.]+)/i], [NAME, VERSION, [TYPE, EMAIL]]
|
||||
[
|
||||
// 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]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -188,8 +220,15 @@ const Fetchers = Object.freeze({
|
||||
[
|
||||
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
|
||||
// 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|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
||||
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
|
||||
|
||||
// Google Site Verifier
|
||||
/(google-site-verification)\/([\w\.]+)/i,
|
||||
|
||||
// Meta
|
||||
/(meta-externalfetcher)\/([\w\.]+)/i,
|
||||
|
||||
// Slackbot - https://api.slack.com/robots
|
||||
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
|
||||
@@ -206,8 +245,8 @@ const Fetchers = Object.freeze({
|
||||
],
|
||||
[NAME, VERSION, [TYPE, FETCHER]],
|
||||
|
||||
// Google Bots / Snapchat
|
||||
[/(feedfetcher-google|google-read-aloud|(?=bot; )snapchat)/i],
|
||||
// Google Bots / Cohere / Snapchat / Vercelbot
|
||||
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
|
||||
[NAME, [TYPE, FETCHER]],
|
||||
]
|
||||
});
|
||||
@@ -256,8 +295,8 @@ const MediaPlayers = Object.freeze({
|
||||
/(flrp)\/([\w\.-]+)/i // Flip Player
|
||||
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i
|
||||
// FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit
|
||||
/(fstream|nativehost|queryseekspider)/i
|
||||
// FStream/NativeHost/QuerySeekSpider
|
||||
], [NAME, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
||||
@@ -265,8 +304,6 @@ const MediaPlayers = Object.freeze({
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
|
||||
/(java|python-urllib|python-requests|wget|libcurl)\/([\w\.-_]+)/i,
|
||||
// Java/urllib/requests/wget/cURL
|
||||
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
|
||||
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
|
||||
|
||||
@@ -336,14 +373,14 @@ const MediaPlayers = Object.freeze({
|
||||
]
|
||||
});
|
||||
|
||||
////////////////////////
|
||||
// MODULES / LIBRARIES
|
||||
///////////////////////
|
||||
/////////////
|
||||
// LIBRARIES
|
||||
//////////////
|
||||
|
||||
const Modules = Object.freeze({
|
||||
const Libraries = Object.freeze({
|
||||
browser : [
|
||||
// Axios/jsdom/Scrapy
|
||||
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, MODULE]]
|
||||
// Axios/jsdom/Scrapy/Java/urllib/requests
|
||||
[/\b(axios|jsdom|scrapy|java|python-urllib|python-requests)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, LIBRARY]]
|
||||
]
|
||||
});
|
||||
|
||||
@@ -356,7 +393,7 @@ const Bots = Object.freeze({
|
||||
...CLIs.browser,
|
||||
...Crawlers.browser,
|
||||
...Fetchers.browser,
|
||||
...Modules.browser
|
||||
...Libraries.browser
|
||||
]
|
||||
});
|
||||
|
||||
@@ -368,6 +405,6 @@ export {
|
||||
Emails,
|
||||
Fetchers,
|
||||
InApps,
|
||||
MediaPlayers,
|
||||
Modules
|
||||
Libraries,
|
||||
MediaPlayers
|
||||
};
|
||||
10
src/helpers/ua-parser-helpers.d.ts
vendored
10
src/helpers/ua-parser-helpers.d.ts
vendored
@@ -1,13 +1,14 @@
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.0-rc.2
|
||||
// Type definitions for Helpers submodule of UAParser.js v2.0.0
|
||||
// Project: https://github.com/faisalman/ua-parser-js
|
||||
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||
|
||||
import { IResult } from "../main/ua-parser";
|
||||
|
||||
declare function getDeviceVendor(model: string): string | undefined;
|
||||
declare function isAppleSilicon(res: IResult): boolean;
|
||||
declare function isBot(res: IResult): boolean;
|
||||
declare function isChromeFamily(res: IResult): boolean;
|
||||
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;
|
||||
@@ -16,6 +17,7 @@ declare function isStandalonePWA(): boolean;
|
||||
export {
|
||||
getDeviceVendor,
|
||||
isAppleSilicon,
|
||||
isAIBot,
|
||||
isBot,
|
||||
isChromeFamily,
|
||||
isElectron,
|
||||
|
||||
@@ -1,43 +1,125 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Helpers for UAParser.js v2.0.0-rc.2
|
||||
/* Helpers for UAParser.js v2.0.0
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Enterprise 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 { isFromEU } = require('detect-europe-js');
|
||||
const { isFrozenUA } = require('ua-is-frozen');
|
||||
const { isStandalonePWA } = require('is-standalone-pwa');
|
||||
|
||||
const toResult = (value, head, ext) => typeof value === 'string' ? UAParser(value, head, ext) : value;
|
||||
|
||||
const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36`).device.vendor;
|
||||
|
||||
const isAppleSilicon = (res) => {
|
||||
const isAppleSilicon = (resultOrUA) => {
|
||||
const res = toResult(resultOrUA);
|
||||
if (res.os.is(OS.MACOS)) {
|
||||
if (res.cpu.is(CPU.ARM)) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
const canvas = document.createElement('canvas');
|
||||
const webgl = canvas.getContext('webgl2') || canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
||||
const debug = webgl.getExtension('WEBGL_debug_renderer_info');
|
||||
const renderer = webgl.getParameter(debug.UNMASKED_RENDERER_WEBGL);
|
||||
if (renderer.match(/apple m\d/i)) {
|
||||
return true;
|
||||
if (typeof resultOrUA !== 'string' && typeof window !== 'undefined') {
|
||||
try {
|
||||
const canvas = document.createElement('canvas');
|
||||
const webgl = canvas.getContext('webgl2') || canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
||||
const debug = webgl.getExtension('WEBGL_debug_renderer_info');
|
||||
const renderer = webgl.getParameter(debug.UNMASKED_RENDERER_WEBGL);
|
||||
if (renderer.match(/apple m\d/i)) {
|
||||
return true;
|
||||
}
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const isBot = (res) => ['cli', 'crawler', 'fetcher', 'module'].includes(res.browser.type);
|
||||
const isAIBot = (resultOrUA) => [
|
||||
|
||||
const isChromeFamily = (res) => res.engine.is(Engine.BLINK);
|
||||
// AI2
|
||||
'ai2bot',
|
||||
|
||||
// Amazon
|
||||
'amazonbot',
|
||||
|
||||
// Anthropic
|
||||
'anthropic-ai',
|
||||
'claude-web',
|
||||
'claudebot',
|
||||
|
||||
// Apple
|
||||
'applebot',
|
||||
'applebot-extended',
|
||||
|
||||
// ByteDance
|
||||
'bytespider',
|
||||
|
||||
// Common Crawl
|
||||
'ccbot',
|
||||
|
||||
// DataForSeo
|
||||
'dataforseobot',
|
||||
|
||||
// Diffbot
|
||||
'diffbot',
|
||||
|
||||
// Google
|
||||
'googleother',
|
||||
'googleother-image',
|
||||
'googleother-video',
|
||||
'google-extended',
|
||||
|
||||
// Hive AI
|
||||
'imagesiftbot',
|
||||
|
||||
// Huawei
|
||||
'petalbot',
|
||||
|
||||
// Meta
|
||||
'facebookbot',
|
||||
'meta-externalagent',
|
||||
|
||||
// OpenAI
|
||||
'gptbot',
|
||||
'oai-searchbot',
|
||||
|
||||
// Perplexity
|
||||
'perplexitybot',
|
||||
|
||||
// Timpi
|
||||
'timpibot',
|
||||
|
||||
// Velen.io
|
||||
'velenpublicwebcrawler',
|
||||
|
||||
// Webz.io
|
||||
'omgili',
|
||||
'omgilibot',
|
||||
'webzio-extended',
|
||||
|
||||
// You.com
|
||||
'youbot',
|
||||
|
||||
// Zyte
|
||||
'scrapy'
|
||||
|
||||
].includes(String(toResult(resultOrUA, Bots).browser.name).toLowerCase());
|
||||
|
||||
const isBot = (resultOrUA) => [
|
||||
'cli',
|
||||
'crawler',
|
||||
'fetcher',
|
||||
'library'
|
||||
].includes(toResult(resultOrUA, Bots).browser.type);
|
||||
|
||||
const isChromeFamily = (resultOrUA) => toResult(resultOrUA).engine.is(Engine.BLINK);
|
||||
|
||||
const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js
|
||||
/ electron\//i.test(navigator?.userAgent)); // browser
|
||||
@@ -45,6 +127,7 @@ const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') ||
|
||||
module.exports = {
|
||||
getDeviceVendor,
|
||||
isAppleSilicon,
|
||||
isAIBot,
|
||||
isBot,
|
||||
isChromeFamily,
|
||||
isElectron,
|
||||
|
||||
@@ -3,45 +3,127 @@
|
||||
// Source: /src/helpers/ua-parser-helpers.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Helpers for UAParser.js v2.0.0-rc.2
|
||||
/* Helpers for UAParser.js v2.0.0
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License */
|
||||
UAParser.js PRO Enterprise 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 { isFromEU } from 'detect-europe-js';
|
||||
import { isFrozenUA } from 'ua-is-frozen';
|
||||
import { isStandalonePWA } from 'is-standalone-pwa';
|
||||
|
||||
const toResult = (value, head, ext) => typeof value === 'string' ? UAParser(value, head, ext) : value;
|
||||
|
||||
const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36`).device.vendor;
|
||||
|
||||
const isAppleSilicon = (res) => {
|
||||
const isAppleSilicon = (resultOrUA) => {
|
||||
const res = toResult(resultOrUA);
|
||||
if (res.os.is(OS.MACOS)) {
|
||||
if (res.cpu.is(CPU.ARM)) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
const canvas = document.createElement('canvas');
|
||||
const webgl = canvas.getContext('webgl2') || canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
||||
const debug = webgl.getExtension('WEBGL_debug_renderer_info');
|
||||
const renderer = webgl.getParameter(debug.UNMASKED_RENDERER_WEBGL);
|
||||
if (renderer.match(/apple m\d/i)) {
|
||||
return true;
|
||||
if (typeof resultOrUA !== 'string' && typeof window !== 'undefined') {
|
||||
try {
|
||||
const canvas = document.createElement('canvas');
|
||||
const webgl = canvas.getContext('webgl2') || canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
||||
const debug = webgl.getExtension('WEBGL_debug_renderer_info');
|
||||
const renderer = webgl.getParameter(debug.UNMASKED_RENDERER_WEBGL);
|
||||
if (renderer.match(/apple m\d/i)) {
|
||||
return true;
|
||||
}
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const isBot = (res) => ['cli', 'crawler', 'fetcher', 'module'].includes(res.browser.type);
|
||||
const isAIBot = (resultOrUA) => [
|
||||
|
||||
const isChromeFamily = (res) => res.engine.is(Engine.BLINK);
|
||||
// AI2
|
||||
'ai2bot',
|
||||
|
||||
// Amazon
|
||||
'amazonbot',
|
||||
|
||||
// Anthropic
|
||||
'anthropic-ai',
|
||||
'claude-web',
|
||||
'claudebot',
|
||||
|
||||
// Apple
|
||||
'applebot',
|
||||
'applebot-extended',
|
||||
|
||||
// ByteDance
|
||||
'bytespider',
|
||||
|
||||
// Common Crawl
|
||||
'ccbot',
|
||||
|
||||
// DataForSeo
|
||||
'dataforseobot',
|
||||
|
||||
// Diffbot
|
||||
'diffbot',
|
||||
|
||||
// Google
|
||||
'googleother',
|
||||
'googleother-image',
|
||||
'googleother-video',
|
||||
'google-extended',
|
||||
|
||||
// Hive AI
|
||||
'imagesiftbot',
|
||||
|
||||
// Huawei
|
||||
'petalbot',
|
||||
|
||||
// Meta
|
||||
'facebookbot',
|
||||
'meta-externalagent',
|
||||
|
||||
// OpenAI
|
||||
'gptbot',
|
||||
'oai-searchbot',
|
||||
|
||||
// Perplexity
|
||||
'perplexitybot',
|
||||
|
||||
// Timpi
|
||||
'timpibot',
|
||||
|
||||
// Velen.io
|
||||
'velenpublicwebcrawler',
|
||||
|
||||
// Webz.io
|
||||
'omgili',
|
||||
'omgilibot',
|
||||
'webzio-extended',
|
||||
|
||||
// You.com
|
||||
'youbot',
|
||||
|
||||
// Zyte
|
||||
'scrapy'
|
||||
|
||||
].includes(String(toResult(resultOrUA, Bots).browser.name).toLowerCase());
|
||||
|
||||
const isBot = (resultOrUA) => [
|
||||
'cli',
|
||||
'crawler',
|
||||
'fetcher',
|
||||
'library'
|
||||
].includes(toResult(resultOrUA, Bots).browser.type);
|
||||
|
||||
const isChromeFamily = (resultOrUA) => toResult(resultOrUA).engine.is(Engine.BLINK);
|
||||
|
||||
const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js
|
||||
/ electron\//i.test(navigator?.userAgent)); // browser
|
||||
@@ -49,6 +131,7 @@ const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') ||
|
||||
export {
|
||||
getDeviceVendor,
|
||||
isAppleSilicon,
|
||||
isAIBot,
|
||||
isBot,
|
||||
isChromeFamily,
|
||||
isElectron,
|
||||
|
||||
8
src/main/ua-parser.d.ts
vendored
8
src/main/ua-parser.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for UAParser.js v2.0.0-rc.2
|
||||
// Type definitions for UAParser.js v2.0.0
|
||||
// Project: https://github.com/faisalman/ua-parser-js
|
||||
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||
|
||||
@@ -15,11 +15,11 @@ declare namespace UAParser {
|
||||
name?: string;
|
||||
version?: string;
|
||||
major?: string;
|
||||
type?: 'crawler' | 'cli' | 'email' | 'fetcher' | 'inapp' | 'mediaplayer' | 'module';
|
||||
type?: 'crawler' | 'cli' | 'email' | 'fetcher' | 'inapp' | 'mediaplayer' | 'library';
|
||||
}
|
||||
|
||||
interface ICPU extends IData<ICPU> {
|
||||
architecture?: 'ia32' | 'ia64' | 'amd64' | 'arm' | 'arm64' | 'armhf' | 'avr' | 'irix' | 'irix64' | 'mips' | 'mips64' | '68k' | 'ppc' | 'sparc' | 'sparc64';
|
||||
architecture?: 'ia32' | 'ia64' | 'amd64' | 'arm' | 'arm64' | 'armhf' | 'avr' | 'avr32' | 'irix' | 'irix64' | 'mips' | 'mips64' | '68k' | 'pa-risc' | 'ppc' | 'sparc' | 'sparc64';
|
||||
}
|
||||
|
||||
interface IDevice extends IData<IDevice> {
|
||||
@@ -29,7 +29,7 @@ declare namespace UAParser {
|
||||
}
|
||||
|
||||
interface IEngine extends IData<IEngine> {
|
||||
name?: 'Amaya' | 'Blink' | 'EdgeHTML' | 'Flow' | 'Gecko' | 'Goanna' | 'iCab' | 'KHTML' | 'LibWeb' | 'Links' | 'Lynx' | 'NetFront' | 'NetSurf' | 'Presto' | 'Tasman' | 'Trident' | 'w3m' | 'WebKit';
|
||||
name?: 'Amaya' | 'ArkWeb' | 'Blink' | 'EdgeHTML' | 'Flow' | 'Gecko' | 'Goanna' | 'iCab' | 'KHTML' | 'LibWeb' | 'Links' | 'Lynx' | 'NetFront' | 'NetSurf' | 'Presto' | 'Servo' | 'Tasman' | 'Trident' | 'w3m' | 'WebKit';
|
||||
version?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/* UAParser.js v2.0.0-rc.2
|
||||
Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License *//*
|
||||
/* UAParser.js v2.0.0
|
||||
Copyright © 2012-2023 Faisal Salman <f@faisalman.com>
|
||||
UAParser.js PRO Enterprise License *//*
|
||||
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
|
||||
Supports browser & node.js environment.
|
||||
Demo : https://uaparser.dev
|
||||
@@ -19,7 +19,7 @@
|
||||
// Constants
|
||||
/////////////
|
||||
|
||||
var LIBVERSION = '2.0.0-rc.2',
|
||||
var LIBVERSION = '2.0.0',
|
||||
EMPTY = '',
|
||||
UNKNOWN = '?',
|
||||
FUNC_TYPE = 'function',
|
||||
@@ -72,6 +72,7 @@
|
||||
GOOGLE = 'Google',
|
||||
HUAWEI = 'Huawei',
|
||||
LENOVO = 'Lenovo',
|
||||
HONOR = 'Honor',
|
||||
LG = 'LG',
|
||||
MICROSOFT = 'Microsoft',
|
||||
MOTOROLA = 'Motorola',
|
||||
@@ -462,7 +463,7 @@
|
||||
// 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
|
||||
/(links) \(([\w\.]+)/i // Links
|
||||
/\b(links) \(([\w\.]+)/i // Links
|
||||
], [NAME, [VERSION, /_/g, '.']], [
|
||||
|
||||
/(cobalt)\/([\w\.]+)/i // Cobalt
|
||||
@@ -527,10 +528,14 @@
|
||||
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
||||
], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [
|
||||
|
||||
// Honor
|
||||
/(?:honor)([-\w ]+)[;\)]/i
|
||||
], [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]], [
|
||||
|
||||
// Huawei
|
||||
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
||||
], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [
|
||||
/(?:huawei|honor)([-\w ]+)[;\)]/i,
|
||||
/(?:huawei)([-\w ]+)[;\)]/i,
|
||||
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
||||
], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [
|
||||
|
||||
@@ -595,7 +600,7 @@
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [
|
||||
|
||||
// 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-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
||||
], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [
|
||||
/sony tablet [ps]/i,
|
||||
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
||||
@@ -661,13 +666,28 @@
|
||||
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Ulefone'], [TYPE, MOBILE]], [
|
||||
|
||||
// Energizer
|
||||
/; (energy ?\w+)(?: bui|\))/i,
|
||||
/; energizer ([\w ]+)(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Energizer'], [TYPE, MOBILE]], [
|
||||
|
||||
// Cat
|
||||
/; cat (b35);/i,
|
||||
/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Cat'], [TYPE, MOBILE]], [
|
||||
|
||||
// Smartfren
|
||||
/((?:new )?andromax[\w- ]+)(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Smartfren'], [TYPE, MOBILE]], [
|
||||
|
||||
// Nothing
|
||||
/droid.+; (a(?:015|06[35]|142p?))/i
|
||||
], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [
|
||||
|
||||
// MIXED
|
||||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
|
||||
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
|
||||
/(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
|
||||
/(hp) ([\w ]+\w)/i, // HP iPAQ
|
||||
/(asus)-?(\w+)/i, // Asus
|
||||
/(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia
|
||||
@@ -676,6 +696,7 @@
|
||||
/(oppo) ?([\w ]+) bui/i // OPPO
|
||||
], [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
|
||||
@@ -809,7 +830,7 @@
|
||||
], [VERSION, [NAME, 'Blink']], [
|
||||
|
||||
/(presto)\/([\w\.]+)/i, // Presto
|
||||
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
|
||||
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna/Servo
|
||||
/ekioh(flow)\/([\w\.]+)/i, // Flow
|
||||
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
|
||||
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
|
||||
@@ -1236,14 +1257,21 @@
|
||||
headers = extensions; // case UAParser(ua, headers)
|
||||
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 (!(this instanceof UAParser)) {
|
||||
return new UAParser(ua, extensions, headers).getResult();
|
||||
}
|
||||
|
||||
var userAgent = typeof ua === STR_TYPE ? ua : // Passed user-agent string
|
||||
((NAVIGATOR && NAVIGATOR.userAgent) ? NAVIGATOR.userAgent : // navigator.userAgent
|
||||
(headers && headers[USER_AGENT] ? headers[USER_AGENT] : // User-Agent from passed headers
|
||||
((NAVIGATOR && NAVIGATOR.userAgent) ? NAVIGATOR.userAgent : // navigator.userAgent
|
||||
EMPTY)), // empty string
|
||||
|
||||
httpUACH = new UACHData(headers, true),
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
// Source: /src/main/ua-parser.js
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/* UAParser.js v2.0.0-rc.2
|
||||
Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
|
||||
AGPLv3 License *//*
|
||||
/* UAParser.js v2.0.0
|
||||
Copyright © 2012-2023 Faisal Salman <f@faisalman.com>
|
||||
UAParser.js PRO Enterprise License *//*
|
||||
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
|
||||
Supports browser & node.js environment.
|
||||
Demo : https://uaparser.dev
|
||||
@@ -21,7 +21,7 @@
|
||||
// Constants
|
||||
/////////////
|
||||
|
||||
var LIBVERSION = '2.0.0-rc.2',
|
||||
var LIBVERSION = '2.0.0',
|
||||
EMPTY = '',
|
||||
UNKNOWN = '?',
|
||||
FUNC_TYPE = 'function',
|
||||
@@ -74,6 +74,7 @@
|
||||
GOOGLE = 'Google',
|
||||
HUAWEI = 'Huawei',
|
||||
LENOVO = 'Lenovo',
|
||||
HONOR = 'Honor',
|
||||
LG = 'LG',
|
||||
MICROSOFT = 'Microsoft',
|
||||
MOTOROLA = 'Motorola',
|
||||
@@ -464,7 +465,7 @@
|
||||
// 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
|
||||
/(links) \(([\w\.]+)/i // Links
|
||||
/\b(links) \(([\w\.]+)/i // Links
|
||||
], [NAME, [VERSION, /_/g, '.']], [
|
||||
|
||||
/(cobalt)\/([\w\.]+)/i // Cobalt
|
||||
@@ -529,10 +530,14 @@
|
||||
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
||||
], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [
|
||||
|
||||
// Honor
|
||||
/(?:honor)([-\w ]+)[;\)]/i
|
||||
], [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]], [
|
||||
|
||||
// Huawei
|
||||
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
||||
], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [
|
||||
/(?:huawei|honor)([-\w ]+)[;\)]/i,
|
||||
/(?:huawei)([-\w ]+)[;\)]/i,
|
||||
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
||||
], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [
|
||||
|
||||
@@ -597,7 +602,7 @@
|
||||
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [
|
||||
|
||||
// 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-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
||||
], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [
|
||||
/sony tablet [ps]/i,
|
||||
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
||||
@@ -663,13 +668,28 @@
|
||||
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Ulefone'], [TYPE, MOBILE]], [
|
||||
|
||||
// Energizer
|
||||
/; (energy ?\w+)(?: bui|\))/i,
|
||||
/; energizer ([\w ]+)(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Energizer'], [TYPE, MOBILE]], [
|
||||
|
||||
// Cat
|
||||
/; cat (b35);/i,
|
||||
/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Cat'], [TYPE, MOBILE]], [
|
||||
|
||||
// Smartfren
|
||||
/((?:new )?andromax[\w- ]+)(?: bui|\))/i
|
||||
], [MODEL, [VENDOR, 'Smartfren'], [TYPE, MOBILE]], [
|
||||
|
||||
// Nothing
|
||||
/droid.+; (a(?:015|06[35]|142p?))/i
|
||||
], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [
|
||||
|
||||
// MIXED
|
||||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
|
||||
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
|
||||
/(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
|
||||
/(hp) ([\w ]+\w)/i, // HP iPAQ
|
||||
/(asus)-?(\w+)/i, // Asus
|
||||
/(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia
|
||||
@@ -678,6 +698,7 @@
|
||||
/(oppo) ?([\w ]+) bui/i // OPPO
|
||||
], [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
|
||||
@@ -811,7 +832,7 @@
|
||||
], [VERSION, [NAME, 'Blink']], [
|
||||
|
||||
/(presto)\/([\w\.]+)/i, // Presto
|
||||
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
|
||||
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna/Servo
|
||||
/ekioh(flow)\/([\w\.]+)/i, // Flow
|
||||
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
|
||||
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
|
||||
@@ -1238,14 +1259,21 @@
|
||||
headers = extensions; // case UAParser(ua, headers)
|
||||
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 (!(this instanceof UAParser)) {
|
||||
return new UAParser(ua, extensions, headers).getResult();
|
||||
}
|
||||
|
||||
var userAgent = typeof ua === STR_TYPE ? ua : // Passed user-agent string
|
||||
((NAVIGATOR && NAVIGATOR.userAgent) ? NAVIGATOR.userAgent : // navigator.userAgent
|
||||
(headers && headers[USER_AGENT] ? headers[USER_AGENT] : // User-Agent from passed headers
|
||||
((NAVIGATOR && NAVIGATOR.userAgent) ? NAVIGATOR.userAgent : // navigator.userAgent
|
||||
EMPTY)), // empty string
|
||||
|
||||
httpUACH = new UACHData(headers, true),
|
||||
|
||||
@@ -28,7 +28,7 @@ expectType<IBrowser>(browser);
|
||||
expectType<string | undefined>(browser.name);
|
||||
expectType<string | undefined>(browser.version);
|
||||
expectType<string | undefined>(browser.major);
|
||||
expectType<'crawler' | 'cli' | 'email' | 'fetcher' | 'inapp' | 'mediaplayer' | 'module' | undefined>(browser.type);
|
||||
expectType<'crawler' | 'cli' | 'email' | 'fetcher' | 'inapp' | 'mediaplayer' | 'library' | undefined>(browser.type);
|
||||
expectType<boolean>(browser.is(''));
|
||||
expectType<string>(browser.toString());
|
||||
expectType<IBrowser | PromiseLike<IBrowser>>(browser.withClientHints());
|
||||
|
||||
@@ -8,8 +8,8 @@ const clis = require('./specs/browser-clis.json');
|
||||
const crawlers = require('./specs/browser-crawlers.json');
|
||||
const emails = require('./specs/browser-emails.json');
|
||||
const fetchers = require('./specs/browser-fetchers.json');
|
||||
const modules = require('./specs/browser-modules.json');
|
||||
const { Bots, CLIs, Crawlers, Emails, Fetchers, Modules } = require('../src/extensions/ua-parser-extensions');
|
||||
const libraries = require('./specs/browser-libraries.json');
|
||||
const { Bots, CLIs, Crawlers, Emails, Fetchers, Libraries } = require('../src/extensions/ua-parser-extensions');
|
||||
|
||||
describe('Extensions', () => {
|
||||
[
|
||||
@@ -17,7 +17,7 @@ describe('Extensions', () => {
|
||||
['Crawlers', crawlers, Crawlers],
|
||||
['Emails', emails, Emails],
|
||||
['Fetchers', fetchers, Fetchers],
|
||||
['Modules', modules, Modules]
|
||||
['Libraries', libraries, Libraries]
|
||||
]
|
||||
.forEach((list) => {
|
||||
describe(list[0], () => {
|
||||
@@ -44,10 +44,10 @@ describe('Extensions', () => {
|
||||
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"});
|
||||
|
||||
const moduleParser = new UAParser(Modules);
|
||||
assert.deepEqual(moduleParser.setUA(axios).getBrowser(), {name: "axios", version: "1.3.5", major: "1", type: "module"});
|
||||
assert.deepEqual(moduleParser.setUA(jsdom).getBrowser(), {name: "jsdom", version: "20.0.3", major: "20", type: "module"});
|
||||
assert.deepEqual(moduleParser.setUA(scrapy).getBrowser(), {name: "Scrapy", version: "1.5.0", major: "1", type: "module"});
|
||||
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"});
|
||||
});
|
||||
|
||||
describe('Merge', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const assert = require('assert');
|
||||
const { UAParser } = require('../src/main/ua-parser');
|
||||
const { getDeviceVendor, isAppleSilicon, isBot, isChromeFamily } = require('../src/helpers/ua-parser-helpers');
|
||||
const { getDeviceVendor, isAppleSilicon, isAIBot, isBot, isChromeFamily } = require('../src/helpers/ua-parser-helpers');
|
||||
const { Bots, Emails } = require('../src/extensions/ua-parser-extensions');
|
||||
|
||||
describe('getDeviceVendor', () => {
|
||||
@@ -28,7 +28,23 @@ describe('isAppleSilicon', () => {
|
||||
const macIntel = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0';
|
||||
|
||||
assert.equal(isAppleSilicon(UAParser(macIntel)), false);
|
||||
assert.equal(isAppleSilicon(macIntel), false);
|
||||
assert.equal(isAppleSilicon(UAParser(macARM)), true);
|
||||
assert.equal(isAppleSilicon(macARM), true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isAIBot', () => {
|
||||
it('Can detect AI Bots', () => {
|
||||
|
||||
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';
|
||||
|
||||
assert.equal(isAIBot(UAParser(claudeBot, Bots)), true);
|
||||
assert.equal(isAIBot(claudeBot), true);
|
||||
assert.equal(isAIBot(firefox), false);
|
||||
assert.equal(isAIBot(searchGPT), true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,6 +62,11 @@ describe('isBot', () => {
|
||||
assert.equal(isBot(botParser.setUA(ahrefsBot).getResult()), true);
|
||||
assert.equal(isBot(botParser.setUA(scrapy).getResult()), true);
|
||||
assert.equal(isBot(botParser.setUA(thunderbird).getResult()), false);
|
||||
|
||||
assert.equal(isBot(ahrefsBot), true);
|
||||
assert.equal(isBot(firefox), false);
|
||||
assert.equal(isBot(scrapy), true);
|
||||
assert.equal(isBot(thunderbird), false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -57,5 +78,7 @@ describe('isChromeFamily', () => {
|
||||
|
||||
assert.equal(isChromeFamily(UAParser(edge)), true);
|
||||
assert.equal(isChromeFamily(UAParser(firefox)), false);
|
||||
assert.equal(isChromeFamily(edge), true);
|
||||
assert.equal(isChromeFamily(firefox), false);
|
||||
});
|
||||
});
|
||||
@@ -123,4 +123,21 @@ test.describe('withFeatureCheck() tests', () => {
|
||||
expect(uap).toHaveProperty('device.model', 'iPad');
|
||||
expect(uap).toHaveProperty('device.type', 'tablet');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('request.headers can be passed in form of a Headers object', () => {
|
||||
|
||||
test('Headers automatically converted into a plain key-value object', async ({ page }) => {
|
||||
await page.addInitScript(() => {
|
||||
Object.defineProperty(window, 'req', {
|
||||
value : {
|
||||
headers: new Headers([["User-Agent", "myBrowser/1.0"]])
|
||||
}
|
||||
});
|
||||
});
|
||||
await page.goto(localHtml);
|
||||
// @ts-ignore
|
||||
const uap = await page.evaluate(() => UAParser(req.headers));
|
||||
expect(uap.ua).toBe('myBrowser/1.0');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,6 +9,36 @@
|
||||
"type" : "cli"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ELinks",
|
||||
"ua" : "ELinks/0.11.4-3-lite (textmode; Debian; Linux 2.6.26-1-686 i686;",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ELinks",
|
||||
"version" : "0.11.4-3-lite",
|
||||
"type" : "cli"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ELinks",
|
||||
"ua" : "ELinks (0.11.3; Linux 2.6.23-hardened-r4 i686; 166x55)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ELinks",
|
||||
"version" : "0.11.3",
|
||||
"type" : "cli"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HTTPie",
|
||||
"ua" : "HTTPie/0.9.9",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "HTTPie",
|
||||
"version" : "0.9.9",
|
||||
"type" : "cli"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "lynx",
|
||||
"ua" : "Lynx 2.8.8dev.3",
|
||||
|
||||
@@ -1,4 +1,44 @@
|
||||
[
|
||||
{
|
||||
"desc" : "360Spider",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "360Spider",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AdsBot Mobile Web",
|
||||
"ua" : "AdsBot-Google (+http://www.google.com/adsbot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "AdsBot-Google",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AdsBot Mobile Web",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; AdsBot-Google-Mobile; +http://www.google.com/mobile/adsbot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "AdsBot-Google-Mobile",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AdSense",
|
||||
"ua" : "Mediapartners-Google",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mediapartners-Google",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AhrefsBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)",
|
||||
@@ -9,6 +49,26 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "AI2Bot",
|
||||
"ua" : "Mozilla/5.0 (compatible) AI2Bot (+https://www.allenai.org/crawler)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "AI2Bot",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "aiHitBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; aiHitBot/2.9; +https://www.aihitdata.com/about)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "aiHitBot",
|
||||
"version" : "2.9",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Applebot",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B410 Safari/600.1.4 (Applebot/0.1;+http://www.apple.com/go/applebot)",
|
||||
@@ -49,6 +109,16 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "CCBot",
|
||||
"ua" : "CCBot/1.0 (+https://commoncrawl.org/bot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "CCBot",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Coc Coc Bot (web)",
|
||||
"ua" : "Mozilla/5.0 (compatible; coccocbot-web/1.0; +http://help.coccoc.com/searchengine)",
|
||||
@@ -79,6 +149,26 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "DataForSEO",
|
||||
"ua" : "Mozilla/5.0 (compatible; DataForSeoBot; +https://dataforseo.com/dataforseo-bot)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "DataForSeoBot",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Diffbot",
|
||||
"ua" : "Diffbot/0.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Diffbot",
|
||||
"version" : "0.1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Dotbot",
|
||||
"ua" : "Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)",
|
||||
@@ -89,6 +179,16 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Exabot",
|
||||
"ua" : "Mozilla/5.0 (compatible; Exabot/3.0; +http://www.exabot.com/go/robot)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Exabot",
|
||||
"version" : "3.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "FacebookBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; FacebookBot/1.0; +https://developers.facebook.com/docs/sharing/webmasters/facebookbot/",
|
||||
@@ -99,6 +199,26 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "FacebookExternalHit",
|
||||
"ua" : "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "facebookexternalhit",
|
||||
"version" : "1.1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "FacebookExternalHit",
|
||||
"ua" : "facebookcatalog/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "facebookcatalog",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Googlebot-Video",
|
||||
"ua" : "Googlebot-Video/1.0",
|
||||
@@ -109,6 +229,106 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Googlebot",
|
||||
"ua" : "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Googlebot",
|
||||
"version" : "2.1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Googlebot Image",
|
||||
"ua" : "Googlebot-Image/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Googlebot-Image",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Googlebot Video",
|
||||
"ua" : "Googlebot-Video/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Googlebot-Video",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Googlebot News",
|
||||
"ua" : "Googlebot-News/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Googlebot-News",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Storebot",
|
||||
"ua" : "Storebot-Google/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Storebot-Google",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google InspectionTool",
|
||||
"ua" : "Mozilla/5.0 (compatible; Google-InspectionTool/1.0;)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Google-InspectionTool",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "GoogleOther",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GoogleOther) Chrome/41.0.2272.96 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "GoogleOther",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "GoogleOther-Image",
|
||||
"ua" : "GoogleOther-Image/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "GoogleOther-Image",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "GoogleOther-Video",
|
||||
"ua" : "GoogleOther-Video/1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "GoogleOther-Video",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google-Safety",
|
||||
"ua" : "Google-Safety",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Google-Safety",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "GPTBot",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.0; +https://openai.com/gptbot)",
|
||||
@@ -119,6 +339,56 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Archive.org Bot",
|
||||
"ua" : "ia_archiver/8.1 (Windows 2000 1.9; en-US;)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ia_archiver",
|
||||
"version" : "8.1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Archive.org Bot",
|
||||
"ua" : "Mozilla/5.0 (compatible; archive.org_bot/3.3.0 +https://archive.org/details/archive.org_bot)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "archive.org_bot",
|
||||
"version" : "3.3.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ImagesiftBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; ImagesiftBot; +imagesift.com)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ImagesiftBot",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "magpie-crawler",
|
||||
"ua" : "magpie-crawler/1.1 (robots-txt-checker; +http://www.brandwatch.net)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "magpie-crawler",
|
||||
"version" : "1.1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Meta-ExternalAgent",
|
||||
"ua" : "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "meta-externalagent",
|
||||
"version" : "1.1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "MJ12bot",
|
||||
"ua" : "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)",
|
||||
@@ -126,6 +396,37 @@
|
||||
{
|
||||
"name" : "MJ12bot",
|
||||
"version" : "v1.4.8",
|
||||
"major" : "1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "MojeekBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; MojeekBot/0.11; +https://www.mojeek.com/bot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "MojeekBot",
|
||||
"version" : "0.11",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Omgili",
|
||||
"ua" : "omgili/0.5 +https://omgili.com",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "omgili",
|
||||
"version" : "0.5",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Omgilibot",
|
||||
"ua" : "omgilibot/0.3 +http://www.omgili.com/Crawler.html",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "omgilibot",
|
||||
"version" : "0.3",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
@@ -139,6 +440,36 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PerplexityBot",
|
||||
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "PerplexityBot",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PetalBot",
|
||||
"ua" : "Mozilla/5.0 (compatible;PetalBot; +https://webmaster.petalsearch.com/site/petalbot) ",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "PetalBot",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PetalBot",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 7.0;) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; PetalBot;+https://webmaster.petalsearch.com/site/petalbot) ",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "PetalBot",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "SemrushBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html)",
|
||||
@@ -149,6 +480,56 @@
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "SeznamBot",
|
||||
"ua" : "Mozilla/5.0 (compatible; SeznamBot/4.0-RC1; +http://napoveda.seznam.cz/seznambot-intro/)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "SeznamBot",
|
||||
"version" : "4.0-RC1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Teoma",
|
||||
"ua" : "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Teoma",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Timpibot",
|
||||
"ua" : "Timpibot/0.8 (+http://www.timpi.io)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Timpibot",
|
||||
"version" : "0.8",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "TurnitinBot",
|
||||
"ua" : "TurnitinBot (https://turnitin.com/robot/crawlerinfo.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "TurnitinBot",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "VelenPublicWebCrawler",
|
||||
"ua" : "Mozilla/5.0 (compatible; VelenPublicWebCrawler/1.0; +https://velen.io)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "VelenPublicWebCrawler",
|
||||
"version" : "1.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Yahoo! Japan",
|
||||
"ua" : "Y!J-BRW/1.0 (https://www.yahoo-help.jp/app/answers/detail/p/595/a_id/42716)",
|
||||
@@ -168,5 +549,45 @@
|
||||
"version" : "3.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Yeti",
|
||||
"ua" : "Mozilla/5.0 (compatible; Yeti/1.1; +http://naver.me/spd)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Yeti",
|
||||
"version" : "1.1",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YisouSpider",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 YisouSpider/5.0 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YisouSpider",
|
||||
"version" : "5.0",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YisouSpider",
|
||||
"ua" : "YisouSpider",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YisouSpider",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "YouBot",
|
||||
"ua" : "YouBot (+http://www.you.com)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "YouBot",
|
||||
"version" : "undefined",
|
||||
"type" : "crawler"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,4 +1,134 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Airmail",
|
||||
"ua" : "Airmail 1.0 rv:148 (Macintosh; Mac OS X 10.8.3; en_BE)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Airmail",
|
||||
"version" : "1.0",
|
||||
"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",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "BlueMail",
|
||||
"version" : "0.10.31",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "BlueMail",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A405 BlueMail iOS",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "BlueMail",
|
||||
"version" : "iOS",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Evolution",
|
||||
"ua" : "Evolution/3.52.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Evolution",
|
||||
"version" : "3.52.3",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "eM Client",
|
||||
"ua" : "eMClient/9.2.2157.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "eMClient",
|
||||
"version" : "9.2.2157.0",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Foxmail",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 foxmail/7.2.15.80",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "foxmail",
|
||||
"version" : "7.2.15.80",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "KMail",
|
||||
"ua" : "KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; )",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "KMail",
|
||||
"version" : "4.14.10",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "KMail2",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) kmail2/5.7.3 Safari/534.34",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "kmail2",
|
||||
"version" : "5.7.3",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Kontact",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) kontact/4.13.3 Safari/534.34",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "kontact",
|
||||
"version" : "4.13.3",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Outlook",
|
||||
"ua" : "Microsoft Office/16.0 (Windows NT 10.0; Microsoft Outlook 16.0.5431; Pro)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Microsoft Outlook",
|
||||
"version" : "16.0.5431",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Microsoft Outlook for Mac",
|
||||
"ua" : "MacOutlook/14.7.1.161129 (Intel Mac OS X 10.9.6)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "MacOutlook",
|
||||
"version" : "14.7.1.161129",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "NaverMailApp",
|
||||
"ua" : "NaverMailApp/2.1.23 (Android 10; SM-N960N)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "NaverMailApp",
|
||||
"version" : "2.1.23",
|
||||
"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",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Sparrow",
|
||||
"version" : "1043.1",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Thunderbird",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0",
|
||||
@@ -8,5 +138,25 @@
|
||||
"version" : "78.13.0",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Yahoo! Mail",
|
||||
"ua" : "YahooMobile/1.0 (mail; 3.0.5.1311380); (Linux; U; Android 4.0.3; htc_runnymede Build/ICE_CREAM_SANDWICH_MR1);",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Yahoo",
|
||||
"version" : "3.0.5.1311380",
|
||||
"type" : "email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Yahoo! Mail",
|
||||
"ua" : "YahooMobileMail/1.0 (Android Mail; 1.3.10) (supersonic;HTC;PC36100;2.3.5/GRJ90) ",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Yahoo",
|
||||
"version" : "1.3.10",
|
||||
"type" : "email"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -29,6 +29,76 @@
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "DuckAssistBot",
|
||||
"ua" : "DuckAssistBot/1.2; (+http://duckduckgo.com/duckassistbot.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "DuckAssistBot",
|
||||
"version" : "1.2",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google FeedFetcher",
|
||||
"ua" : "FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "FeedFetcher-Google",
|
||||
"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)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Google-Read-Aloud",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Read Aloud - Desktop agent",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36 (compatible; Google-Read-Aloud; +https://support.google.com/webmasters/answer/1061943)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Google-Read-Aloud",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Publisher Center",
|
||||
"ua" : "GoogleProducer; (+https://developers.google.com/search/docs/crawling-indexing/google-producer)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "GoogleProducer",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Google Site Verifier",
|
||||
"ua" : "Mozilla/5.0 (compatible; Google-Site-Verification/1.0)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Google-Site-Verification",
|
||||
"version" : "1.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Meta-ExternalFetcher",
|
||||
"ua" : "meta-externalfetcher/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "meta-externalfetcher",
|
||||
"version" : "1.1",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rogerbot",
|
||||
"ua" : "Mozilla/5.0 (compatible; rogerBot/1.0; UrlCrawler; http://www.seomoz.org/dp/rogerbot)",
|
||||
@@ -48,5 +118,15 @@
|
||||
"version" : "2.0",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Vercelbot",
|
||||
"ua" : "Vercelbot (+https://vercel.com)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Vercelbot",
|
||||
"version" : "undefined",
|
||||
"type" : "fetcher"
|
||||
}
|
||||
}
|
||||
]
|
||||
62
test/specs/browser-libraries.json
Normal file
62
test/specs/browser-libraries.json
Normal file
@@ -0,0 +1,62 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Axios",
|
||||
"ua" : "axios/1.7.2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "axios",
|
||||
"version" : "1.7.2",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Java",
|
||||
"ua" : "Java/1.6.0_14",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Java",
|
||||
"version" : "1.6.0_14",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "jsdom",
|
||||
"ua" : "Mozilla/5.0 (unknown OS) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "jsdom",
|
||||
"version" : "11.12.0",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Python urllib",
|
||||
"ua" : "Python-urllib/2.6",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Python-urllib",
|
||||
"version" : "2.6",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Python requests",
|
||||
"ua" : "python-requests/2.32",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "python-requests",
|
||||
"version" : "2.32",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Scrapy",
|
||||
"ua" : "Scrapy/1.5.0 (+https://scrapy.org)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Scrapy",
|
||||
"version" : "1.5.0",
|
||||
"type" : "library"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,12 +0,0 @@
|
||||
[
|
||||
{
|
||||
"desc" : "Scrapy",
|
||||
"ua" : "Scrapy/1.5.0 (+https://scrapy.org)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Scrapy",
|
||||
"version" : "1.5.0",
|
||||
"type" : "module"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -8,6 +8,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Advan M4",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0; ADVAN M4 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36 OPR/28.0.2254.119214",
|
||||
"expect": {
|
||||
"vendor": "ADVAN",
|
||||
"model": "M4",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Advan S40",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; ADVAN S40 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Mobile Safari/537.36 EdgA/79.0.309.58",
|
||||
"expect": {
|
||||
"vendor": "ADVAN",
|
||||
"model": "S40",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Advan Sketsa 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; ADVAN 1011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ADVAN",
|
||||
"model": "1011",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ASUS Nexus 7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 7 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36",
|
||||
@@ -215,6 +242,42 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Cat B15Q",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; B15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Cat",
|
||||
"model": "B15Q",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Cat B35",
|
||||
"ua": "Mozilla/5.0 (Mobile; CAT B35; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5.1",
|
||||
"expect": {
|
||||
"vendor": "Cat",
|
||||
"model": "B35",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Cat S22 Flip",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; S22 FLIP Build/RKQ1.210416.002) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.6422.165 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Cat",
|
||||
"model": "S22 FLIP",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Cat S62 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; S62 Pro Build/RKQ1.210406.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/94.0.4606.85 Mobile Safari/537.36 GSA/12.34.17.23.arm64",
|
||||
"expect": {
|
||||
"vendor": "Cat",
|
||||
"model": "S62 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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",
|
||||
@@ -233,6 +296,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Energizer Energy 400",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; Energy400 Build/MRA58K test-keys; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.158 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/172.0.0.66.93;]",
|
||||
"expect": {
|
||||
"vendor": "Energizer",
|
||||
"model": "Energy400",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Energizer Energy 400S",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; Energy 400S Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.85 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Energizer",
|
||||
"model": "Energy 400S",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Energizer Ultimate 65G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; Energizer Ultimate 65G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Energizer",
|
||||
"model": "Ultimate 65G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Fairphone 1U",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; FP1U Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
@@ -669,7 +759,7 @@
|
||||
"desc": "Huawei Honor 6A",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; DLI-L22 Build/HONORDLI-L22; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.116 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/252.0.0.22.355;]",
|
||||
"expect": {
|
||||
"vendor": "Huawei",
|
||||
"vendor": "Honor",
|
||||
"model": "DLI-L22",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -678,7 +768,7 @@
|
||||
"desc": "Huawei Honor 7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; PLK-L01 Build/HONORPLK-L01; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Huawei",
|
||||
"vendor": "Honor",
|
||||
"model": "PLK-L01",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -687,7 +777,7 @@
|
||||
"desc": "Huawei 10 Lite",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; HRY-LX1 Build/HONORHRY-LX1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Huawei",
|
||||
"vendor": "Honor",
|
||||
"model": "HRY-LX1",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -782,6 +872,42 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "IMO FEEL A2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; IMO FEEL A2 Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/49.0.2623.105 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "IMO",
|
||||
"model": "FEEL A2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "IMO Q2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; IMO Q2 Build/LMY47D; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/65.0.3325.109 Mobile Safari/537.36 GSA/7.22.24.21.arm",
|
||||
"expect": {
|
||||
"vendor": "IMO",
|
||||
"model": "Q2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "IMO S2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; IMO S2 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.162 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "IMO",
|
||||
"model": "S2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "IMO Tab X9",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.3; id-id; IMO TAB X9 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "IMO",
|
||||
"model": "TAB X9",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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",
|
||||
@@ -1151,6 +1277,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Micromax Bharat 2 Plus",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 7.0; en-US; Micromax Q402Plus Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.12.9.1226 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Micromax",
|
||||
"model": "Q402Plus",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Micromax Canvas Infinity",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 7.1.2; en-US; Micromax HS2 Build/N2G47H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/13.2.0.1296 (SpeedMode) U4/1.0 UCWEB/2.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Micromax",
|
||||
"model": "HS2",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Micromax In 1b",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 10; Micromax E7533 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.101 Mobile Safari/537.36 OPR/54.0.2254.56148",
|
||||
"expect": {
|
||||
"vendor": "Micromax",
|
||||
"model": "E7533",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Microsoft Lumia 950",
|
||||
"ua": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586",
|
||||
@@ -1907,6 +2060,42 @@
|
||||
"type": "xr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Polytron Prime 7 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 7.0; POLYTRON_P552 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/64.0.3282.137 Mobile Safari/537.36 OPR/50.0.2254.149182",
|
||||
"expect": {
|
||||
"vendor": "POLYTRON",
|
||||
"model": "P552",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Polytron Rocket T1",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 5.0; en-US; POLYTRON R2501 Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/13.1.2.1293 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "POLYTRON",
|
||||
"model": "R2501",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Polytron Rocket T6",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; POLYTRON R2509) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.92 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "POLYTRON",
|
||||
"model": "R2509",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Polytron Zap 6 Posh",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 5.1; in-ID; POLYTRON_4G501 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.10.0.1163 UCTurbo/1.9.9.900 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "POLYTRON",
|
||||
"model": "4G501",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Roku",
|
||||
"ua": "Mozilla/5.0 (Roku) AppleWebKit/537.36 (KHTML, like Gecko) Web/1.1 Safari/537.36",
|
||||
@@ -2357,6 +2546,33 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Smartfren Andromax L",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; Andromax B26D2H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Smartfren",
|
||||
"model": "Andromax B26D2H",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Smartfren Andromax G2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Smartfren Andromax AD9A1H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.83 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Smartfren",
|
||||
"model": "Andromax AD9A1H",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Smartfren New Andromax I",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.2; id-id; New Andromax-i Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Smartfren",
|
||||
"model": "New Andromax-i",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "SONY Xperia 1 III",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; A101SO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Mobile Safari/537.36",
|
||||
|
||||
@@ -89,6 +89,15 @@
|
||||
"version" : "2.8.149"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Servo",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Servo/1.0 Firefox/111.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Servo",
|
||||
"version" : "1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Tasman",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; PPC Mac OS X 10.4.7; Tasman 1.0)",
|
||||
|
||||
Reference in New Issue
Block a user