mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 22:52:16 +03:00
Compare commits
92 Commits
0.7.39
...
2.0.0-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d168b75a3a | ||
|
|
6e26e38247 | ||
|
|
3cb567c154 | ||
|
|
f76d8983ca | ||
|
|
22eae9f70c | ||
|
|
f2e4b242ce | ||
|
|
153831d2ed | ||
|
|
072a82b87b | ||
|
|
15d17e97a1 | ||
|
|
df9144b493 | ||
|
|
a519d2b879 | ||
|
|
102dc51683 | ||
|
|
1a806453f9 | ||
|
|
3d5c70457e | ||
|
|
a74ebeb82e | ||
|
|
4c77c5ef21 | ||
|
|
9102871dea | ||
|
|
1653d376ca | ||
|
|
29fb85658a | ||
|
|
c3be7326b8 | ||
|
|
5a26ac146e | ||
|
|
35c2b91534 | ||
|
|
feefb81cd0 | ||
|
|
0ac5028137 | ||
|
|
1b17315935 | ||
|
|
f92bb9ef65 | ||
|
|
f659659500 | ||
|
|
6c58ac39cd | ||
|
|
432a2ee72d | ||
|
|
c2f17004b8 | ||
|
|
f5af76a2b3 | ||
|
|
99baf60d50 | ||
|
|
46f38adb83 | ||
|
|
ff26813708 | ||
|
|
e62cded083 | ||
|
|
2fb0c72898 | ||
|
|
801c2409b3 | ||
|
|
a8951ec282 | ||
|
|
07c9e36ebe | ||
|
|
407b23262c | ||
|
|
16b416d9ea | ||
|
|
05747dba37 | ||
|
|
625ece73e2 | ||
|
|
e01663b48f | ||
|
|
59d8d836c2 | ||
|
|
b385a73340 | ||
|
|
4711805a1c | ||
|
|
5d2acd8fe7 | ||
|
|
359cbecd32 | ||
|
|
1e80cf3533 | ||
|
|
b09878934f | ||
|
|
30de983043 | ||
|
|
894512c72f | ||
|
|
4af26c7a5e | ||
|
|
a6c85d0148 | ||
|
|
7a4fe6f454 | ||
|
|
af65fd6960 | ||
|
|
ba28d33d51 | ||
|
|
82567c28ab | ||
|
|
e70d09a1f8 | ||
|
|
3af8e1e272 | ||
|
|
172f57ffea | ||
|
|
33f02099d1 | ||
|
|
33df5dc698 | ||
|
|
49d6422ebd | ||
|
|
a1d816ae21 | ||
|
|
0097b211db | ||
|
|
6b3fc3e0f1 | ||
|
|
08436ce4f5 | ||
|
|
df1a1c7bb4 | ||
|
|
31f94f3a51 | ||
|
|
6821276669 | ||
|
|
41f8d76968 | ||
|
|
c78346d3b4 | ||
|
|
f8dde65d54 | ||
|
|
60d3a2fbbc | ||
|
|
aff5a209f8 | ||
|
|
5672a2e15c | ||
|
|
3c3c03ceeb | ||
|
|
d99ff741f4 | ||
|
|
9ee128ae2b | ||
|
|
c6b4c867d5 | ||
|
|
f1449a8202 | ||
|
|
18730452f2 | ||
|
|
5ea9f0ec16 | ||
|
|
03b0a5afa6 | ||
|
|
d03c74d6b7 | ||
|
|
f18516c9c8 | ||
|
|
746ac28f94 | ||
|
|
96fb3a5ed5 | ||
|
|
6c34c3d4fa | ||
|
|
7fbb93c99a |
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -1,6 +1,6 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
github: faisalman
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: ua-parser-js
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
|
||||
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
10
.github/ISSUE_TEMPLATE/custom.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/custom.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Custom issue template
|
||||
about: Describe this issue template's purpose here.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
78
.github/workflows/analysis-codeql.yml
vendored
Normal file
78
.github/workflows/analysis-codeql.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: CodeQL Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master"]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
- cron: '15 6 * * 0'
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
# - name: Autobuild
|
||||
# uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
# - run: |
|
||||
# echo "Run, Build Application using script"
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
20
.github/workflows/analysis-dependency.yml
vendored
Normal file
20
.github/workflows/analysis-dependency.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Dependency Review Action
|
||||
#
|
||||
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
|
||||
#
|
||||
# Source repository: https://github.com/actions/dependency-review-action
|
||||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
||||
name: Dependency Analysis
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@v2
|
||||
72
.github/workflows/analysis-scorecard.yml
vendored
Normal file
72
.github/workflows/analysis-scorecard.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: OpenSSF's Scorecard Analysis
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '45 2 * * 4'
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
# Uncomment the permissions below if installing in a private repository.
|
||||
# contents: read
|
||||
# actions: read
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecard on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
22
.github/workflows/publish-github-packages.yml
vendored
Normal file
22
.github/workflows/publish-github-packages.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Publish to GitHub Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18.x'
|
||||
registry-url: https://npm.pkg.github.com/
|
||||
- run: npm ci
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
23
.github/workflows/publish-npm-packages.yml
vendored
Normal file
23
.github/workflows/publish-npm-packages.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Publish to NPM
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: npm install -g npm
|
||||
- run: npm ci
|
||||
- run: npm publish --provenance --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: ua-parser-js-run-test
|
||||
name: UAParser.js CI-Test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
@@ -12,9 +12,12 @@ jobs:
|
||||
matrix:
|
||||
arch: [amd64, ppc64le]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- name: Run the test
|
||||
run: |
|
||||
npm install
|
||||
npm run test-ci
|
||||
npm ci
|
||||
npx playwright install
|
||||
npm test
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,7 @@
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
playwright-report/
|
||||
test-results/
|
||||
|
||||
### vim ###
|
||||
.*.s[a-w][a-z]
|
||||
|
||||
18
.travis.yml
18
.travis.yml
@@ -1,18 +0,0 @@
|
||||
arch:
|
||||
- amd64
|
||||
- ppc64le
|
||||
language: node_js
|
||||
node_js:
|
||||
- stable
|
||||
- lts/*
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
sudo: false
|
||||
|
||||
script: npm run test-ci
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ua-parser-js",
|
||||
"version": "0.7.39",
|
||||
"version": "2.0.0-alpha.3",
|
||||
"authors": [
|
||||
"Faisal Salman <f@faisalman.com>"
|
||||
],
|
||||
|
||||
57
changelog.md
57
changelog.md
@@ -1,37 +1,38 @@
|
||||
# UAParser.js Changelog
|
||||
|
||||
# Version 2.0
|
||||
- What's breaking:
|
||||
- Browser detection on mobile device: `"Chrome" => "Mobile Chrome"`, `"Firefox" => "Mobile Firefox"`
|
||||
- OS detection: `"Mac OS" => "macOS"`, `"Chromium OS" => "Chrome OS"`
|
||||
- What's new:
|
||||
- Add some new methods in result object:
|
||||
- Add support for client hints: `withClientHints()`
|
||||
- Add support for feature detection: `withFeatureCheck()`
|
||||
- Utility for easy comparison: `is()`
|
||||
- Utility to print full-name: `toString()`
|
||||
- Add support for ES module `import { UAParser } from 'ua-parser-js'`
|
||||
- Provide Enums `'ua-parser-js/enums'`
|
||||
- Provide Extensions `'ua-parser-js/extensions'`
|
||||
- Provide Helpers `'ua-parser-js/helpers'`
|
||||
|
||||
## Version 2.0.0-alpha.3
|
||||
- Add `withFeatureCheck()` method
|
||||
- Add `isFrozenUA()` method in `helpers` submodule
|
||||
- Add `MediaPlayers` & `Modules` in `extensions` submodule
|
||||
- Fix issue with ESM import
|
||||
|
||||
## Version 2.0.0-alpha.2
|
||||
- Fix browser result always returning Chromium when using `withClientHints()`
|
||||
- Fix infinite-loop when await-ing `withClientHints()` in non-client-hints browser
|
||||
|
||||
## Version 2.0.0-alpha.1
|
||||
- Initial work on new major version
|
||||
|
||||
|
||||
# Version 0.7 / 1.0
|
||||
|
||||
Version 1.0.x is basically the equivalent of version 0.7.x. See [#536](https://github.com/faisalman/ua-parser-js/issues/536) for the reason behind this confusion.
|
||||
|
||||
## Version 0.7.39 / 1.0.39
|
||||
- Add new feature: executable command using `npx ua-parser-js "[INSERT-UA-HERE]"`
|
||||
- Add new browser: Helio, Pico Browser, Wolvic
|
||||
- Add new device vendor: itel, Nothing, TCL
|
||||
- Improve browser detection: ICEBrowser, Klar, QQBrowser, Quark, Rekonq, Sleipnir
|
||||
- Improve device detection: Xiaomi Pro, Amazon Echo Show, Samsung Galaxy Watch
|
||||
- Removed from browser: Viera
|
||||
|
||||
## Version 0.7.38 / 1.0.38
|
||||
- Fix error on getOS() when userAgentData.platform is undefined
|
||||
- Add new browser: Opera GX, Twitter
|
||||
- Improve browser detection: DuckDuckGo
|
||||
- Improve device detection: OPPO Pad, Oculus Quest
|
||||
|
||||
## Version 0.7.37 / 1.0.37
|
||||
- Fix misidentified WebView token as device model
|
||||
- Increase UA_MAX_LENGTH to 500
|
||||
- Add new browser: Alipay, Klarna, Smart Lenovo Browser, Vivo Browser
|
||||
- Add new device: Ulefone
|
||||
- Improve device detection: Realme, Xiaomi Redmi
|
||||
- Rename browser: Avant, Baidu, Samsung Internet, Sogou Explorer, Sogou Mobile, WeChat
|
||||
|
||||
## Version 0.7.36 / 1.0.36
|
||||
- Add new browser: Snapchat
|
||||
- Add new devices: Infinix, Tecno
|
||||
- Improve device detection: Amazon Fire TV, Xiaomi POCO
|
||||
- Improve OS detection: iOS
|
||||
|
||||
## Version 0.7.35 / 1.0.35
|
||||
- Fix result from user-supplied user-agent being altered
|
||||
- Add new browser: Heytap, TikTok
|
||||
|
||||
6
dist/ua-parser.min.js
vendored
6
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/ua-parser.pack.js
vendored
6
dist/ua-parser.pack.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2012-2024 Faisal Salman <<f@faisalman.com>>
|
||||
Copyright (c) 2012-2023 Faisal Salman <<f@faisalman.com>>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
3775
package-lock.json
generated
Normal file
3775
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: 'faisalman:ua-parser-js',
|
||||
version: '0.7.39',
|
||||
version: '2.0.0-alpha.3',
|
||||
summary: 'Lightweight JavaScript-based user-agent string parser',
|
||||
git: 'https://github.com/faisalman/ua-parser-js.git',
|
||||
documentation: 'readme.md'
|
||||
|
||||
82
package.json
82
package.json
@@ -1,27 +1,22 @@
|
||||
{
|
||||
"title": "UAParser.js",
|
||||
"name": "ua-parser-js",
|
||||
"version": "0.7.39",
|
||||
"version": "2.0.0-alpha.3",
|
||||
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
|
||||
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment",
|
||||
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment",
|
||||
"keywords": [
|
||||
"ua-parser-js",
|
||||
"user-agent",
|
||||
"client-hints",
|
||||
"parser",
|
||||
"browser",
|
||||
"engine",
|
||||
"os",
|
||||
"device",
|
||||
"mobile",
|
||||
"cpu",
|
||||
"platform",
|
||||
"detect",
|
||||
"javascript",
|
||||
"jquery",
|
||||
"typescript",
|
||||
"node-js",
|
||||
"client-hints"
|
||||
"jquery-plugin",
|
||||
"ecosystem:jquery"
|
||||
],
|
||||
"homepage": "https://uaparser.dev",
|
||||
"homepage": "https://github.com/faisalman/ua-parser-js",
|
||||
"contributors": [
|
||||
"Aamir Poonawalla <aamir@urx.com>",
|
||||
"Admas <mollases@users.noreply.github.com>",
|
||||
@@ -146,39 +141,51 @@
|
||||
"Yun Young-jin <yupmin@yupmin-office-macmini.local>",
|
||||
"Zach Bjornson <zbbjornson@gmail.com>"
|
||||
],
|
||||
"main": "src/ua-parser.js",
|
||||
"type": "commonjs",
|
||||
"main": "src/main/ua-parser.js",
|
||||
"module": "src/main/ua-parser.mjs",
|
||||
"browser": "dist/ua-parser.pack.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"require": "./src/main/ua-parser.js",
|
||||
"import": "./src/main/ua-parser.mjs"
|
||||
},
|
||||
"./enums": {
|
||||
"require": "./src/enums/ua-parser-enums.js",
|
||||
"import": "./src/enums/ua-parser-enums.mjs"
|
||||
},
|
||||
"./extensions": {
|
||||
"require": "./src/extensions/ua-parser-extensions.js",
|
||||
"import": "./src/extensions/ua-parser-extensions.mjs"
|
||||
},
|
||||
"./helpers": {
|
||||
"require": "./src/helpers/ua-parser-helpers.js",
|
||||
"import": "./src/helpers/ua-parser-helpers.mjs"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src"
|
||||
],
|
||||
"bin": "./script/cli.js",
|
||||
"scripts": {
|
||||
"build": "uglifyjs src/ua-parser.js -o dist/ua-parser.min.js --comments '/^ UA/' && uglifyjs src/ua-parser.js -o dist/ua-parser.pack.js --comments '/^ UA/' --compress --mangle",
|
||||
"test": "jshint src/ua-parser.js && mocha -R nyan test/test.js",
|
||||
"test-ci": "jshint src/ua-parser.js && mocha -R spec test/test.js",
|
||||
"verup": "node ./node_modules/verup",
|
||||
"version": "node ./node_modules/verup 0"
|
||||
},
|
||||
"verup": {
|
||||
"files": [
|
||||
"bower.json",
|
||||
"package.js",
|
||||
"src/ua-parser.js"
|
||||
],
|
||||
"regs": [
|
||||
"^((?:\\$|(\\s*\\*\\s*@)|(\\s*(?:var|,)?\\s+))(?:LIBVERSION|version)[\\s\\:='\"]+)([0-9]+(?:\\.[0-9]+){2,2})",
|
||||
"^(\\/?\\s?\\*.*v)([0-9]+(?:\\.[0-9]+){2,2})"
|
||||
]
|
||||
"build": "./script/build-dist.sh && ./script/build-module.js",
|
||||
"fuzz": "jazzer ./test/jazzer-fuzz-test.js --sync",
|
||||
"test": "./script/test-all.sh",
|
||||
"test:jshint": "jshint src && jshint script",
|
||||
"test:lockfile-lint": "npx lockfile-lint -p package-lock.json",
|
||||
"test:mocha": "mocha -R list test/mocha*js",
|
||||
"test:playwright": "playwright test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/parser": "7.15.8",
|
||||
"@babel/traverse": "7.15.4",
|
||||
"jshint": "~2.12.0",
|
||||
"@jazzer.js/core": "^1.4.0",
|
||||
"@playwright/test": "~1.32.2",
|
||||
"jshint": "~2.13.6",
|
||||
"mocha": "~8.2.0",
|
||||
"requirejs": "^2.3.2",
|
||||
"requirejs": "2.3.2",
|
||||
"safe-regex": "^2.1.1",
|
||||
"uglify-js": "~3.12.0",
|
||||
"verup": "^1.3.x"
|
||||
"uglify-js": "~3.12.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -190,11 +197,12 @@
|
||||
},
|
||||
"directories": {
|
||||
"dist": "dist",
|
||||
"script": "script",
|
||||
"src": "src",
|
||||
"test": "test"
|
||||
},
|
||||
"bugs": "https://github.com/faisalman/ua-parser-js/issues",
|
||||
"demo": "https://uaparser.dev",
|
||||
"demo": "https://faisalman.github.io/ua-parser-js",
|
||||
"download": "https://raw.github.com/faisalman/ua-parser-js/master/dist/ua-parser.min.js",
|
||||
"funding": [
|
||||
{
|
||||
@@ -206,8 +214,8 @@
|
||||
"url": "https://paypal.me/faisalman"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/faisalman"
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/faisalman"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
494
readme.md
494
readme.md
@@ -3,23 +3,26 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/faisalman/ua-parser-js"><img src="https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master"></a>
|
||||
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/v/ua-parser-js.svg"></a>
|
||||
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/dw/ua-parser-js.svg"></a>
|
||||
<a href="https://www.jsdelivr.com/package/npm/ua-parser-js"><img src="https://data.jsdelivr.com/v1/package/npm/ua-parser-js/badge"></a>
|
||||
<a href="https://cdnjs.com/libraries/UAParser.js"><img src="https://img.shields.io/cdnjs/v/UAParser.js.svg"></a>
|
||||
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/dw/ua-parser-js?color=red&logo=npm&label=NPM%20DOWNLOADS&style=for-the-badge"></a>
|
||||
<a href="https://www.jsdelivr.com/package/npm/ua-parser-js"><img src="https://img.shields.io/jsdelivr/gh/hw/faisalman/ua-parser-js?logo=jsdelivr&style=for-the-badge"></a>
|
||||
<a href="https://github.com/faisalman/ua-parser-js"><img src="https://img.shields.io/github/stars/faisalman/ua-parser-js?color=yellow&logo=github&style=for-the-badge"></a>
|
||||
<a href="https://bundlephobia.com/package/ua-parser-js@1.0.35"><img src="https://img.shields.io/bundlephobia/minzip/ua-parser-js?logo=hackthebox&logoColor=white&style=for-the-badge"/></a>
|
||||
<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors"><img src="https://img.shields.io/github/contributors/faisalman/ua-parser-js?color=purple&logo=githubsponsors&style=for-the-badge"></a>
|
||||
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/v/ua-parser-js.svg?logo=npm&color=red&style=for-the-badge"></a>
|
||||
<a href="https://cdnjs.com/libraries/UAParser.js"><img src="https://img.shields.io/cdnjs/v/UAParser.js.svg?color=orange&style=for-the-badge"></a>
|
||||
<img src="https://img.shields.io/ossf-scorecard/github.com/faisalman/ua-parser-js?label=openssf%20scorecard&style=for-the-badge">
|
||||
</p>
|
||||
|
||||
# UAParser.js
|
||||
|
||||
JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB minified, ~6KB gzipped) that can be used either in browser (client-side) or node.js (server-side).
|
||||
JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client-Hints data that can be used either in browser (client-side) or node.js (server-side).
|
||||
|
||||
* Author : Faisal Salman <<f@faisalman.com>>
|
||||
* Demo : https://uaparser.dev
|
||||
* Demo : https://faisalman.github.io/ua-parser-js
|
||||
* Source : https://github.com/faisalman/ua-parser-js
|
||||
* Documentation :
|
||||
* v1 : https://github.com/faisalman/ua-parser-js/tree/1.0.39#documentation
|
||||
* v2 : https://docs.uaparser.dev
|
||||
* v1 : https://github.com/faisalman/ua-parser-js/tree/1.0.35#documentation
|
||||
* v2 : https://faisalman.github.io/ua-parser-js-docs/v2
|
||||
|
||||
***
|
||||
|
||||
@@ -36,49 +39,53 @@ JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model fro
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="https://uaparser.dev"><img src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/uap-header.png"></a>
|
||||
|
||||
---
|
||||
|
||||
# Version 2.0
|
||||
What's new & breaking, please read [CHANGELOG](changelog.md) before upgrading.
|
||||
|
||||
# Documentation
|
||||
### UAParser([user-agent][,extensions])
|
||||
typeof `user-agent` "string".
|
||||
|
||||
typeof `extensions` "array".
|
||||
|
||||
In The Browser environment you dont need to pass the user-agent string to the function, you can just call the funtion and it should automatically get the string from the `window.navigator.userAgent`, but that is not the case in nodejs. The user-agent string must be passed in nodejs for the function to work.
|
||||
Usually you can find the user agent in:
|
||||
`request.headers["user-agent"]`.
|
||||
### `UAParser([user-agent:string][,extensions:object][,headers:object(since@2.0)]):IData`
|
||||
|
||||
In browser environment you don't need to pass the user-agent string to the function, as it should automatically get the string from the `window.navigator.userAgent`. Whereas in nodejs environment, the user-agent string must be passed in order for the function to work (usually you can find the user-agent in: `request.headers["user-agent"]`).
|
||||
|
||||
## Constructor
|
||||
When you call `UAParser` with the `new` keyword `UAParser` will return a new instance with an empty result object, you have to call one of the available methods to get the information from the user-agent string.
|
||||
|
||||
#### * `new UAParser([user-agent:string][,extensions:object][,headers:object(since@2.0)]):UAParser`
|
||||
|
||||
When you call `UAParser` with the `new` keyword, `UAParser` will return a new instance with an empty result object, you have to call one of the available methods to get the information from the user-agent string.
|
||||
Like so:
|
||||
* `new UAParser([uastring][,extensions])`
|
||||
|
||||
```js
|
||||
let parser = new UAParser("user-agent"); // you need to pass the user-agent for nodejs
|
||||
let parser = new UAParser("your user-agent here"); // you need to pass the user-agent for nodejs
|
||||
console.log(parser); // {}
|
||||
let parserResults = parser.getResult();
|
||||
console.log(parserResults);
|
||||
/** {
|
||||
"ua": "",
|
||||
"browser": {},
|
||||
"engine": {},
|
||||
"os": {},
|
||||
"device": {},
|
||||
"cpu": {}
|
||||
} */
|
||||
/*
|
||||
{
|
||||
ua : "",
|
||||
browser : {},
|
||||
engine : {},
|
||||
os : {},
|
||||
device : {},
|
||||
cpu : {}
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
When you call UAParser without the `new` keyword, it will automatically call `getResult()` function and return the parsed results.
|
||||
* `UAParser([uastring][,extensions])`
|
||||
* returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
||||
#### * `UAParser([user-agent:string][,extensions:object][,headers:object(since@2.0)]):IData`
|
||||
|
||||
## Methods
|
||||
When you call `UAParser` without the `new` keyword, it will automatically call `getResult()` function and return the parsed results.
|
||||
|
||||
```sh
|
||||
returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
||||
```
|
||||
|
||||
## `UAParser`:
|
||||
|
||||
#### Methods table
|
||||
The methods are self explanatory, here's a small overview on all the available methods:
|
||||
* `getResult()` - returns all function object calls, user-agent string, browser info, cpu, device, engine, os:
|
||||
* `getResult()` - returns all function object calls, user-agent string, browser info, cpu, device, engine, os:
|
||||
`{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`.
|
||||
|
||||
* `getBrowser()` - returns the browser name and version.
|
||||
@@ -87,44 +94,47 @@ The methods are self explanatory, here's a small overview on all the available m
|
||||
* `getOS()` - returns the running operating system name and version.
|
||||
* `getCPU()` - returns CPU architectural design name.
|
||||
* `getUA()` - returns the user-agent string.
|
||||
* `setUA(user-agent)` - set a custom user-agent to be parsed.
|
||||
|
||||
* `setUA(ua)` - set a custom user-agent to be parsed.
|
||||
|
||||
---
|
||||
|
||||
* `getResult()`
|
||||
* returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
||||
|
||||
* `getBrowser()`
|
||||
* returns `{ name: '', version: '' }`
|
||||
#### * `getResult():IData`
|
||||
|
||||
```sh
|
||||
returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
||||
```
|
||||
|
||||
#### * `getBrowser():IData`
|
||||
|
||||
```sh
|
||||
returns `{ name: '', version: '' }`
|
||||
|
||||
# Possible 'browser.name':
|
||||
2345Explorer, 360 Browser, Alipay, Amaya, Android Browser, Arora, Avant, Avast,
|
||||
AVG, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera,
|
||||
Chrome Headless, Chrome WebView, Chrome, Chromium, Cobalt, Comodo Dragon, Dillo,
|
||||
2345Explorer, 360 Browser, Amaya, Android Browser, Arora, Avant, Avast, AVG,
|
||||
BIDUBrowser, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera,
|
||||
[Mobile] Chrome [Headless/WebView], Chromium, Cobalt, Comodo Dragon, Dillo,
|
||||
Dolphin, Doris, DuckDuckGo, Edge, Electron, Epiphany, Facebook, Falkon, Fennec,
|
||||
Firebird, Firefox [Focus/Reality], Flock, Flow, GSA, GoBrowser, Helio, Heytap,
|
||||
Huawei Browser, iCab, ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon,
|
||||
Iceweasel, Instagram, Iridium, Iron, Jasmine, Kakao[Story/Talk], K-Meleon,
|
||||
Kindle, Klar, Klarna, Konqueror, LBBROWSER, Line, LinkedIn, Links, Lunascape,
|
||||
Lynx, MIUI Browser, Maemo, Maxthon, Midori, Minimo, Mobile Safari, Mosaic,
|
||||
Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Obigo,
|
||||
Oculus Browser, OmniWeb, Opera Coast, Opera [GX/Mini/Mobi/Tablet], PaleMoon,
|
||||
PhantomJS, Phoenix, Pico Browser, Polaris, Puffin, QQ, QQBrowser, QQBrowserLite,
|
||||
Quark, QupZilla, RockMelt, Safari, Sailfish Browser, Samsung Internet, SeaMonkey,
|
||||
Silk, Skyfire, Sleipnir, Slim, SlimBrowser, Smart Lenovo Browser, Snapchat,
|
||||
Sogou [Explorer/Mobile], Swiftfox, Tesla, TikTok, Tizen Browser, Twitter,
|
||||
UCBrowser, UP.Browser, Vivaldi, Vivo Browser, w3m, Waterfox, WeChat, Weibo,
|
||||
Whale Browser, Wolvic, Yandex, ...
|
||||
Firebird, [Mobile] Firefox [Focus/Reality], Flock, Flow, GSA, GoBrowser, HeyTap,
|
||||
Huawei Browser, ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon, Iceweasel,
|
||||
Instagram, Iridium, Iron, Jasmine, Kakao[Story/Talk], K-Meleon, Kindle, Klar,
|
||||
Konqueror, LBBROWSER, Line, LinkedIn, Links, Lunascape, Lynx, MIUI Browser,
|
||||
Maemo Browser, Maemo, Maxthon, MetaSr Midori, Minimo, Mosaic, Mozilla, NetFront,
|
||||
NetSurf, Netfront, Netscape, NokiaBrowser, Obigo, Oculus Browser, OmniWeb,
|
||||
Opera Coast, Opera [Mini/Mobi/Tablet], PaleMoon, PhantomJS, Phoenix, Polaris,
|
||||
Puffin, QQ, QQBrowser, QQBrowserLite, Quark, QupZilla, RockMelt, [Mobile] Safari,
|
||||
Sailfish Browser, Samsung Browser, SeaMonkey, Silk, Skyfire, Sleipnir, Slim,
|
||||
SlimBrowser, Snapchat, Swiftfox, Tesla, TikTok, Tizen Browser, UCBrowser,
|
||||
UP.Browser, Viera, Vivaldi, Waterfox, WeChat, Weibo, Yandex, baidu, iCab, w3m,
|
||||
Whale Browser, ...
|
||||
|
||||
# 'browser.version' determined dynamically
|
||||
```
|
||||
|
||||
* `getDevice()`
|
||||
* returns `{ model: '', type: '', vendor: '' }`
|
||||
#### * `getDevice():IData`
|
||||
|
||||
```sh
|
||||
returns `{ model: '', type: '', vendor: '' }`
|
||||
|
||||
# Possible 'device.type':
|
||||
console, mobile, tablet, smarttv, wearable, embedded
|
||||
|
||||
@@ -137,19 +147,20 @@ console, mobile, tablet, smarttv, wearable, embedded
|
||||
|
||||
# Possible 'device.vendor':
|
||||
Acer, Alcatel, Amazon, Apple, Archos, ASUS, AT&T, BenQ, BlackBerry, Dell,
|
||||
Essential, Facebook, Fairphone, GeeksPhone, Google, HP, HTC, Huawei, Infinix,
|
||||
itel, Jolla, Kobo, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, Nintendo,
|
||||
Nokia, Nothing, Nvidia, OnePlus, OPPO, Ouya, Palm, Panasonic, Pebble, Polytron,
|
||||
Realme, RIM, Roku, Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, TCL, Tecno,
|
||||
Tesla, Ulefone, Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ...
|
||||
Essential, Facebook, Fairphone, GeeksPhone, Google, HP, HTC, Huawei, Infinix, Jolla,
|
||||
Kobo, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, Nintendo, Nokia, Nvidia,
|
||||
OnePlus, OPPO, Ouya, Palm, Panasonic, Pebble, Polytron, Realme, RIM, Roku, Samsung,
|
||||
Sharp, Siemens, Sony[Ericsson], Sprint, Tecno, Tesla, Vivo, Vodafone, Xbox, Xiaomi,
|
||||
Zebra, ZTE, ...
|
||||
|
||||
# 'device.model' determined dynamically
|
||||
```
|
||||
|
||||
* `getEngine()`
|
||||
* returns `{ name: '', version: '' }`
|
||||
#### * `getEngine():IData`
|
||||
|
||||
```sh
|
||||
returns `{ name: '', version: '' }`
|
||||
|
||||
# Possible 'engine.name'
|
||||
Amaya, Blink, EdgeHTML, Flow, Gecko, Goanna, iCab, KHTML, LibWeb, Links, Lynx,
|
||||
NetFront, NetSurf, Presto, Tasman, Trident, w3m, WebKit
|
||||
@@ -157,10 +168,11 @@ NetFront, NetSurf, Presto, Tasman, Trident, w3m, WebKit
|
||||
# 'engine.version' determined dynamically
|
||||
```
|
||||
|
||||
* `getOS()`
|
||||
* returns `{ name: '', version: '' }`
|
||||
#### * `getOS():IData`
|
||||
|
||||
```sh
|
||||
returns `{ name: '', version: '' }`
|
||||
|
||||
# Possible 'os.name'
|
||||
AIX, Amiga OS, Android[-x86], Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
|
||||
Contiki, Fedora, Firefox OS, FreeBSD, Debian, Deepin, DragonFly, elementary OS,
|
||||
@@ -168,28 +180,270 @@ Fuchsia, Gentoo, GhostBSD, GNU, Haiku, HarmonyOS, HP-UX, Hurd, iOS, Joli, KaiOS,
|
||||
Linpus, Linspire,Linux, Mac OS, Maemo, Mageia, Mandriva, Manjaro, MeeGo, Minix,
|
||||
Mint, Morph OS, NetBSD, NetRange, NetTV, Nintendo, OpenBSD, OpenVMS, OS/2, Palm,
|
||||
PC-BSD, PCLinuxOS, Plan9, PlayStation, QNX, Raspbian, RedHat, RIM Tablet OS,
|
||||
RISC OS, Sabayon, Sailfish, SerenityOS, Series40, Slackware, Solaris, SUSE,
|
||||
Symbian, Tizen, Ubuntu, Unix, VectorLinux, Viera, watchOS, WebOS,
|
||||
Windows [Phone/Mobile], Zenwalk, ...
|
||||
RISC OS, Sabayon, Sailfish, SerenityOS, Series40, Slackware, Solaris, SUSE, Symbian,
|
||||
Tizen, Ubuntu, Unix, VectorLinux, Viera, watchOS, WebOS, Windows [Phone/Mobile],
|
||||
Zenwalk, ...
|
||||
|
||||
# 'os.version' determined dynamically
|
||||
```
|
||||
|
||||
* `getCPU()`
|
||||
* returns `{ architecture: '' }`
|
||||
#### * `getCPU():IData`
|
||||
|
||||
```sh
|
||||
returns `{ architecture: '' }`
|
||||
|
||||
# Possible 'cpu.architecture'
|
||||
68k, amd64, arm[64/hf], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc,
|
||||
sparc[64]
|
||||
68k, amd64, arm[64/hf], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64]
|
||||
```
|
||||
|
||||
* `getUA()`
|
||||
* returns UA string of current instance
|
||||
#### * `getUA():string`
|
||||
|
||||
```sh
|
||||
returns user-agent string of current instance
|
||||
```
|
||||
|
||||
#### * `setUA(ua:string):UAParser`
|
||||
|
||||
```sh
|
||||
set user-agent string to be parsed
|
||||
returns current instance
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## `IData`: `since@2.0`
|
||||
|
||||
#### Methods table
|
||||
The methods are self explanatory, here's a small overview on all the available methods:
|
||||
* `is(value)` - returns `true` if the passed value matches a value of current object, `false` otherwise
|
||||
* `toString()` - returns the full-name values of current object as a string
|
||||
* `withClientHints()` - returns an object with re-updated data from client hints
|
||||
* `withFeatureCheck()` - returns an object with re-updated data from feature detection
|
||||
|
||||
---
|
||||
|
||||
#### * `is(value:string):boolean`
|
||||
|
||||
```js
|
||||
// Is just a shorthand comparison to check whether the value of specified item equals one of its properties (in a case-insensitive way)
|
||||
// so that instead of write it using `==` operator like this:
|
||||
|
||||
let ua = UAParser();
|
||||
let device = ua.device;
|
||||
let os = ua.os;
|
||||
|
||||
if (device.type == "mobile" && os.name != "iOS") {}
|
||||
if (device.type == "smarttv" || device.vendor == "Samsung") {}
|
||||
|
||||
// we can also write the comparison above into as follow:
|
||||
|
||||
if (device.is("mobile") && !os.is("iOS")) {}
|
||||
if (device.is("SmartTV") || device.is("SaMsUnG")) {}
|
||||
|
||||
/*
|
||||
For device, properties will be checked in this particular order: type, model, vendor
|
||||
*/
|
||||
|
||||
// Another examples:
|
||||
|
||||
let uap = new UAParser('Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537');
|
||||
|
||||
uap.getBrowser().name; // "IEMobile"
|
||||
uap.getBrowser().is("IEMobile"); // true
|
||||
uap.getCPU().is("ARM"); // true
|
||||
|
||||
uap.getOS().name; // "Windows Phone"
|
||||
uap.getOS().is("Windows Phone"); // true
|
||||
|
||||
uap.getDevice(); // { vendor: "Nokia", model: "Lumia 635", type: "mobile" }
|
||||
uap.getResult().device; // { vendor: "Nokia", model: "Lumia 635", type: "mobile" }
|
||||
|
||||
let device = uap.getDevice();
|
||||
device.is("mobile"); // true
|
||||
device.is("Lumia 635"); // true
|
||||
device.is("Nokia"); // true
|
||||
device.is("iPhone"); // false
|
||||
uap.getResult().device.is("Nokia"); // true
|
||||
uap.getResult().device.model; // "Lumia 635"
|
||||
|
||||
uap.setUA("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36");
|
||||
|
||||
let browser = uap.getBrowser();
|
||||
browser.is("IEMobile"); // false
|
||||
browser.is("Chrome"); // true
|
||||
|
||||
uap.getResult().browser.is("Edge"); // false
|
||||
uap.getResult().os.name // "Mac OS"
|
||||
uap.getResult().os.is("Mac OS"); // true
|
||||
uap.getResult().os.version; // "10.6.8"
|
||||
|
||||
let engine = uap.getEngine();
|
||||
engine.is("Blink"); // true
|
||||
```
|
||||
|
||||
#### * `toString():string`
|
||||
|
||||
```js
|
||||
// Retrieve full-name values as a string
|
||||
|
||||
/*
|
||||
Values will be concatenated following this pattern:
|
||||
* browser : name + version
|
||||
* cpu : architecture
|
||||
* device : vendor + model
|
||||
* engine : name + version
|
||||
* os : name + version
|
||||
*/
|
||||
|
||||
// Usage examples
|
||||
|
||||
let uap = new UAParser('Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537');
|
||||
|
||||
uap.getDevice(); // {
|
||||
// vendor: "Nokia",
|
||||
// model: "Lumia 635",
|
||||
// type: "mobile"
|
||||
// }
|
||||
uap.getDevice().toString(); // "Nokia Lumia 635"
|
||||
|
||||
uap.getResult().os.name; // "Windows Phone"
|
||||
uap.getResult().os.version; // "8.1"
|
||||
uap.getResult().os.toString(); // "Windows Phone 8.1"
|
||||
|
||||
uap.setUA("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36");
|
||||
uap.getBrowser().name; // "Chrome"
|
||||
uap.getBrowser().version; // "28.0.1500.95"
|
||||
uap.getBrowser().major; // "28"
|
||||
uap.getBrowser().toString(); // "Chrome 28.0.1500.95"
|
||||
|
||||
let engine = uap.getEngine();
|
||||
engine.name; // "Blink"
|
||||
engine.version; // "28.0.1500.95"
|
||||
engine.toString(); // "Blink 28.0.1500.95"
|
||||
```
|
||||
|
||||
#### * `withClientHints():Promise<IData>|Thenable<IData>|IData`
|
||||
|
||||
Recently, Chrome limits the information exposed through user-agent and introduces a new experimental set of data called "client-hints". In browser-environment, obtaining the client-hints data via JavaScript must be done in an asynchronous way. In `UAParser` you can chain the result object from `get*` method with `withClientHints()` to also read the client-hints data from the browser and return the updated data as a `Promise`.
|
||||
|
||||
```js
|
||||
// client-side example
|
||||
(async function () {
|
||||
let ua = new UAParser();
|
||||
|
||||
// get browser data from user-agent only :
|
||||
let browser = ua.getBrowser();
|
||||
console.log('Using User-Agent: ', browser);
|
||||
|
||||
// get browser data from client-hints (with user-agent as fallback) :
|
||||
browser = await ua.getBrowser().withClientHints();
|
||||
console.log('Using Client-Hints: ', browser);
|
||||
|
||||
// alternatively :
|
||||
ua.getBrowser().withClientHints().then(function (browser) {
|
||||
console.log('Using Client-Hints: ', browser);
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
Along with `User-Agent` HTTP header, Chrome also sends this client-hints data by default under `Sec-CH-UA-*` HTTP headers in each request. In server-side development, you can capture this extra information by passing the `req.headers` to `UAParser()` (see examples below). When using `withClientHints()` in nodejs environment and browser without client-hints support (basically anything that's not Chromium-based), it will returns a new object with updated data.
|
||||
|
||||
```js
|
||||
// server-side example
|
||||
|
||||
// Suppose we got a request having these HTTP headers:
|
||||
const request = {
|
||||
headers : {
|
||||
'user-agent' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36',
|
||||
|
||||
'sec-ch-ua-mobile' : '?1',
|
||||
'sec-ch-ua-model' : 'Galaxy S3 Marketing',
|
||||
'sec-ch-ua-platform' : 'Android'
|
||||
}
|
||||
};
|
||||
|
||||
const result1 = UAParser(request.headers); // parse only "user-agent" header
|
||||
const result2 = UAParser(request.headers).withClientHints(); // update with "sec-ch-ua" headers
|
||||
|
||||
console.log(result1.os.name); // "Linux"
|
||||
console.log(result1.device.type); // undefined
|
||||
console.log(result1.device.model); // undefined
|
||||
|
||||
console.log(result2.os.name); // "Android"
|
||||
console.log(result2.device.type); // "mobile"
|
||||
console.log(result2.device.model); // "Galaxy S3 Marketing"
|
||||
|
||||
new UAParser(request.headers)
|
||||
.getBrowser()
|
||||
.withClientHints()
|
||||
.then((browser) => {
|
||||
console.log(browser.toString()); // Chrome 110.0.0.0
|
||||
});
|
||||
```
|
||||
|
||||
#### * `withFeatureCheck():IData`
|
||||
|
||||
This method allows us to examine other features beyond `navigator.userAgent` to further improve detection of the following:
|
||||
- browser : Brave (check for `navigator.isBrave`)
|
||||
- device : iPad (check for `navigator.standalone` & `navigator.maxTouchPoints`)
|
||||
|
||||
```js
|
||||
// suppose this code runs on iPad
|
||||
const withoutFeatureCheck = UAParser();
|
||||
const withFeatureCheck = UAParser().withFeatureCheck();
|
||||
|
||||
console.log(withoutFeatureCheck.device); // { vendor : "Apple", model : "Macintosh", type : undefined }
|
||||
console.log(withFeatureCheck.device); // { vendor : "Apple", model : "iPad", type : "tablet" }
|
||||
```
|
||||
|
||||
## Extending Regex
|
||||
|
||||
If you want to detect something that's not currently provided by UAParser.js (eg: `bots`, specific apps, etc), you can pass a list of regexes to extend internal UAParser.js regexes with your own.
|
||||
|
||||
* `UAParser([uastring,] extensions [,headers:object(since@2.0)])`
|
||||
|
||||
```js
|
||||
// Example:
|
||||
const myOwnListOfBrowsers = [
|
||||
[/(mybrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION, ['type', 'bot']]
|
||||
];
|
||||
|
||||
const myUA = 'Mozilla/5.0 MyBrowser/1.3';
|
||||
|
||||
let myParser = new UAParser({ browser: myOwnListOfBrowsers });
|
||||
|
||||
console.log(myParser.setUA(myUA).getBrowser()); // {name: "MyBrowser", version: "1.3", major: "1", type : "bot"}
|
||||
console.log(myParser.getBrowser().is('bot')); // true
|
||||
|
||||
// Another example:
|
||||
const myOwnListOfDevices = [
|
||||
[/(mytab) ([\w ]+)/i], [UAParser.DEVICE.VENDOR, UAParser.DEVICE.MODEL, [UAParser.DEVICE.TYPE, UAParser.DEVICE.TABLET]],
|
||||
[/(myphone)/i], [UAParser.DEVICE.VENDOR, [UAParser.DEVICE.TYPE, UAParser.DEVICE.MOBILE]]
|
||||
];
|
||||
|
||||
const myUA2 = 'Mozilla/5.0 MyTab 14 Pro Max';
|
||||
|
||||
let myParser2 = new UAParser({
|
||||
browser: myOwnListOfBrowsers,
|
||||
device: myOwnListOfDevices
|
||||
});
|
||||
|
||||
console.log(myParser2.setUA(myUA2).getDevice()); // {vendor: "MyTab", model: "14 Pro Max", type: "tablet"}
|
||||
```
|
||||
|
||||
Some basic extensions (although not very complete at the moment) can also be found under `ua-parser-js/extensions` submodule.
|
||||
|
||||
```js
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
import { Emails } from 'ua-parser-js/extensions';
|
||||
|
||||
const browser = new UAParser(Emails)
|
||||
.setUA('Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0')
|
||||
.getBrowser();
|
||||
|
||||
console.log(browser.name); // Thunderbird
|
||||
```
|
||||
|
||||
* `setUA(uastring)`
|
||||
* set UA string to be parsed
|
||||
* returns current instance
|
||||
|
||||
# Usage
|
||||
|
||||
@@ -202,8 +456,8 @@ sparc[64]
|
||||
<script src="ua-parser.min.js"></script>
|
||||
<script>
|
||||
|
||||
var parser = new UAParser();
|
||||
console.log(parser.getResult());
|
||||
var uap = new UAParser();
|
||||
console.log(uap.getResult());
|
||||
/*
|
||||
/// This will print an object structured like this:
|
||||
{
|
||||
@@ -211,7 +465,7 @@ sparc[64]
|
||||
browser: {
|
||||
name: "",
|
||||
version: "",
|
||||
major: "" //@deprecated
|
||||
major: ""
|
||||
},
|
||||
engine: {
|
||||
name: "",
|
||||
@@ -235,10 +489,10 @@ sparc[64]
|
||||
|
||||
// Now let's try a custom user-agent string as an example
|
||||
var uastring1 = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/11.10 Chromium/15.0.874.106 Chrome/15.0.874.106 Safari/535.2";
|
||||
parser.setUA(uastring1);
|
||||
var result = parser.getResult();
|
||||
uap.setUA(uastring1);
|
||||
var result = uap.getResult();
|
||||
// You can also use UAParser constructor directly without having to create an instance:
|
||||
// var result = UAParser(uastring1);
|
||||
// var ua = UAParser(uastring1);
|
||||
|
||||
console.log(result.browser); // {name: "Chromium", version: "15.0.874.106"}
|
||||
console.log(result.device); // {model: undefined, type: undefined, vendor: undefined}
|
||||
@@ -249,14 +503,14 @@ sparc[64]
|
||||
|
||||
// Do some other tests
|
||||
var uastring2 = "Mozilla/5.0 (compatible; Konqueror/4.1; OpenBSD) KHTML/4.1.4 (like Gecko)";
|
||||
console.log(parser.setUA(uastring2).getBrowser().name); // "Konqueror"
|
||||
console.log(parser.getOS()); // {name: "OpenBSD", version: undefined}
|
||||
console.log(parser.getEngine()); // {name: "KHTML", version: "4.1.4"}
|
||||
console.log(uap.setUA(uastring2).getBrowser().name); // "Konqueror"
|
||||
console.log(uap.getOS()); // {name: "OpenBSD", version: undefined}
|
||||
console.log(uap.getEngine()); // {name: "KHTML", version: "4.1.4"}
|
||||
|
||||
var uastring3 = 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11 (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11';
|
||||
console.log(parser.setUA(uastring3).getDevice().model); // "PlayBook"
|
||||
console.log(parser.getOS()) // {name: "RIM Tablet OS", version: "1.0.0"}
|
||||
console.log(parser.getBrowser().name); // "Safari"
|
||||
console.log(uap.setUA(uastring3).getDevice().model); // "PlayBook"
|
||||
console.log(uap.getOS()) // {name: "RIM Tablet OS", version: "1.0.0"}
|
||||
console.log(uap.getBrowser().name); // "Safari"
|
||||
|
||||
</script>
|
||||
</head>
|
||||
@@ -275,11 +529,24 @@ $ npm install ua-parser-js
|
||||
|
||||
```js
|
||||
var http = require('http');
|
||||
var parser = require('ua-parser-js');
|
||||
var uap = require('ua-parser-js');
|
||||
|
||||
http.createServer(function (req, res) {
|
||||
// get user-agent header
|
||||
var ua = parser(req.headers['user-agent']);
|
||||
var ua = uap(req.headers['user-agent']);
|
||||
|
||||
/* // BEGIN since@2.0 - you can also pass client-hints data to UAParser
|
||||
|
||||
// note: only works in secure context (https:// or localhost or file://)
|
||||
|
||||
var getHighEntropyValues = 'Sec-CH-UA-Full-Version-List, Sec-CH-UA-Mobile, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version, Sec-CH-UA-Arch, Sec-CH-UA-Bitness';
|
||||
res.setHeader('Accept-CH', getHighEntropyValues);
|
||||
res.setHeader('Critical-CH', getHighEntropyValues);
|
||||
|
||||
var ua = uap(req.headers).withClientHints();
|
||||
|
||||
// END since@2.0 */
|
||||
|
||||
// write the result as response
|
||||
res.end(JSON.stringify(ua, null, ' '));
|
||||
})
|
||||
@@ -288,6 +555,19 @@ http.createServer(function (req, res) {
|
||||
console.log('Server running at http://127.0.0.1:1337/');
|
||||
```
|
||||
|
||||
## Using ES Modules
|
||||
|
||||
```js
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
|
||||
const { browser, cpu, device } = UAParser('Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2a1pre) Gecko/20090928 Firefox/3.5 Maemo Browser 1.4.1.22 RX-51 N900');
|
||||
|
||||
console.log(browser.name); // Maemo Browser
|
||||
console.log(cpu.is('arm')); // true
|
||||
console.log(device.is('mobile')); // true
|
||||
console.log(device.model); // N900
|
||||
```
|
||||
|
||||
## Using TypeScript
|
||||
|
||||
```sh
|
||||
@@ -323,28 +603,6 @@ console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4
|
||||
$('body').addClass('ua-browser-' + $.ua.browser.name + ' ua-devicetype-' + $.ua.device.type);
|
||||
```
|
||||
|
||||
## Using npx
|
||||
|
||||
UAParser.js can be executed as a command that returns the parsed data in JSON format:
|
||||
|
||||
```sh
|
||||
$ npx ua-parser-js "[INSERT-UA-HERE]"
|
||||
```
|
||||
|
||||
## Using Extension
|
||||
|
||||
* `UAParser([uastring,] extensions)`
|
||||
|
||||
```js
|
||||
// Example:
|
||||
var myOwnListOfBrowsers = [
|
||||
[/(mybrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]
|
||||
];
|
||||
var myParser = new UAParser({ browser: myOwnListOfBrowsers });
|
||||
var myUA = 'Mozilla/5.0 MyBrowser/1.3';
|
||||
console.log(myParser.setUA(myUA).getBrowser()); // {name: "MyBrowser", version: "1.3"}
|
||||
```
|
||||
|
||||
# Development
|
||||
|
||||
## Backers & Sponsors
|
||||
@@ -374,7 +632,7 @@ Made with [contributors-img](https://contrib.rocks).
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2012-2024 Faisal Salman <<f@faisalman.com>>
|
||||
Copyright (c) 2012-2023 Faisal Salman <<f@faisalman.com>>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
13
script/build-dist.sh
Executable file
13
script/build-dist.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SRC_PATH="src/main/ua-parser.js"
|
||||
MIN_PATH="dist/ua-parser.min.js"
|
||||
PACK_PATH="dist/ua-parser.pack.js"
|
||||
|
||||
# minified
|
||||
echo "Generate ${MIN_PATH}"
|
||||
uglifyjs $SRC_PATH -o $MIN_PATH --comments "/^ UA/"
|
||||
|
||||
# packed
|
||||
echo "Generate ${PACK_PATH}"
|
||||
uglifyjs $SRC_PATH -o $PACK_PATH --comments "/^ UA/" --compress --mangle
|
||||
57
script/build-module.js
Executable file
57
script/build-module.js
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env node
|
||||
/* jshint esversion: 6 */
|
||||
const fs = require('fs');
|
||||
const PATH = {
|
||||
main : {
|
||||
src : 'src/main/ua-parser.js',
|
||||
dest : 'src/main/ua-parser.mjs',
|
||||
title : ''
|
||||
},
|
||||
enums : {
|
||||
src : 'src/enums/ua-parser-enums.js',
|
||||
dest :'src/enums/ua-parser-enums.mjs',
|
||||
title : 'enums'
|
||||
},
|
||||
extensions : {
|
||||
src : 'src/extensions/ua-parser-extensions.js',
|
||||
dest : 'src/extensions/ua-parser-extensions.mjs',
|
||||
title : 'extensions'
|
||||
},
|
||||
helpers : {
|
||||
src : 'src/helpers/ua-parser-helpers.js',
|
||||
dest : 'src/helpers/ua-parser-helpers.mjs',
|
||||
title : 'helpers'
|
||||
}
|
||||
};
|
||||
const generateMJS = (module, replacers) => {
|
||||
const { src, dest, title } = PATH[module];
|
||||
let text = fs.readFileSync(src, 'utf-8');
|
||||
replacers.forEach(replacer => {
|
||||
text = text.replace(replacer[0], replacer[1]);
|
||||
});
|
||||
|
||||
console.log(`Generate ${dest}`);
|
||||
|
||||
fs.writeFileSync(dest,
|
||||
`// Generated ESM version of UAParser.js ${title}
|
||||
// DO NOT EDIT THIS FILE!
|
||||
// Source: /${src}
|
||||
|
||||
${text}`, 'utf-8');
|
||||
};
|
||||
|
||||
// ua-parser.mjs
|
||||
generateMJS('main', [
|
||||
[/\(func[\s\S]+strict\';/ig, ''],
|
||||
[/esversion\: 3/ig, 'esversion: 6'],
|
||||
[/\/[\/\s]+export[\s\S]+/ig,'export {UAParser};']
|
||||
]);
|
||||
|
||||
// ua-parser-enum.mjs
|
||||
generateMJS('enums', [[/module\.exports =/ig, 'export']]);
|
||||
|
||||
// ua-parser-extension.mjs
|
||||
generateMJS('extensions', [[/module\.exports =/ig, 'export']]);
|
||||
|
||||
// ua-parser-helpers.mjs
|
||||
generateMJS('helpers', [[/module\.exports =/ig, 'export']]);
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const UAParser = require('ua-parser-js');
|
||||
console.log(JSON.stringify(process.argv.slice(2).map(ua => UAParser(ua)), null, 4));
|
||||
26
script/test-all.sh
Executable file
26
script/test-all.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo '
|
||||
- run build
|
||||
'
|
||||
npm run build || exit 1
|
||||
|
||||
echo '
|
||||
- lint js code
|
||||
'
|
||||
npm run test:jshint || exit 1
|
||||
|
||||
echo '
|
||||
- test using mocha
|
||||
'
|
||||
npm run test:mocha || exit 1
|
||||
|
||||
echo '
|
||||
- test using playwright
|
||||
'
|
||||
npm run test:playwright || exit 1
|
||||
|
||||
echo '
|
||||
- lint lockfile
|
||||
'
|
||||
npm run test:lockfile-lint || exit 1
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report security issues to `f@faisalman.com`
|
||||
To report a security issue, please email `f@faisalman.com` with a description of the issue, reproducible steps to get the issue, affected versions, and, if known, mitigations for the issue.
|
||||
|
||||
If the issue is confirmed as a vulnerability, we will open a new security advisory draft in our GitHub's Security Advisory page [https://github.com/faisalman/ua-parser-js/security/advisories](https://github.com/faisalman/ua-parser-js/security/advisories) and acknowledge your contributions as part of it. This project follows a 90 days disclosure timeline.
|
||||
103
src/enums/ua-parser-enums.js
Normal file
103
src/enums/ua-parser-enums.js
Normal file
@@ -0,0 +1,103 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Enums for UAParser.js v2.0.0-alpha.3
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
MIT License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
const BrowserName = Object.freeze({
|
||||
CHROME : 'Chrome',
|
||||
EDGE : 'Edge',
|
||||
SAFARI : 'Safari',
|
||||
FIREFOX : 'Firefox',
|
||||
OPERA : 'Opera',
|
||||
MOBILE_CHROME : 'Mobile Chrome',
|
||||
MOBILE_SAFARI : 'Mobile Safari',
|
||||
MOBILE_FIREFOX : 'Mobile Firefox',
|
||||
ANDROID_BROWSER : 'Android Browser'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
|
||||
const CPUArch = Object.freeze({
|
||||
IA32 : 'ia32',
|
||||
AMD64 : 'amd64',
|
||||
IA64 : 'ia64',
|
||||
ARM : 'arm',
|
||||
ARM64 : 'arm64',
|
||||
ARMHF : 'armhf',
|
||||
_68K : '68k',
|
||||
AVR : 'avr',
|
||||
IRIX : 'irix',
|
||||
IRIX64 : 'irix64',
|
||||
MIPS : 'mips',
|
||||
MIPS64 : 'mips64',
|
||||
PPC : 'ppc',
|
||||
SPARC : 'sparc',
|
||||
SPARC64 : 'sparc64'
|
||||
});
|
||||
|
||||
const DeviceType = Object.freeze({
|
||||
MOBILE : 'mobile',
|
||||
TABLET : 'tablet',
|
||||
SMARTTV : 'smarttv',
|
||||
CONSOLE : 'console',
|
||||
WEARABLE: 'wearable',
|
||||
EMBEDDED: 'embedded'
|
||||
});
|
||||
|
||||
const DeviceVendor = Object.freeze({
|
||||
APPLE : 'Apple',
|
||||
SAMSUNG : 'Samsung',
|
||||
HUAWEI : 'Huawei',
|
||||
XIAOMI : 'Xiaomi',
|
||||
OPPO : 'OPPO',
|
||||
VIVO : 'Vivo',
|
||||
REALME : 'Realme',
|
||||
LENOVO : 'Lenovo',
|
||||
LG : 'LG'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
|
||||
const EngineName = Object.freeze({
|
||||
AMAYA : 'Amaya',
|
||||
BLINK : 'Blink',
|
||||
EDGEHTML: 'EdgeHTML',
|
||||
FLOW : 'Flow',
|
||||
GECKO : 'Gecko',
|
||||
GOANNA : 'Goanna',
|
||||
ICAB : 'iCab',
|
||||
LIBWEB : 'LibWeb',
|
||||
KHTML : 'KHTML',
|
||||
LINKS : 'Links',
|
||||
LYNX : 'Lynx',
|
||||
NETFRONT: 'NetFront',
|
||||
NETSURF : 'NetSurf',
|
||||
PRESTO : 'Presto',
|
||||
TASMAN : 'Tasman',
|
||||
TRIDENT : 'Trident',
|
||||
W3M : 'w3m',
|
||||
WEBKIT : 'WebKit'
|
||||
});
|
||||
|
||||
const OSName = Object.freeze({
|
||||
WINDOWS : 'Windows',
|
||||
LINUX : 'Linux',
|
||||
MACOS : 'macOS',
|
||||
IOS : 'iOS',
|
||||
ANDROID : 'Android'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
BrowserName,
|
||||
CPUArch,
|
||||
DeviceType,
|
||||
DeviceVendor,
|
||||
EngineName,
|
||||
OSName
|
||||
};
|
||||
107
src/enums/ua-parser-enums.mjs
Normal file
107
src/enums/ua-parser-enums.mjs
Normal file
@@ -0,0 +1,107 @@
|
||||
// Generated ESM version of UAParser.js enums
|
||||
// DO NOT EDIT THIS FILE!
|
||||
// Source: /src/enums/ua-parser-enums.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Enums for UAParser.js v2.0.0-alpha.3
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
MIT License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
const BrowserName = Object.freeze({
|
||||
CHROME : 'Chrome',
|
||||
EDGE : 'Edge',
|
||||
SAFARI : 'Safari',
|
||||
FIREFOX : 'Firefox',
|
||||
OPERA : 'Opera',
|
||||
MOBILE_CHROME : 'Mobile Chrome',
|
||||
MOBILE_SAFARI : 'Mobile Safari',
|
||||
MOBILE_FIREFOX : 'Mobile Firefox',
|
||||
ANDROID_BROWSER : 'Android Browser'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
|
||||
const CPUArch = Object.freeze({
|
||||
IA32 : 'ia32',
|
||||
AMD64 : 'amd64',
|
||||
IA64 : 'ia64',
|
||||
ARM : 'arm',
|
||||
ARM64 : 'arm64',
|
||||
ARMHF : 'armhf',
|
||||
_68K : '68k',
|
||||
AVR : 'avr',
|
||||
IRIX : 'irix',
|
||||
IRIX64 : 'irix64',
|
||||
MIPS : 'mips',
|
||||
MIPS64 : 'mips64',
|
||||
PPC : 'ppc',
|
||||
SPARC : 'sparc',
|
||||
SPARC64 : 'sparc64'
|
||||
});
|
||||
|
||||
const DeviceType = Object.freeze({
|
||||
MOBILE : 'mobile',
|
||||
TABLET : 'tablet',
|
||||
SMARTTV : 'smarttv',
|
||||
CONSOLE : 'console',
|
||||
WEARABLE: 'wearable',
|
||||
EMBEDDED: 'embedded'
|
||||
});
|
||||
|
||||
const DeviceVendor = Object.freeze({
|
||||
APPLE : 'Apple',
|
||||
SAMSUNG : 'Samsung',
|
||||
HUAWEI : 'Huawei',
|
||||
XIAOMI : 'Xiaomi',
|
||||
OPPO : 'OPPO',
|
||||
VIVO : 'Vivo',
|
||||
REALME : 'Realme',
|
||||
LENOVO : 'Lenovo',
|
||||
LG : 'LG'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
|
||||
const EngineName = Object.freeze({
|
||||
AMAYA : 'Amaya',
|
||||
BLINK : 'Blink',
|
||||
EDGEHTML: 'EdgeHTML',
|
||||
FLOW : 'Flow',
|
||||
GECKO : 'Gecko',
|
||||
GOANNA : 'Goanna',
|
||||
ICAB : 'iCab',
|
||||
LIBWEB : 'LibWeb',
|
||||
KHTML : 'KHTML',
|
||||
LINKS : 'Links',
|
||||
LYNX : 'Lynx',
|
||||
NETFRONT: 'NetFront',
|
||||
NETSURF : 'NetSurf',
|
||||
PRESTO : 'Presto',
|
||||
TASMAN : 'Tasman',
|
||||
TRIDENT : 'Trident',
|
||||
W3M : 'w3m',
|
||||
WEBKIT : 'WebKit'
|
||||
});
|
||||
|
||||
const OSName = Object.freeze({
|
||||
WINDOWS : 'Windows',
|
||||
LINUX : 'Linux',
|
||||
MACOS : 'macOS',
|
||||
IOS : 'iOS',
|
||||
ANDROID : 'Android'
|
||||
|
||||
// TODO : test!
|
||||
});
|
||||
|
||||
export {
|
||||
BrowserName,
|
||||
CPUArch,
|
||||
DeviceType,
|
||||
DeviceVendor,
|
||||
EngineName,
|
||||
OSName
|
||||
};
|
||||
248
src/extensions/ua-parser-extensions.js
Normal file
248
src/extensions/ua-parser-extensions.js
Normal file
@@ -0,0 +1,248 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Extensions for UAParser.js v2.0.0-alpha.3
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
MIT License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
const MODEL = 'model';
|
||||
const NAME = 'name';
|
||||
const TYPE = 'type';
|
||||
const VENDOR = 'vendor';
|
||||
const VERSION = 'version';
|
||||
const MOBILE = 'mobile';
|
||||
const TABLET = 'tablet';
|
||||
|
||||
const Apps = Object.freeze({
|
||||
browser : [
|
||||
[/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, 'app']]
|
||||
]
|
||||
});
|
||||
|
||||
const Bots = Object.freeze({
|
||||
browser : [
|
||||
// Googlebot / BingBot / MSNBot / FacebookBot
|
||||
[/((?:google|bing|msn|facebook)bot(?:[\-imagevdo]{0,6})|bingpreview)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'bot']],
|
||||
|
||||
// GPTBot - https://platform.openai.com/docs/gptbot
|
||||
[/(gptbot)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'bot']],
|
||||
|
||||
// Slackbot - https://api.slack.com/robots
|
||||
[/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i], [NAME, VERSION, [TYPE, 'bot']]
|
||||
]
|
||||
});
|
||||
|
||||
const CLIs = Object.freeze({
|
||||
browser : [
|
||||
// wget / curl / lynx
|
||||
[/(wget|curl|lynx)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'cli']]
|
||||
]
|
||||
});
|
||||
|
||||
const ExtraDevices = Object.freeze({
|
||||
device : [[
|
||||
/(nook)[\w ]+build\/(\w+)/i, // Nook
|
||||
/(dell) (strea[kpr\d ]*[\dko])/i, // Dell Streak
|
||||
/(le[- ]+pan)[- ]+(\w{1,9}) bui/i, // Le Pan Tablets
|
||||
/(trinity)[- ]*(t\d{3}) bui/i, // Trinity Tablets
|
||||
/(gigaset)[- ]+(q\w{1,9}) bui/i, // Gigaset Tablets
|
||||
/(vodafone) ([\w ]+)(?:\)| bui)/i // Vodafone
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
|
||||
/(u304aa)/i // AT&T
|
||||
], [MODEL, [VENDOR, 'AT&T'], [TYPE, MOBILE]], [
|
||||
|
||||
/\bsie-(\w*)/i // Siemens
|
||||
], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(rct\w+) b/i // RCA Tablets
|
||||
], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(venue[\d ]{2,7}) b/i // Dell Venue Tablets
|
||||
], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(q(?:mv|ta)\w+) b/i // Verizon Tablet
|
||||
], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i // Barnes & Noble Tablet
|
||||
], [MODEL, [VENDOR, 'Barnes & Noble'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(tm\d{3}\w+) b/i
|
||||
], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(k88) b/i // ZTE K Series Tablet
|
||||
], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(nx\d{3}j) b/i // ZTE Nubia
|
||||
], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(gen\d{3}) b.+49h/i // Swiss GEN Mobile
|
||||
], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(zur\d{3}) b/i // Swiss ZUR Tablet
|
||||
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
|
||||
|
||||
/\b((zeki)?tb.*\b) b/i // Zeki Tablets
|
||||
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
|
||||
|
||||
/\b([yr]\d{2}) b/i,
|
||||
/\b(?:dragon[- ]+touch |dt)(\w{5}) b/i // Dragon Touch Tablet
|
||||
], [MODEL, [VENDOR, 'Dragon Touch'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(ns-?\w{0,9}) b/i // Insignia Tablets
|
||||
], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [
|
||||
|
||||
/\b((nxa|next)-?\w{0,9}) b/i // NextBook Tablets
|
||||
], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i // Voice Xtreme Phones
|
||||
], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
/\b(lvtel\-)?(v1[12]) b/i // LvTel Phones
|
||||
], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
/\b(ph-1) /i // Essential PH-1
|
||||
], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(v(100md|700na|7011|917g).*\b) b/i // Envizen Tablets
|
||||
], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(trio[-\w\. ]+) b/i // MachSpeed Tablets
|
||||
], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [
|
||||
|
||||
/\btu_(1491) b/i // Rotor Tablets
|
||||
], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]]
|
||||
]
|
||||
});
|
||||
|
||||
const Emails = Object.freeze({
|
||||
browser : [
|
||||
// Microsoft Outlook / Thunderbird
|
||||
[/(microsoft outlook|thunderbird)[\s\/]([\w\.]+)/i], [NAME, VERSION, [TYPE, 'email']]
|
||||
]
|
||||
});
|
||||
|
||||
const MediaPlayers = Object.freeze({
|
||||
browser : [[
|
||||
|
||||
/(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
|
||||
/(coremedia) v([\w\._]+)/i
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
|
||||
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
|
||||
// NSPlayer/PSP-InternetRadioPlayer/Videos
|
||||
/(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
|
||||
/(lg player|nexplayer)\s([\d\.]+)/i,
|
||||
/player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
|
||||
], [NAME, VERSION], [
|
||||
/(nexplayer)\s([\w\.-]+)/i // Nexplayer
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(flrp)\/([\w\.-]+)/i // Flip Player
|
||||
], [[NAME, 'Flip Player'], VERSION], [
|
||||
|
||||
/(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i
|
||||
// FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit
|
||||
], [NAME], [
|
||||
|
||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
||||
// Gstreamer
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(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], [
|
||||
|
||||
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
|
||||
], [[NAME, /_/g, ' '], VERSION], [
|
||||
|
||||
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
|
||||
// MPlayer SVN
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
|
||||
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(mplayer)/i, // MPlayer (no other info)
|
||||
/(yourmuze)/i, // YourMuze
|
||||
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
|
||||
], [NAME], [
|
||||
|
||||
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(nokia\d+)\/([\w\.-]+)/i // Nokia
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(winamp)3 version ([\w\.-]+)/i, // Winamp
|
||||
/(winamp)\s([\w\.-]+)/i,
|
||||
/(winamp)mpeg\/([\w\.-]+)/i
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
||||
// inlight radio
|
||||
], [NAME], [
|
||||
|
||||
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
|
||||
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
||||
// SoundTap/Totem/Stagefright/Streamium
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(smp)([\d\.]+)/i // SMP
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
|
||||
/(vlc)\/([\w\.-]+)/i,
|
||||
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
|
||||
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
|
||||
/(itunes)\/([\d\.]+)/i // iTunes
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
|
||||
/(windows-media-player)\/([\w\.-]+)/i
|
||||
], [[NAME, /-/g, ' '], VERSION], [
|
||||
|
||||
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
|
||||
// Windows Media Server
|
||||
], [VERSION, [NAME, 'Windows']], [
|
||||
|
||||
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(rad.io)\s([\d\.]+)/i, // Rad.io
|
||||
/(radio.(?:de|at|fr))\s([\d\.]+)/i
|
||||
], [[NAME, 'rad.io'], VERSION]
|
||||
]
|
||||
});
|
||||
|
||||
const Modules = Object.freeze({
|
||||
browser : [
|
||||
// Axios/jsdom/Scrapy
|
||||
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'module']]
|
||||
]
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
Apps,
|
||||
Bots,
|
||||
CLIs,
|
||||
ExtraDevices,
|
||||
Emails,
|
||||
MediaPlayers,
|
||||
Modules
|
||||
};
|
||||
252
src/extensions/ua-parser-extensions.mjs
Normal file
252
src/extensions/ua-parser-extensions.mjs
Normal file
@@ -0,0 +1,252 @@
|
||||
// Generated ESM version of UAParser.js extensions
|
||||
// DO NOT EDIT THIS FILE!
|
||||
// Source: /src/extensions/ua-parser-extensions.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Extensions for UAParser.js v2.0.0-alpha.3
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
MIT License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
const MODEL = 'model';
|
||||
const NAME = 'name';
|
||||
const TYPE = 'type';
|
||||
const VENDOR = 'vendor';
|
||||
const VERSION = 'version';
|
||||
const MOBILE = 'mobile';
|
||||
const TABLET = 'tablet';
|
||||
|
||||
const Apps = Object.freeze({
|
||||
browser : [
|
||||
[/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, 'app']]
|
||||
]
|
||||
});
|
||||
|
||||
const Bots = Object.freeze({
|
||||
browser : [
|
||||
// Googlebot / BingBot / MSNBot / FacebookBot
|
||||
[/((?:google|bing|msn|facebook)bot(?:[\-imagevdo]{0,6})|bingpreview)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'bot']],
|
||||
|
||||
// GPTBot - https://platform.openai.com/docs/gptbot
|
||||
[/(gptbot)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'bot']],
|
||||
|
||||
// Slackbot - https://api.slack.com/robots
|
||||
[/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i], [NAME, VERSION, [TYPE, 'bot']]
|
||||
]
|
||||
});
|
||||
|
||||
const CLIs = Object.freeze({
|
||||
browser : [
|
||||
// wget / curl / lynx
|
||||
[/(wget|curl|lynx)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'cli']]
|
||||
]
|
||||
});
|
||||
|
||||
const ExtraDevices = Object.freeze({
|
||||
device : [[
|
||||
/(nook)[\w ]+build\/(\w+)/i, // Nook
|
||||
/(dell) (strea[kpr\d ]*[\dko])/i, // Dell Streak
|
||||
/(le[- ]+pan)[- ]+(\w{1,9}) bui/i, // Le Pan Tablets
|
||||
/(trinity)[- ]*(t\d{3}) bui/i, // Trinity Tablets
|
||||
/(gigaset)[- ]+(q\w{1,9}) bui/i, // Gigaset Tablets
|
||||
/(vodafone) ([\w ]+)(?:\)| bui)/i // Vodafone
|
||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||
|
||||
/(u304aa)/i // AT&T
|
||||
], [MODEL, [VENDOR, 'AT&T'], [TYPE, MOBILE]], [
|
||||
|
||||
/\bsie-(\w*)/i // Siemens
|
||||
], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(rct\w+) b/i // RCA Tablets
|
||||
], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(venue[\d ]{2,7}) b/i // Dell Venue Tablets
|
||||
], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(q(?:mv|ta)\w+) b/i // Verizon Tablet
|
||||
], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i // Barnes & Noble Tablet
|
||||
], [MODEL, [VENDOR, 'Barnes & Noble'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(tm\d{3}\w+) b/i
|
||||
], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(k88) b/i // ZTE K Series Tablet
|
||||
], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(nx\d{3}j) b/i // ZTE Nubia
|
||||
], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(gen\d{3}) b.+49h/i // Swiss GEN Mobile
|
||||
], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(zur\d{3}) b/i // Swiss ZUR Tablet
|
||||
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
|
||||
|
||||
/\b((zeki)?tb.*\b) b/i // Zeki Tablets
|
||||
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
|
||||
|
||||
/\b([yr]\d{2}) b/i,
|
||||
/\b(?:dragon[- ]+touch |dt)(\w{5}) b/i // Dragon Touch Tablet
|
||||
], [MODEL, [VENDOR, 'Dragon Touch'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(ns-?\w{0,9}) b/i // Insignia Tablets
|
||||
], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [
|
||||
|
||||
/\b((nxa|next)-?\w{0,9}) b/i // NextBook Tablets
|
||||
], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i // Voice Xtreme Phones
|
||||
], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
/\b(lvtel\-)?(v1[12]) b/i // LvTel Phones
|
||||
], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
/\b(ph-1) /i // Essential PH-1
|
||||
], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [
|
||||
|
||||
/\b(v(100md|700na|7011|917g).*\b) b/i // Envizen Tablets
|
||||
], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [
|
||||
|
||||
/\b(trio[-\w\. ]+) b/i // MachSpeed Tablets
|
||||
], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [
|
||||
|
||||
/\btu_(1491) b/i // Rotor Tablets
|
||||
], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]]
|
||||
]
|
||||
});
|
||||
|
||||
const Emails = Object.freeze({
|
||||
browser : [
|
||||
// Microsoft Outlook / Thunderbird
|
||||
[/(microsoft outlook|thunderbird)[\s\/]([\w\.]+)/i], [NAME, VERSION, [TYPE, 'email']]
|
||||
]
|
||||
});
|
||||
|
||||
const MediaPlayers = Object.freeze({
|
||||
browser : [[
|
||||
|
||||
/(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
|
||||
/(coremedia) v([\w\._]+)/i
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
|
||||
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
|
||||
// NSPlayer/PSP-InternetRadioPlayer/Videos
|
||||
/(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
|
||||
/(lg player|nexplayer)\s([\d\.]+)/i,
|
||||
/player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
|
||||
], [NAME, VERSION], [
|
||||
/(nexplayer)\s([\w\.-]+)/i // Nexplayer
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(flrp)\/([\w\.-]+)/i // Flip Player
|
||||
], [[NAME, 'Flip Player'], VERSION], [
|
||||
|
||||
/(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i
|
||||
// FStream/NativeHost/QuerySeekSpider/IA Archiver/facebookexternalhit
|
||||
], [NAME], [
|
||||
|
||||
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
|
||||
// Gstreamer
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(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], [
|
||||
|
||||
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
|
||||
], [[NAME, /_/g, ' '], VERSION], [
|
||||
|
||||
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
|
||||
// MPlayer SVN
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
|
||||
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(mplayer)/i, // MPlayer (no other info)
|
||||
/(yourmuze)/i, // YourMuze
|
||||
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
|
||||
], [NAME], [
|
||||
|
||||
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(nokia\d+)\/([\w\.-]+)/i // Nokia
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(winamp)3 version ([\w\.-]+)/i, // Winamp
|
||||
/(winamp)\s([\w\.-]+)/i,
|
||||
/(winamp)mpeg\/([\w\.-]+)/i
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
|
||||
// inlight radio
|
||||
], [NAME], [
|
||||
|
||||
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
|
||||
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
|
||||
// SoundTap/Totem/Stagefright/Streamium
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(smp)([\d\.]+)/i // SMP
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
|
||||
/(vlc)\/([\w\.-]+)/i,
|
||||
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
|
||||
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
|
||||
/(itunes)\/([\d\.]+)/i // iTunes
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
|
||||
/(windows-media-player)\/([\w\.-]+)/i
|
||||
], [[NAME, /-/g, ' '], VERSION], [
|
||||
|
||||
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
|
||||
// Windows Media Server
|
||||
], [VERSION, [NAME, 'Windows']], [
|
||||
|
||||
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(rad.io)\s([\d\.]+)/i, // Rad.io
|
||||
/(radio.(?:de|at|fr))\s([\d\.]+)/i
|
||||
], [[NAME, 'rad.io'], VERSION]
|
||||
]
|
||||
});
|
||||
|
||||
const Modules = Object.freeze({
|
||||
browser : [
|
||||
// Axios/jsdom/Scrapy
|
||||
[/\b(axios|jsdom|scrapy)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, 'module']]
|
||||
]
|
||||
});
|
||||
|
||||
export {
|
||||
Apps,
|
||||
Bots,
|
||||
CLIs,
|
||||
ExtraDevices,
|
||||
Emails,
|
||||
MediaPlayers,
|
||||
Modules
|
||||
};
|
||||
42
src/helpers/ua-parser-helpers.js
Normal file
42
src/helpers/ua-parser-helpers.js
Normal file
@@ -0,0 +1,42 @@
|
||||
///////////////////////////////////////////////
|
||||
/* Helpers for UAParser.js v2.0.0-alpha.3
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
MIT License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
/*
|
||||
# Reference:
|
||||
https://www.chromium.org/updates/ua-reduction/
|
||||
|
||||
# Desktop
|
||||
---
|
||||
Format:
|
||||
Mozilla/5.0 (<unifiedPlatform>) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.0.0.0 Safari/537.36
|
||||
|
||||
Possible <unifiedPlatform> values:
|
||||
- Windows NT 10.0; Win64; x64
|
||||
- Macintosh; Intel Mac OS X 10_15_7
|
||||
- X11; Linux x86_64
|
||||
- X11; CrOS x86_64 14541.0.0
|
||||
- Fuchsia
|
||||
|
||||
# Mobile & Tablet: (except iOS/Android WebView)
|
||||
---
|
||||
Format:
|
||||
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.0.0.0 <deviceCompat> Safari/537.36
|
||||
|
||||
Possible <deviceCompat> values:
|
||||
- "Mobile"
|
||||
- "" (empty string for Tablets & Desktop)
|
||||
*/
|
||||
|
||||
const frozenUA = /Mozilla\/5\.0 \((Windows NT 10\.0; Win64; x64|Macintosh; Intel Mac OS X 10_15_7|X11; Linux x86_64|X11; CrOS x86_64 14541\.0\.0|Fuchsia|Linux; Android 10; K)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/\d+\.0\.0\.0 (Mobile )?Safari\/537\.36/;
|
||||
|
||||
const isFrozenUA = str => frozenUA.test(str);
|
||||
|
||||
module.exports = {
|
||||
isFrozenUA
|
||||
};
|
||||
46
src/helpers/ua-parser-helpers.mjs
Normal file
46
src/helpers/ua-parser-helpers.mjs
Normal file
@@ -0,0 +1,46 @@
|
||||
// Generated ESM version of UAParser.js helpers
|
||||
// DO NOT EDIT THIS FILE!
|
||||
// Source: /src/helpers/ua-parser-helpers.js
|
||||
|
||||
///////////////////////////////////////////////
|
||||
/* Helpers for UAParser.js v2.0.0-alpha.3
|
||||
https://github.com/faisalman/ua-parser-js
|
||||
Author: Faisal Salman <f@faisalman.com>
|
||||
MIT License */
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
/*
|
||||
# Reference:
|
||||
https://www.chromium.org/updates/ua-reduction/
|
||||
|
||||
# Desktop
|
||||
---
|
||||
Format:
|
||||
Mozilla/5.0 (<unifiedPlatform>) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.0.0.0 Safari/537.36
|
||||
|
||||
Possible <unifiedPlatform> values:
|
||||
- Windows NT 10.0; Win64; x64
|
||||
- Macintosh; Intel Mac OS X 10_15_7
|
||||
- X11; Linux x86_64
|
||||
- X11; CrOS x86_64 14541.0.0
|
||||
- Fuchsia
|
||||
|
||||
# Mobile & Tablet: (except iOS/Android WebView)
|
||||
---
|
||||
Format:
|
||||
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.0.0.0 <deviceCompat> Safari/537.36
|
||||
|
||||
Possible <deviceCompat> values:
|
||||
- "Mobile"
|
||||
- "" (empty string for Tablets & Desktop)
|
||||
*/
|
||||
|
||||
const frozenUA = /Mozilla\/5\.0 \((Windows NT 10\.0; Win64; x64|Macintosh; Intel Mac OS X 10_15_7|X11; Linux x86_64|X11; CrOS x86_64 14541\.0\.0|Fuchsia|Linux; Android 10; K)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/\d+\.0\.0\.0 (Mobile )?Safari\/537\.36/;
|
||||
|
||||
const isFrozenUA = str => frozenUA.test(str);
|
||||
|
||||
export {
|
||||
isFrozenUA
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
1167
src/main/ua-parser.mjs
Normal file
1167
src/main/ua-parser.mjs
Normal file
File diff suppressed because it is too large
Load Diff
20
test/jazzer-fuzz-test.js
Normal file
20
test/jazzer-fuzz-test.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const { FuzzedDataProvider } = require('@jazzer.js/core');
|
||||
const UAParser = require('ua-parser-js');
|
||||
const UA_MAX_LENGTH = 350;
|
||||
|
||||
module.exports.fuzz = function (buffer) {
|
||||
const data = new FuzzedDataProvider(buffer);
|
||||
const userAgent = data.consumeString(UA_MAX_LENGTH, 'utf-8', true);
|
||||
const start = process.hrtime();
|
||||
|
||||
UAParser(userAgent);
|
||||
|
||||
const elapsed = process.hrtime(start);
|
||||
const milisec = (elapsed[0]*1e3+elapsed[1]*1e-6).toFixed(3);
|
||||
if (milisec > 1000) {
|
||||
throw new Error(
|
||||
`Potential ReDoS\n` +
|
||||
`Time taken: ${milisec} ms.\n` +
|
||||
`User agent: ${userAgent}`);
|
||||
}
|
||||
};
|
||||
27
test/mocha-test-es6.mjs
Normal file
27
test/mocha-test-es6.mjs
Normal file
@@ -0,0 +1,27 @@
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
import { CPUArch, DeviceType, EngineName } from 'ua-parser-js/enums';
|
||||
import * as assert from 'assert';
|
||||
|
||||
describe('Returns', () => {
|
||||
it('getResult() should returns object', () => {
|
||||
assert.deepEqual(new UAParser('').getResult(),
|
||||
{
|
||||
ua : '',
|
||||
//ua_ch : { architecture: undefined, bitness: undefined, brands: undefined, fullVersionList: undefined, mobile: false, model: undefined, platform: undefined, platformVersion: undefined },
|
||||
browser: { name: undefined, version: undefined, major: undefined },
|
||||
cpu: { architecture: undefined },
|
||||
device: { vendor: undefined, model: undefined, type: undefined },
|
||||
engine: { name: undefined, version: undefined},
|
||||
os: { name: undefined, version: undefined }
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Enums', () => {
|
||||
it('Can use enum', () => {
|
||||
const { cpu, device, engine } = UAParser('Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2a1pre) Gecko/20090928 Firefox/3.5 Maemo Browser 1.4.1.22 RX-51 N900');
|
||||
assert.strictEqual(cpu.is(CPUArch.ARM), true);
|
||||
assert.strictEqual(device.is(DeviceType.MOBILE), true);
|
||||
assert.strictEqual(engine.is(EngineName.GECKO), true);
|
||||
});
|
||||
});
|
||||
79
test/mocha-test-extension.js
Normal file
79
test/mocha-test-extension.js
Normal file
@@ -0,0 +1,79 @@
|
||||
const fs = require('fs');
|
||||
const assert = require('assert');
|
||||
const parseJS = require('@babel/parser').parse;
|
||||
const traverse = require('@babel/traverse').default;
|
||||
const safe = require('safe-regex');
|
||||
const UAParser = require('ua-parser-js');
|
||||
const Ext = require('ua-parser-js/extensions');
|
||||
|
||||
describe('Bots', () => {
|
||||
it('Can detect bots', () => {
|
||||
const googleBot = 'Googlebot-Video/1.0';
|
||||
const gptBot = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.0; +https://openai.com/gptbot)';
|
||||
const msnBot = 'msnbot-media/1.1 (+http://search.msn.com/msnbot.htm)';
|
||||
const bingPreview = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b';
|
||||
const opera = 'Opera/8.5 (Macintosh; PPC Mac OS X; U; en)';
|
||||
const wget = 'Wget/1.21.1';
|
||||
const facebookBot = 'Mozilla/5.0 (compatible; FacebookBot/1.0; +https://developers.facebook.com/docs/sharing/webmasters/facebookbot/)';
|
||||
const outlook = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Microsoft Outlook 16.0.9126; Microsoft Outlook 16.0.9126; ms-office; MSOffice 16)';
|
||||
const thunderbird = 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0';
|
||||
const axios = 'axios/1.3.5';
|
||||
const jsdom = 'Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/20.0.3';
|
||||
const scrapy = 'Scrapy/1.5.0 (+https://scrapy.org)';
|
||||
|
||||
const botParser = new UAParser(Ext.Bots);
|
||||
assert.deepEqual(botParser.setUA(googleBot).getBrowser(), {name: "Googlebot-Video", version: "1.0", major: "1", type: "bot"});
|
||||
assert.deepEqual(botParser.setUA(gptBot).getBrowser(), {name: "GPTBot", version: "1.0", major: "1", type: "bot"});
|
||||
assert.deepEqual(botParser.setUA(msnBot).getBrowser(), {name: "msnbot-media", version: "1.1", major: "1", type: "bot"});
|
||||
assert.deepEqual(botParser.setUA(bingPreview).getBrowser(), {name: "BingPreview", version: "1.0b", major: "1", type: "bot"});
|
||||
assert.deepEqual(botParser.setUA(opera).getBrowser(), {name: "Opera", version: "8.5", major: "8"});
|
||||
|
||||
// try merging Bots & CLIs
|
||||
const botsAndCLIs = { browser : [...Ext.Bots.browser, ...Ext.CLIs.browser]};
|
||||
const botsAndCLIsParser = new UAParser(botsAndCLIs);
|
||||
assert.deepEqual(botsAndCLIsParser.setUA(wget).getBrowser(), {name: "Wget", version: "1.21.1", major: "1", type:"cli"});
|
||||
assert.deepEqual(botsAndCLIsParser.setUA(facebookBot).getBrowser(), {name: "FacebookBot", version: "1.0", major: "1", type:"bot"});
|
||||
|
||||
const emailParser = new UAParser(Ext.Emails);
|
||||
assert.deepEqual(emailParser.setUA(outlook).getBrowser(), {name: "Microsoft Outlook", version: "16.0.9126", major: "16", type: "email"});
|
||||
assert.deepEqual(emailParser.setUA(thunderbird).getBrowser(), {name: "Thunderbird", version: "78.13.0", major: "78", type: "email"});
|
||||
|
||||
const moduleParser = new UAParser(Ext.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"});
|
||||
});
|
||||
});
|
||||
|
||||
// TODO : move test spec to JSON file
|
||||
|
||||
describe('Testing regexes', () => {
|
||||
|
||||
let regexes;
|
||||
|
||||
before('Read main js file', () => {
|
||||
let code = fs.readFileSync('src/extensions/ua-parser-extensions.js', 'utf8').toString();
|
||||
let ast = parseJS(code, { sourceType: 'script' });
|
||||
regexes = [];
|
||||
traverse(ast, {
|
||||
RegExpLiteral: (path) => {
|
||||
regexes.push(path.node.pattern);
|
||||
}
|
||||
});
|
||||
if (regexes.length === 0) {
|
||||
throw new Error('Regexes cannot be empty!');
|
||||
}
|
||||
});
|
||||
|
||||
describe('Begin testing', () => {
|
||||
it('all regexes in extension file', () => {
|
||||
regexes.forEach(regex => {
|
||||
describe('Test against `safe-regex` : ' + regex, () => {
|
||||
it('should be safe from potentially vulnerable regex', () => {
|
||||
assert.strictEqual(safe(regex), true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
35
test/mocha-test-helpers.js
Normal file
35
test/mocha-test-helpers.js
Normal file
@@ -0,0 +1,35 @@
|
||||
const { isFrozenUA } = require('ua-parser-js/helpers');
|
||||
const assert = require('assert');
|
||||
|
||||
describe('isFrozenUA', () => {
|
||||
it('Returns whether a user agent is frozen', () => {
|
||||
|
||||
const regularWindowsUA = "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.1234.56 Safari/537.36";
|
||||
const freezedWindowsUA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.0.0 Safari/537.36";
|
||||
|
||||
const regularMacUA = "";
|
||||
const freezedMacUA = "";
|
||||
|
||||
const regularLinuxUA = "";
|
||||
const freezedLinuxUA = "";
|
||||
|
||||
const regularCrOSUA = "";
|
||||
const freezedCrOSUA = "";
|
||||
|
||||
const regularFuchsiaUA = "";
|
||||
const freezedFuchsiaUA = "";
|
||||
|
||||
const regularMobileUA = "Mozilla/5.0 (Linux; Android 9; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.1234.56 Mobile Safari/537.36";
|
||||
const freezedMobileUA = "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.0.0 Mobile Safari/537.36";
|
||||
|
||||
const regularTabletUA = "Mozilla/5.0 (Linux; Android 9; SM-T810) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.1234.56 Safari/537.36";
|
||||
const freezedTabletUA = "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.0.0 Safari/537.36";
|
||||
|
||||
assert.strictEqual(isFrozenUA(regularWindowsUA), false);
|
||||
assert.strictEqual(isFrozenUA(freezedWindowsUA), true);
|
||||
assert.strictEqual(isFrozenUA(regularMobileUA), false);
|
||||
assert.strictEqual(isFrozenUA(freezedMobileUA), true);
|
||||
assert.strictEqual(isFrozenUA(regularTabletUA), false);
|
||||
assert.strictEqual(isFrozenUA(freezedTabletUA), true);
|
||||
});
|
||||
});
|
||||
465
test/mocha-test.js
Normal file
465
test/mocha-test.js
Normal file
File diff suppressed because one or more lines are too long
77
test/playwright-test-browser.spec.mjs
Normal file
77
test/playwright-test-browser.spec.mjs
Normal file
@@ -0,0 +1,77 @@
|
||||
// @ts-check
|
||||
import { test, expect } from '@playwright/test';
|
||||
import path from 'path';
|
||||
import url from 'url';
|
||||
|
||||
const localHtml = `file://${path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), '../')}/dist/ua-parser.html`;
|
||||
|
||||
test.describe('test input', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(localHtml);
|
||||
});
|
||||
|
||||
test('accept empty string', async ({ page }) => {
|
||||
// @ts-ignore
|
||||
const uap = await page.evaluate(async () => await UAParser(''));
|
||||
expect(uap).toHaveProperty('ua', '');
|
||||
});
|
||||
});
|
||||
|
||||
test('read client hints data', async ({ page }) => {
|
||||
await page.addInitScript(() => {
|
||||
Object.defineProperty(navigator, 'userAgentData', {
|
||||
value: {
|
||||
brands: [],
|
||||
platform: '',
|
||||
mobile: false,
|
||||
getHighEntropyValues: () => {
|
||||
return Promise.resolve({
|
||||
brands: [
|
||||
{
|
||||
brand: 'Chromium',
|
||||
version: '110'
|
||||
},
|
||||
{
|
||||
brand: 'Not(A:Brand',
|
||||
version: '110'
|
||||
},
|
||||
{
|
||||
brand: 'New Browser',
|
||||
version: '110'
|
||||
}
|
||||
],
|
||||
platform: 'New OS'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
await page.goto(localHtml);
|
||||
|
||||
// @ts-ignore
|
||||
const uap = await page.evaluate(async () => await UAParser().withClientHints());
|
||||
|
||||
expect(uap).toHaveProperty('browser.name', 'New Browser');
|
||||
expect(uap).toHaveProperty('os.name', 'New OS');
|
||||
});
|
||||
|
||||
test('detect Brave', async ({ page }) => {
|
||||
await page.addInitScript(() => {
|
||||
Object.defineProperty(navigator, 'brave', {
|
||||
value: {
|
||||
isBrave: () => true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
await page.goto(localHtml);
|
||||
|
||||
// @ts-ignore
|
||||
let uap = await page.evaluate(() => UAParser());
|
||||
expect(uap).toHaveProperty('browser.name', 'Chrome Headless');
|
||||
|
||||
// @ts-ignore
|
||||
uap = await page.evaluate(() => UAParser().withFeatureCheck());
|
||||
expect(uap).toHaveProperty('browser.name', 'Brave');
|
||||
});
|
||||
@@ -9,26 +9,6 @@
|
||||
"major" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Alipay",
|
||||
"ua" : "Mozilla/5.0 (Linux; U; Android 10; zh-CN; V2034A Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 UWS/3.22.2.33 Mobile Safari/537.36 UCBS/3.22.2.33_211025173018 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:360|0|2.0) AliApp(AP/10.2.51.7100) AlipayClient/10.2.51.7100 Language/zh-Hans useStatusBar/true isConcaveScreen/true Region/CNAriver/1.0.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Alipay",
|
||||
"version" : "10.2.51.7100",
|
||||
"major" : "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Alipay",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 10; VOG-AL00 Build/HUAWEIVOG-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/105.0.5195.148 MYWeb/0.2.103.0_20230131112530 UWS/3.22.2.9999 UCBS/3.22.2.9999_220000000000 Mobile Safari/537.36 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:360|0|3.0) AliApp(AP/10.3.50.9999) AlipayClient/10.3.50.9999 Language/en isConcaveScreen/true Region/CN ProductType/devAriver/1.0.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Alipay",
|
||||
"version" : "10.3.50.9999",
|
||||
"major" : "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Android Browser on Galaxy Nexus",
|
||||
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
@@ -84,7 +64,7 @@
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925F Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.0 Chrome/38.0.2125.102 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Samsung Internet",
|
||||
"name" : "Samsung Browser",
|
||||
"version" : "3.0",
|
||||
"major" : "3"
|
||||
}
|
||||
@@ -114,7 +94,7 @@
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB5; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Avant",
|
||||
"name" : "Avant ",
|
||||
"version" : "undefined",
|
||||
"major" : "undefined"
|
||||
}
|
||||
@@ -144,81 +124,11 @@
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; baidubrowser 1.x)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Baidu",
|
||||
"name" : "baidubrowser",
|
||||
"version" : "1.x",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Baidu",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 9; Redmi Note 5 Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/110.0.5481.153 Mobile Safari/537.36 bdbrowser/6.4.0.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Baidu",
|
||||
"version" : "6.4.0.4",
|
||||
"major" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Baidu",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.4.9999.1900 Safari/537.31 BDSpark/26.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Baidu",
|
||||
"version" : "26.4",
|
||||
"major" : "26"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Baidu",
|
||||
"ua" : "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) BaiduHD/5.4.0.0 Mobile/10A406 Safari/8536.25",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Baidu",
|
||||
"version" : "5.4.0.0",
|
||||
"major" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "BaiDu Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 BIDUBrowser/8.7 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Baidu",
|
||||
"version" : "8.7",
|
||||
"major" : "8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "baidu app on iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16C101 main%2F1.0 baiduboxapp/11.12.0.18 (Baidu; P2 12.1.2)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Baidu",
|
||||
"version" : "11.12.0.18",
|
||||
"major" : "11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "baidu app on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 8.1.0; BKK-AL10 Build/HONORBKK-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.11 baiduboxapp/11.11.0.0 (Baidu; P1 8.1.0)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Baidu",
|
||||
"version" : "11.11.0.0",
|
||||
"major" : "11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Blazer",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/hspr-H102; Blazer/4.0) 16;320x320",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Blazer",
|
||||
"version" : "4.0",
|
||||
"major" : "4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Bolt",
|
||||
"ua" : "Mozilla/5.0 (X11; 78; CentOS; US-en) AppleWebKit/527+ (KHTML, like Gecko) Bolt/0.862 Version/3.0 Safari/523.15",
|
||||
@@ -364,7 +274,7 @@
|
||||
"ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Chrome",
|
||||
"name" : "Mobile Chrome",
|
||||
"version" : "19.0.1084.60",
|
||||
"major" : "19"
|
||||
}
|
||||
@@ -384,7 +294,7 @@
|
||||
"ua" : "Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Chrome",
|
||||
"name" : "Mobile Chrome",
|
||||
"version" : "16.0.912.75",
|
||||
"major" : "16"
|
||||
}
|
||||
@@ -399,26 +309,6 @@
|
||||
"major" : "78"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Comodo Dragon",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Comodo Dragon",
|
||||
"version" : "16.1.1.0",
|
||||
"major" : "16"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Conkeror",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:6.0.1) Gecko/20110831 conkeror/0.9.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "conkeror",
|
||||
"version" : "0.9.3",
|
||||
"major" : "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Dillo",
|
||||
"ua" : "Dillo/2.2",
|
||||
@@ -449,16 +339,6 @@
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "DuckDuckGo",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.1517.4.1 Ddg/17.4.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "DuckDuckGo",
|
||||
"version" : "17.4.1",
|
||||
"major" : "17"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "DuckDuckGo",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 8.1.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile DuckDuckGo/5 Safari/537.36",
|
||||
@@ -489,16 +369,6 @@
|
||||
"major" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Go Browser",
|
||||
"ua" : "NokiaE66/GoBrowser/2.0.297",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "GoBrowser",
|
||||
"version" : "2.0.297",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Waterfox",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.2.2 Waterfox/55.2.2",
|
||||
@@ -559,26 +429,6 @@
|
||||
"major" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Klarna in-App Browser for iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Klarna/23.36.223",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Klarna",
|
||||
"version" : "23.36.223",
|
||||
"major" : "23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Klarna in-App Browser for Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 12; moto g(60)s Build/S3RLS32.114-25-13; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 Klarna/23.36.215",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Klarna",
|
||||
"version" : "23.36.215",
|
||||
"major" : "23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Instagram in-App Browser for iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Instagram 142.0.0.22.109 (iPhone12,5; iOS 14_1; en_US; en-US; scale=3.00; 1242x2688; 214888322) NW/1",
|
||||
@@ -698,16 +548,6 @@
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Helio",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36 Helio/0.98.20",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Helio",
|
||||
"version" : "0.98.20",
|
||||
"major" : "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "HeyTap",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.61 Safari/537.36 HeyTapBrowser/40.8.10.1",
|
||||
@@ -768,16 +608,6 @@
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "ICEBrowser",
|
||||
"ua" : "Mozilla/5.0 (Java 1.6.0_01; Windows XP 5.1 x86; en) ICEbrowser/v6_1_2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "ICEbrowser",
|
||||
"version" : "6.1.2",
|
||||
"major" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "IceCat",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092921 IceCat/3.0.3-g1",
|
||||
@@ -838,26 +668,6 @@
|
||||
"major" : "11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Iron",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1250.0 Iron/22.0.2150.0 Safari/537.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Iron",
|
||||
"version" : "22.0.2150.0",
|
||||
"major" : "22"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Jasmine",
|
||||
"ua" : "SAMSUNG-S8000/S8000XXIF3 SHP/VPP/R5 Jasmine/1.0 Nextreaming SMM-MMS/1.2.0 profile/MIDP-2.1 configuration/CLDC-1.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Jasmine",
|
||||
"version" : "1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "K-Meleon",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2",
|
||||
@@ -878,16 +688,6 @@
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Klar < 4.1",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Klar/1.0 Chrome/58.0.3029.83 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Klar",
|
||||
"version" : "1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Konqueror",
|
||||
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu)",
|
||||
@@ -908,56 +708,6 @@
|
||||
"major" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PicoBrowser",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; Pico Neo3 Link OS5.8.4.0 like Quest) AppleWebKit/537.36 (KHTML, like Gecko) PicoBrowser/3.3.22 Chrome/105.0.5195.68 VR Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Pico Browser",
|
||||
"version" : "3.3.22",
|
||||
"major" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PicoBrowser",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; PICO 4 OS5.4.0 like Quest) AppleWebKit/537.36 (KHTML, like Gecko) PicoBrowser/3.3.22 Chrome/105.0.5195.68 VR Safari/537.36 OculusBrowser/7.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Pico Browser",
|
||||
"version" : "3.3.22",
|
||||
"major" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rekonq",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ) AppleWebKit/533.3 (KHTML, like Gecko) rekonq Safari/533.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "rekonq",
|
||||
"version" : "undefined",
|
||||
"major" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Smart Lenovo Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 SLBrowser/8.0.0.10171 SLBChan/8",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Smart Lenovo Browser",
|
||||
"version" : "8.0.0.10171",
|
||||
"major" : "8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Smart Lenovo Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 SLBrowser/9.0.0.9011 SLBChan/10",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Smart Lenovo Browser",
|
||||
"version" : "9.0.0.9011",
|
||||
"major" : "9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "LINE on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.81 Mobile Safari/537.36 Line/6.5.1/IAB",
|
||||
@@ -1058,6 +808,16 @@
|
||||
"major" : "4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mobile Safari",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Safari/604.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mobile Safari",
|
||||
"version" : "undefined",
|
||||
"major" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Mosaic",
|
||||
"ua" : "NCSA_Mosaic/2.6 (X11; SunOS 4.1.3 sun4m)",
|
||||
@@ -1128,26 +888,6 @@
|
||||
"major" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "NetSurf in Plan9",
|
||||
"ua" : "Mozilla/5.0 (Plan9) NetSurf/3.12",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "NetSurf",
|
||||
"version" : "3.12",
|
||||
"major" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "NetSurf in Linux",
|
||||
"ua" : "NetSurf/3.10 (Linux; Arch Linux)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "NetSurf",
|
||||
"version" : "3.10",
|
||||
"major" : "3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nokia Browser",
|
||||
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaN8-00/025.007; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba",
|
||||
@@ -1278,26 +1018,6 @@
|
||||
"major" : "12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Opera GX on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 10; Redmi Note 8 Pro Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5790.168 Mobile Safari/537.36 OPX/2",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Opera GX",
|
||||
"version" : "2",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Opera GX on Windows",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.50747 OPRGX/60.0.3255.50747",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Opera GX",
|
||||
"version" : "60.0.3255.50747",
|
||||
"major" : "60"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Opera Tablet",
|
||||
"ua" : "Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1",
|
||||
@@ -1328,16 +1048,6 @@
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "OviBrowser",
|
||||
"ua" : "Mozilla/5.0 (Series40; NokiaX3-02/le6.32; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/1.0.0.11.8",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "OviBrowser",
|
||||
"version" : "1.0.0.11.8",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PhantomJS",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34",
|
||||
@@ -1369,7 +1079,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "QQBrowser",
|
||||
"desc" : "QQ",
|
||||
"ua" : "Mozilla/5.0 (Linux; U; Android 4.4.4; zh-cn; OPPO R7s Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/7.1 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
@@ -1378,36 +1088,6 @@
|
||||
"major" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "QQBrowser",
|
||||
"ua" : "Mozilla/5.0 (Linux; U; Android 9; zh-cn; vivo X21 Build/PKQ1.180819.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/9.9 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "QQBrowser",
|
||||
"version" : "9.9",
|
||||
"major" : "9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Quark",
|
||||
"ua" : "Mozilla/5.0 (Linux; U; Android 12; zh-Hans-CN; JLH-AN00 Build/HONORJLH-AN00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Quark/5.8.2.221 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Quark",
|
||||
"version" : "5.8.2.221",
|
||||
"major" : "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Quark",
|
||||
"ua" : "mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/112.0.0.0 safari/537.36 quarkpc/1.5.5.75",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Quark",
|
||||
"version" : "1.5.5.75",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "QupZilla",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) QupZilla/1.8.9 Safari/538.1",
|
||||
@@ -1418,16 +1098,6 @@
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Rekonq 2",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) rekonq/2.2.1 Safari/537.21",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "rekonq",
|
||||
"version" : "2.2.1",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "RockMelt",
|
||||
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) RockMelt/0.8.36.78 Chrome/7.0.517.44 Safari/534.7",
|
||||
@@ -1454,46 +1124,16 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Safari",
|
||||
"version" : "2.0.4",
|
||||
"major" : "2"
|
||||
"version" : "1",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Samsung Internet for Android",
|
||||
"desc" : "Samsung Browser",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG-SM-G925A Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Samsung Internet",
|
||||
"version" : "4.0",
|
||||
"major" : "4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Samsung Internet for Tizen Mobile",
|
||||
"ua" : "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/1.0 Mobile Safari/537.3",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Samsung Internet",
|
||||
"version" : "1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Samsung Internet for Smart-TV",
|
||||
"ua" : "Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Samsung Internet",
|
||||
"version" : "1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Samsung Internet for Gear VR",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925K Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile VR Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Samsung Internet",
|
||||
"name" : "Samsung Browser",
|
||||
"version" : "4.0",
|
||||
"major" : "4"
|
||||
}
|
||||
@@ -1538,37 +1178,6 @@
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Sleipnir",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 10; SOV37 Build/52.1.C.0.220; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/123.0.6312.120 Mobile Safari/537.36 Sleipnir/3.7.5",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Sleipnir",
|
||||
"version" : "3.7.5",
|
||||
"major" : "3"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"desc" : "Sleipnir",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Sleipnir 2.8.4)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Sleipnir",
|
||||
"version" : "2.8.4",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Sleipnir",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022) Sleipnir/2.8.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Sleipnir",
|
||||
"version" : "2.8.4",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "SlimBrowser",
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SlimBrowser)",
|
||||
@@ -1680,7 +1289,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "UP.Browser",
|
||||
"desc" : "UPBrowser",
|
||||
"ua" : "BenQ-CF61/1.00/WAP2.0/MIDP2.0/CLDC1.0 UP.Browser/6.3.0.4.c.1.102 (GUI) MMP/2.0",
|
||||
"expect" :
|
||||
{
|
||||
@@ -1730,43 +1339,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Vivaldi on Mac",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.88 Safari/537.36 Vivaldi/2.4.1488.36",
|
||||
"desc" : "Viera",
|
||||
"ua" : "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Vivaldi",
|
||||
"version" : "2.4.1488.36",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Vivo Browser",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 13; 23049RAD8C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/16.7.1.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Vivo Browser",
|
||||
"version" : "16.7.1.1",
|
||||
"major" : "16"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "w3m",
|
||||
"ua" : "w3m/0.5.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "w3m",
|
||||
"version" : "0.5.1",
|
||||
"major" : "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Wolvic",
|
||||
"ua" : "Mozilla/5.0 (Android 12; Mobile VR; rv:121.0) Gecko/121.0 Firefox/121.0 Wolvic/1.6.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Wolvic",
|
||||
"version" : "1.6.1",
|
||||
"major" : "1"
|
||||
"name" : "VIERA",
|
||||
"version" : "undefined",
|
||||
"major" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1934,7 +1513,7 @@
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) FxiOS/1.1 Mobile/13B143 Safari/601.1.46",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Firefox",
|
||||
"name" : "Mobile Firefox",
|
||||
"version" : "1.1",
|
||||
"major" : "1"
|
||||
}
|
||||
@@ -1944,7 +1523,7 @@
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/112.0 Mobile/15E148 Safari/605.1.15",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Firefox",
|
||||
"name" : "Mobile Firefox",
|
||||
"version" : "112.0",
|
||||
"major" : "112"
|
||||
}
|
||||
@@ -1954,7 +1533,7 @@
|
||||
"ua" : "Mozilla/5.0 (iPad; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Firefox",
|
||||
"name" : "Mobile Firefox",
|
||||
"version" : "1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
@@ -1964,7 +1543,7 @@
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Mobile/14A456 QQ/6.5.3.410 V1_IPH_SQ_6.5.3_1_APP_A Pixel/1080 Core/UIWebView NetType/WIFI Mem/26",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "QQBrowser",
|
||||
"name" : "QQ",
|
||||
"version" : "6.5.3.410",
|
||||
"major" : "6"
|
||||
}
|
||||
@@ -1974,17 +1553,37 @@
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 6.0; PRO 6 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile MQQBrowser/6.8 TBS/036824 Safari/537.36 V1_AND_SQ_6.5.8_422_YYB_D PA QQ/6.5.8.2910 NetType/WIFI WebP/0.3.0 Pixel/1080",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "QQBrowser",
|
||||
"name" : "QQ",
|
||||
"version" : "6.5.8.2910",
|
||||
"major" : "6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "baidu app on iOS",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16C101 main%2F1.0 baiduboxapp/11.12.0.18 (Baidu; P2 12.1.2)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "baiduboxapp",
|
||||
"version" : "11.12.0.18",
|
||||
"major" : "11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "baidu app on Android",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 8.1.0; BKK-AL10 Build/HONORBKK-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.11 baiduboxapp/11.11.0.0 (Baidu; P1 8.1.0)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "baiduboxapp",
|
||||
"version" : "11.11.0.0",
|
||||
"major" : "11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "WeChat",
|
||||
"name" : "WeChat(Win) Desktop",
|
||||
"version" : "3.43.901.400",
|
||||
"major" : "3"
|
||||
}
|
||||
@@ -1994,7 +1593,7 @@
|
||||
"ua" : "mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/53.0.2785.116 safari/537.36 qbcore/4.0.1301.400 qqbrowser/9.0.2524.400 mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/81.0.4044.138 safari/537.36 nettype/wifi micromessenger/7.0.20.1781(0x6700143b) windowswechat",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "WeChat",
|
||||
"name" : "WeChat(Win) Desktop",
|
||||
"version" : "4.0.1301.400",
|
||||
"major" : "4"
|
||||
}
|
||||
@@ -2024,19 +1623,7 @@
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.221 Safari/537.36 SE 2.X MetaSr 1.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Sogou Explorer",
|
||||
"version" : "1.0",
|
||||
"major" : "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Sogou Mobile Browser",
|
||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 SogouMSE,SogouMobileBrowser/3.7.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Sogou Mobile",
|
||||
"version" : "3.7.4",
|
||||
"major" : "3"
|
||||
"name" : "MetaSr"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2047,6 +1634,16 @@
|
||||
"name" : "LBBROWSER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "BaiDu Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 BIDUBrowser/8.7 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "BIDUBrowser",
|
||||
"version" : "8.7",
|
||||
"major" : "8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "2345 Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.90 Safari/537.36 2345Explorer/9.2.1.17116",
|
||||
@@ -2115,46 +1712,6 @@
|
||||
"name" : "LinkedIn"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Links in Linux",
|
||||
"ua" : "Links (2.xpre7; Linux 2.4.18 i586; x)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Links",
|
||||
"version" : "2.xpre7",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Links in Mac",
|
||||
"ua" : "Links (2.1pre33; Darwin 8.11.0 Power Macintosh; 169x55)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Links",
|
||||
"version" : "2.1pre33",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Links in NetBSD",
|
||||
"ua" : "Links (2.29; NetBSD 10.0 i386; GNU C 10.5; x)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Links",
|
||||
"version" : "2.29",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Links in FreeBSD",
|
||||
"ua" : "Links (2.1pre15; FreeBSD 5.3-RELEASE i386; 196x84)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Links",
|
||||
"version" : "2.1pre15",
|
||||
"major" : "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Safari including comma in minor version number",
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6,2 Safari/605.1.15",
|
||||
@@ -2288,7 +1845,7 @@
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 7.1.2; Nexus 5X Build/N2G47W) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Chrome",
|
||||
"name" : "Mobile Chrome",
|
||||
"version" : "58.0.3029.83",
|
||||
"major" : "58"
|
||||
}
|
||||
@@ -2298,7 +1855,7 @@
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 7.1.2; Nexus 5X Build/N2G47W) AppleWebKit/537.36 (KHTML, like Gecko) FxiOS/7.5b3349 Mobile/14F89 Safari/603.2.4",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Firefox",
|
||||
"name" : "Mobile Firefox",
|
||||
"version" : "7.5b3349",
|
||||
"major" : "7"
|
||||
}
|
||||
@@ -2308,7 +1865,7 @@
|
||||
"ua" : "Mozilla/5.0 (Android 5.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Firefox",
|
||||
"name" : "Mobile Firefox",
|
||||
"version" : "41.0",
|
||||
"major" : "41"
|
||||
}
|
||||
@@ -2322,25 +1879,5 @@
|
||||
"version" : "12.33.0.36",
|
||||
"major" : "12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Twitter",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 13; CPH2531 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/123.0.6312.120 Mobile Safari/537.36 TwitterAndroid",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Twitter",
|
||||
"version" : "undefined",
|
||||
"major" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Twitter",
|
||||
"ua" : "Mozilla/5.0 (iPad; CPU OS 15_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/19H12 Twitter for iPhone/10.34",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Twitter",
|
||||
"version" : "10.34",
|
||||
"major" : "10"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -246,5 +246,13 @@
|
||||
{
|
||||
"architecture" : "irix64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "68k",
|
||||
"ua" : "'Mozilla/1.1 (Macintosh; U; 68K)'",
|
||||
"expect" :
|
||||
{
|
||||
"architecture" : "68k"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -224,15 +224,6 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Essential PH-1",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; PH-1 Build/PPR1.180905.036) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.86 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Essential",
|
||||
"model": "PH-1",
|
||||
"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",
|
||||
@@ -1277,60 +1268,6 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "itel A25",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; itel L5002) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.130 Mobile Safari/537.36 OPR/63.3.3216.58675",
|
||||
"expect": {
|
||||
"vendor": "itel",
|
||||
"model": "L5002",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "itel A50",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 14; itel A667L Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36 OPR/83.1.2254.73239",
|
||||
"expect": {
|
||||
"vendor": "itel",
|
||||
"model": "A667L",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "itel KidPad 1",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Itel W7001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.101 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "itel",
|
||||
"model": "W7001",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "itel Pad One",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; itel P10001L Build/SP1A.210812.016) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.172 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "itel",
|
||||
"model": "P10001L",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "itel RS4",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; itel S666LN Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/468.1.0.56.78;]",
|
||||
"expect": {
|
||||
"vendor": "itel",
|
||||
"model": "S666LN",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "itel Vision 2S",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; itel P651L Build/RP1A.201005.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.76 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "itel",
|
||||
"model": "P651L",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Moto X",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2; xx-xx; XT1058 Build/13.9.0Q2.X-70-GHOST-ATT_LE-2) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
@@ -1412,33 +1349,6 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 1",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; A063) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/22.0 Chrome/111.0.5563.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nothing",
|
||||
"model": "A063",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; A065 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.53 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nothing",
|
||||
"model": "A065",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Nothing 2a",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 14; A142 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.71 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Nothing",
|
||||
"model": "A142",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Oculus Quest",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Quest) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/15.0.0.0.22.280317669 SamsungBrowser/4.0 Chrome/89.0.4389.90 VR Safari/537.36",
|
||||
@@ -1457,15 +1367,6 @@
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Oculus Quest 3",
|
||||
"ua": "Mozilla/5.0 (X11; Linux x86_64; Quest 3) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/31.4.0.6.51.566757996 Chrome/120.0.6099.283 VR Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Facebook",
|
||||
"model": "Quest 3",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Oculus Quest Pro",
|
||||
"ua": "Mozilla/5.0 (X11; Linux x86_64; Quest Pro) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/24.4.0.22.60.426469926 SamsungBrowser/4.0 Chrome/106.0.5249.181 VR Safari/537.36",
|
||||
@@ -1583,15 +1484,6 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OPPO Pad",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 13; zh-CN; OPD2101 Build/TP1A.220905.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.58 UCBrowser/16.3.9.1290 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "OPPO",
|
||||
"model": "OPD2101",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "OPPO Neo",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; R831T Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 OppoBrowser/3.3.2 Mobile Safari/534.30",
|
||||
@@ -1745,20 +1637,11 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Realme 8",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; RMX3085) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Realme",
|
||||
"model": "RMX3085",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Realme 9 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; RMX3471) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Realme",
|
||||
"vendor": "undefined",
|
||||
"model": "RMX3471",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -1767,7 +1650,7 @@
|
||||
"desc": "Realme GT Master",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; RMX3363) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Realme",
|
||||
"vendor": "undefined",
|
||||
"model": "RMX3363",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -1925,24 +1808,6 @@
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Echo Show 8",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.2; AEOCW) AppleWebKit/537.36 (KHTML, like Gecko) Silk/106.3.3 like Chrome/106.0.5249.170 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Amazon",
|
||||
"model": "AEOCW",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Echo Show 15",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; AEOHY) AppleWebKit/537.36 (KHTML, like Gecko) Silk/112.6.3 like Chrome/112.0.5615.213 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Amazon",
|
||||
"model": "AEOHY",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Echo Dot",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 5.1.1; AEOBC Build/LVY48F)",
|
||||
@@ -2159,42 +2024,6 @@
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung Galaxy Watch",
|
||||
"ua": "Mozilla/5.0 (Linux; Tizen 5.5; SAMSUNG SM-R805W) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.0 Chrome/69.0.3497.106 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Samsung",
|
||||
"model": "SM-R805W",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung Galaxy Watch Active 2",
|
||||
"ua": "Mozilla/5.0 (Linux; Tizen 5.5; SAMSUNG SM-R820) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.0 Chrome/69.0.3497.106 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Samsung",
|
||||
"model": "SM-R820",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung Galaxy Watch4",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; SAMSUNG SM-R875U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.2. Chrome/102.0.5005.125 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Samsung",
|
||||
"model": "SM-R875U",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung Galaxy Watch5 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; SAMSUNG SM-R925U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.2. Chrome/111.0.5563.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Samsung",
|
||||
"model": "SM-R925U",
|
||||
"type": "wearable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Samsung Note 10.1",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; SM-P605) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36",
|
||||
@@ -2483,114 +2312,6 @@
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL 10 TabMax",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; 9296Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9296Q",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL 10 TabMax 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; 9295G_EEA) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9295G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL 10 TabMax WiFi",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; 9296G_TR) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9296G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL NxtPaper 11",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; 9466X Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.179 Safari/537.36 [FB_IAB/FB4A;FBAV/473.0.0.41.81;]",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9466X",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 8 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; 9048S) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9048S",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 8 LE",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; 9137W Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.61 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9137W",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 10 FHD 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; 9060G Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.196 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9060G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 10 HD 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; 9060X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9060X",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 10 LTE",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; 8196G Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.162 Safari/537.36 [FB_IAB/FB4A;FBAV/471.0.0.35.80;]",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "8196G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 10 WiFi",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; 8496G Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.61 Safari/537.36 [FB_IAB/FB4A;FBAV/474.0.0.52.74;]",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "8496G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 10L",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; 8491X_EEA Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.105 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "8491X",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "TCL Tab 10s 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; 9080G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "TCL",
|
||||
"model": "9080G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Tecno KC8",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; TECNO KC8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
@@ -2636,132 +2357,6 @@
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Armor",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; Armor Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.107 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Armor",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Armor",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 6.0; Armor) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 YaBrowser/20.4.2.101.00 SA/1 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Armor",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Armor 8 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; Armor 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.5481.192 Mobile Safari/537.36 OPR/74.1.3922.71199",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Armor 8 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Armor 12 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; Armor 12 5G Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.166 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Armor 12 5G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Armor 20WT",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; Armor 20WT) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/22.0 Chrome/111.0.5563.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Armor 20WT",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Armor Pad",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; Armor Pad Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/431.0.0.30.108;]",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Armor Pad",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Armor X5 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 10; Armor X5 Pro Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/430.0.0.23.113;]",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Armor X5 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Power Armor 14 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; Power Armor14 Pro Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.138 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Power Armor14 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Power Armor 18T",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; Power Armor 18T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Power Armor 18T",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Ulefone Power Armor 19T",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; Power Armor 19T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.5481.192 Mobile Safari/537.36 OPR/74.3.3922.71982",
|
||||
"expect": {
|
||||
"vendor": "Ulefone",
|
||||
"model": "Power Armor 19T",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Xiaomi 2201117TG",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; 2201117TG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"model": "2201117TG",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Xiaomi M2004J19C",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; M2004J19C Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.77 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"model": "M2004J19C",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Xiaomi M2006C3MNG",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 11; M2006C3MNG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"model": "M2006C3MNG",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Xiaomi 21061119DG",
|
||||
"ua": "Mozilla/5.0 (Linux; arm_64; Android 11; 21061119DG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 YaBrowser/23.3.7.24.00 SA/3 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"model": "21061119DG",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Xiaomi 2013023",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; en-US; 2013023 Build/HM2013023) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 UCBrowser/10.0.1.512 U3/0.8.0 Mobile Safari/533.1",
|
||||
@@ -2807,15 +2402,6 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Xiaomi Mi 10 Pro",
|
||||
"ua": "Linux; U; Android 13; Mi 10 Pro Build/TKQ1.221114.001",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"model": "Mi 10 Pro",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Xiaomi Mi 5s Plus",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; zh-cn; MI 5s Plus Build/MXB48T) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.146 Mobile Safari/537.36 XiaoMi/MiuiBrowser/8.7.1",
|
||||
@@ -2991,7 +2577,7 @@
|
||||
"desc": "Xiaomi Redmi 10C",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; 220333QAG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"vendor": "undefined",
|
||||
"model": "220333QAG",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -3045,7 +2631,7 @@
|
||||
"desc": "XiaoMi Redmi Note 10 5G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; M2103K19C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"vendor": "undefined",
|
||||
"model": "M2103K19C",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -3054,7 +2640,7 @@
|
||||
"desc": "XiaoMi Redmi Note 10 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; M2101K6P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"vendor": "undefined",
|
||||
"model": "M2101K6P",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -3063,7 +2649,7 @@
|
||||
"desc": "XiaoMi Redmi Note 10 Pro",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 12; M2101K6G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"vendor": "undefined",
|
||||
"model": "M2101K6G",
|
||||
"type": "mobile"
|
||||
}
|
||||
@@ -3077,24 +2663,6 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "XiaoMi Redmi Note 12 Turbo",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 13; 23049RAD8C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/16.7.1.1",
|
||||
"expect": {
|
||||
"vendor": "Xiaomi",
|
||||
"model": "23049RAD8C",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE Blade A6",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; ZTE BLADE A0620 Build/NMF26F; ru-ru) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Mobile Safari/537.36 Puffin/9.2.0.50586AP",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "BLADE A0620",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "PlayStation 4",
|
||||
"ua": "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)",
|
||||
@@ -3460,294 +3028,6 @@
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "RCA Voyager III Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; RCT6973W43 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "RCA",
|
||||
"model": "RCT6973W43",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "RCA Voyager II Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; RCT6773W22B Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "RCA",
|
||||
"model": "RCT6773W22B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Verizon Quanta Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; QMV7B Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Verizon",
|
||||
"model": "QMV7B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Verizon Ellipsis 8 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; QTAQZ3 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Verizon",
|
||||
"model": "QTAQZ3",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Verizon Ellipsis 8HD Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; QTASUN1 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Verizon",
|
||||
"model": "QTASUN1",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Dell Venue 8 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Venue 8 3830 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Dell",
|
||||
"model": "Venue 8 3830",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Dell Venue 7 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Venue 7 3730 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Dell",
|
||||
"model": "Venue 7 3730",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Barnes & Noble Nook HD+ Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; Barnes & Noble Nook HD+ Build/JZO54K; CyanogenMod-10) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Barnes & Noble",
|
||||
"model": "Nook HD+",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Barnes & Noble V400 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.0.4; BNTV400 Build/IMM76L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Barnes & Noble",
|
||||
"model": "V400",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "NuVision TM101A540N Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; TM101A540N Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/50.0.2661.86 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "NuVision",
|
||||
"model": "TM101A540N",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE-Z431",
|
||||
"ua": "ZTE-Z431/1.4.0 NetFront/4.2 QTV5.1 Profile/MIDP-2.1 Configuration/CLDC-1.1",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "Z431",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; ZTE-Z740G Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "Z740G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE K Series Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; K88 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "K88",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE Nubia Red Magic 3",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; NX629J Build/PKQ1.190321.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/45016 Mobile Safari/537.36 MMWEBID/4064 MicroMessenger/7.0.10.1580(0x27000A34) Process/tools NetType/WIFI Language/zh_CN ABI/arm64",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "NX629J",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE Blade A5",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; ZTE Blade A5 2019) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "Blade A5 2019",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE BLADE V0730",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; ZTE BLADE V0730) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "BLADE V0730",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE B2017G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; ZTE B2017G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "B2017G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Swizz GEN610",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; GEN610 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Swiss",
|
||||
"model": "GEN610",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Swizz ZUR700",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; ZUR700 Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Swiss",
|
||||
"model": "ZUR700",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Zeki TB782b Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; en-US; TB782B Build/IMM76D) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.0.2.299 U3/0.8.0 Mobile Safari/534.31",
|
||||
"expect": {
|
||||
"vendor": "Zeki",
|
||||
"model": "TB782B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Dragon Touch Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.0.4; DT9138B Build/IMM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.72 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Dragon Touch",
|
||||
"model": "9138B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Insignia Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; NS-P08A7100 Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Insignia",
|
||||
"model": "NS-P08A7100",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Voice Xtreme V75",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.1; en-us; V75 Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Voice",
|
||||
"model": "V75",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "LvTel V11",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; V11 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "LvTel",
|
||||
"model": "V11",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Envizen Tablet V100MD",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; V100MD Build/V100MD.20130816) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Envizen",
|
||||
"model": "V100MD",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Rotor Tablet",
|
||||
"ua": "mozilla/5.0 (linux; android 5.0.1; tu_1491 build/lrx22c) applewebkit/537.36 (khtml, like gecko) chrome/43.0.2357.93 safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Rotor",
|
||||
"model": "1491",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "MachSpeed Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Trio 7.85 vQ Build/Trio_7.85_vQ) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "MachSpeed",
|
||||
"model": "Trio 7.85 vQ",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Trinity Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.1; Trinity T101 Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Trinity",
|
||||
"model": "T101",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "NextBook Next7",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Next7P12 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "NextBook",
|
||||
"model": "Next7P12",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "NextBook Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; NXA8QC116 Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "NextBook",
|
||||
"model": "NXA8QC116",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Le Pan Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Le Pan TC802A Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Le Pan",
|
||||
"model": "TC802A",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Le Pan Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Le Pan TC802A Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Le Pan",
|
||||
"model": "TC802A",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Amazon Alexa Echo Show",
|
||||
"ua": "AlexaWebMediaPlayer/1.0.200641.0 (Linux;Android 5.1.1)",
|
||||
@@ -3820,15 +3100,6 @@
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Gigaset Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Gigaset QV830 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Gigaset",
|
||||
"model": "QV830",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Amazon Fire 7",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; KFAUWI) AppleWebKit/537.36 (KHTML, like Gecko) Silk/80.5.3 like Chrome/80.0.3987.162 Safari/537.36",
|
||||
@@ -3838,42 +3109,6 @@
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "AT&T Radiant Core U304AA",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 9; U304AA Build/P00610)",
|
||||
"expect": {
|
||||
"vendor": "AT&T",
|
||||
"model": "U304AA",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Vodafone Smart Tab 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; Vodafone Smart Tab 4G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Vodafone",
|
||||
"model": "Smart Tab 4G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Vodafone Smart ultra 6",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; Vodafone Smart ultra 6 Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Vodafone",
|
||||
"model": "Smart ultra 6",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "4ife 4K Smart TV Box",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; 4ife 4K Smart TV Box Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36 Vinebre",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "FaceBook Mobile App",
|
||||
"ua": "[FBAN/FBIOS;FBAV/283.0.0.44.117;FBBV/238386386;FBDV/iPhone12,1;FBMD/iPhone;FBSN/iOS;FBSV/13.6.1;FBSS/2;FBID/phone;FBLC/en_US;FBOP/5;FBRV/240127608]",
|
||||
342
test/specs/extension-device.json
Normal file
342
test/specs/extension-device.json
Normal file
@@ -0,0 +1,342 @@
|
||||
[{
|
||||
"desc": "Essential PH-1",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; PH-1 Build/PPR1.180905.036) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.86 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Essential",
|
||||
"model": "PH-1",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Gigaset Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Gigaset QV830 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Gigaset",
|
||||
"model": "QV830",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "RCA Voyager III Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; RCT6973W43 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "RCA",
|
||||
"model": "RCT6973W43",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "RCA Voyager II Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; RCT6773W22B Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "RCA",
|
||||
"model": "RCT6773W22B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Verizon Quanta Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; QMV7B Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Verizon",
|
||||
"model": "QMV7B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Verizon Ellipsis 8 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; QTAQZ3 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Verizon",
|
||||
"model": "QTAQZ3",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Verizon Ellipsis 8HD Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; QTASUN1 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Verizon",
|
||||
"model": "QTASUN1",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Dell Venue 8 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Venue 8 3830 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Dell",
|
||||
"model": "Venue 8 3830",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Dell Venue 7 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Venue 7 3730 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Dell",
|
||||
"model": "Venue 7 3730",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Barnes & Noble Nook HD+ Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; Barnes & Noble Nook HD+ Build/JZO54K; CyanogenMod-10) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Barnes & Noble",
|
||||
"model": "Nook HD+",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Barnes & Noble V400 Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.0.4; BNTV400 Build/IMM76L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Barnes & Noble",
|
||||
"model": "V400",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "NuVision TM101A540N Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; TM101A540N Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/50.0.2661.86 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "NuVision",
|
||||
"model": "TM101A540N",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE-Z431",
|
||||
"ua": "ZTE-Z431/1.4.0 NetFront/4.2 QTV5.1 Profile/MIDP-2.1 Configuration/CLDC-1.1",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "Z431",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; ZTE-Z740G Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "Z740G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE K Series Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; K88 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "K88",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE Nubia Red Magic 3",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; NX629J Build/PKQ1.190321.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/45016 Mobile Safari/537.36 MMWEBID/4064 MicroMessenger/7.0.10.1580(0x27000A34) Process/tools NetType/WIFI Language/zh_CN ABI/arm64",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "NX629J",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE Blade A5",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 9; ZTE Blade A5 2019) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "Blade A5 2019",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE BLADE V0730",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; ZTE BLADE V0730) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.116 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "BLADE V0730",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "ZTE B2017G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; ZTE B2017G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "ZTE",
|
||||
"model": "B2017G",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Swizz GEN610",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; GEN610 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Swiss",
|
||||
"model": "GEN610",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Swizz ZUR700",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; ZUR700 Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Swiss",
|
||||
"model": "ZUR700",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Zeki TB782b Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; en-US; TB782B Build/IMM76D) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.0.2.299 U3/0.8.0 Mobile Safari/534.31",
|
||||
"expect": {
|
||||
"vendor": "Zeki",
|
||||
"model": "TB782B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Dragon Touch Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.0.4; DT9138B Build/IMM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.72 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Dragon Touch",
|
||||
"model": "9138B",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Insignia Tablet",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; NS-P08A7100 Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Insignia",
|
||||
"model": "NS-P08A7100",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Voice Xtreme V75",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.1; en-us; V75 Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Voice",
|
||||
"model": "V75",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "LvTel V11",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; V11 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "LvTel",
|
||||
"model": "V11",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Envizen Tablet V100MD",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; V100MD Build/V100MD.20130816) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "Envizen",
|
||||
"model": "V100MD",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Rotor Tablet",
|
||||
"ua": "mozilla/5.0 (linux; android 5.0.1; tu_1491 build/lrx22c) applewebkit/537.36 (khtml, like gecko) chrome/43.0.2357.93 safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Rotor",
|
||||
"model": "1491",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "MachSpeed Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Trio 7.85 vQ Build/Trio_7.85_vQ) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "MachSpeed",
|
||||
"model": "Trio 7.85 vQ",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Trinity Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.1; Trinity T101 Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Trinity",
|
||||
"model": "T101",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "NextBook Next7",
|
||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Next7P12 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
||||
"expect": {
|
||||
"vendor": "NextBook",
|
||||
"model": "Next7P12",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "NextBook Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; NXA8QC116 Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "NextBook",
|
||||
"model": "NXA8QC116",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Le Pan Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Le Pan TC802A Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Le Pan",
|
||||
"model": "TC802A",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Le Pan Tablets",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Le Pan TC802A Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Le Pan",
|
||||
"model": "TC802A",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "AT&T Radiant Core U304AA",
|
||||
"ua": "Dalvik/2.1.0 (Linux; U; Android 9; U304AA Build/P00610)",
|
||||
"expect": {
|
||||
"vendor": "AT&T",
|
||||
"model": "U304AA",
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Vodafone Smart Tab 4G",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; Vodafone Smart Tab 4G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Vodafone",
|
||||
"model": "Smart Tab 4G",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Vodafone Smart ultra 6",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; Vodafone Smart ultra 6 Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36",
|
||||
"expect": {
|
||||
"vendor": "Vodafone",
|
||||
"model": "Smart ultra 6",
|
||||
"type": "tablet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "4ife 4K Smart TV Box",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; 4ife 4K Smart TV Box Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36 Vinebre",
|
||||
"expect": {
|
||||
"vendor": "undefined",
|
||||
"model": "undefined",
|
||||
"type": "smarttv"
|
||||
}
|
||||
}]
|
||||
@@ -80,24 +80,6 @@
|
||||
"version" : "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "WeChat Desktop for Windows Built-in Browser major version in 4",
|
||||
"ua" : "mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/81.0.4044.138 safari/537.36 nettype/wifi micromessenger/7.0.20.1781(0x6700143b) windowswechat",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Windows",
|
||||
"version" : "7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Windows RT",
|
||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
|
||||
@@ -688,7 +670,7 @@
|
||||
"ua" : "Mozilla/5.0 (X11; CrOS x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.0.0 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Chromium OS",
|
||||
"name" : "Chrome OS",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
@@ -697,7 +679,7 @@
|
||||
"ua" : "Mozilla/5.0 (X11; CrOS x86_64 10575.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Chromium OS",
|
||||
"name" : "Chrome OS",
|
||||
"version" : "10575.58.0"
|
||||
}
|
||||
},
|
||||
@@ -832,7 +814,7 @@
|
||||
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mac OS",
|
||||
"name" : "macOS",
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
@@ -841,7 +823,7 @@
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:10.0) Gecko/20100101 Firefox/10.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mac OS",
|
||||
"name" : "macOS",
|
||||
"version" : "x.y"
|
||||
}
|
||||
},
|
||||
@@ -850,7 +832,7 @@
|
||||
"ua" : "Mozilla/5.0 (Macintosh; PPC Mac OS X x.y; rv:10.0) Gecko/20100101 Firefox/10.0",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mac OS",
|
||||
"name" : "macOS",
|
||||
"version" : "x.y"
|
||||
}
|
||||
},
|
||||
@@ -859,7 +841,7 @@
|
||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Mac OS",
|
||||
"name" : "macOS",
|
||||
"version" : "10.6.8"
|
||||
}
|
||||
},
|
||||
168
test/test.js
168
test/test.js
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user