Compare commits

..

2 Commits

Author SHA1 Message Date
Faisal Salman
638e237c8d [device-utils] Add new method: getMarketingName() 2024-12-02 16:15:35 +07:00
Faisal Salman
d177b83965 NEW SUBMODULE: device-utils 2024-12-02 10:45:39 +07:00
56 changed files with 2164 additions and 2402 deletions

View File

@@ -10,19 +10,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
arch: [amd64] arch: [amd64, ppc64le]
node-version: ['22.13', 'lts/*']
include:
- arch: ppc64le
node-version: 20
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-node@v4 - uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node-version }} node-version: 'lts/*'
- name: Run the test - name: Run the test
run: | run: |
echo "Running on ubuntu-latest-${{ matrix.arch }} with node version set as ${{ matrix.node-version }}"
npm ci npm ci
npx playwright install --with-deps npx playwright install --with-deps
npm test npm test

View File

@@ -65,59 +65,6 @@
--- ---
## Version 2.0.3
- Add new browser: Dooble, Ecosia, LG Browser, Otter, qutebrowser, Surf
- Add new device: BLU, Facebook Portal TV
- Improve device detection: Archos, LG, Meta Quest
- Remove jazzer.js fuzz test
- Improve `withClientHints()`:
- Browser naming adjustments:
- `HuaweiBrowser` => `Huawei Browser`
- `Miui Browser` => `MIUI Browser`
- `OperaMobile` => `Opera Mobi`
- `YaBrowser` => `Yandex`
- `extensions` submodule:
- Add new Crawler: AdIdxBot, Linespider, LinkedInBot, OpenAI Image Downloader, SemrushBot, Yahoo! Slurp
- Add new Fetcher: Better Uptime Bot, Google-PageRenderer, GoogleImageProxy, MicrosoftPreview, Snap URL Preview, SkypeUriPreview, TelegramBot
- Add new Vehicles: BMW, Jeep
- Add OS detection of WhatsApp user-agent
## Version 2.0.2
- Fix TypeScript dependency issue
## Version 2.0.1
- Add new browser: Ladybird, Daum
- Add new device: Apple HomePod
- Add new device vendor: HMD
- Add new OS: Ubuntu Touch, Windows IoT
- Improve CPU detection: ARM, x86
- Improve device detection: Lenovo, Nokia, Nvidia, Xiaomi
- Tablet: Google, Honor, Huawei, Infinix, Nokia, OnePlus, Xiaomi
- Wearable: Asus, Google, LG, Motorola, OnePlus, Oppo, Samsung, Sony
- Smart-TV: Xiaomi, unidentified vendors
- Improve detection for unknown VR devices
- Improve device model detection for Generic devices
- Improve OS detection: Linux, Symbian
- Improve TypeScript definitions for Headers
- Improve `withClientHints()`:
- `engine.version` also get updated
- Infer `device.vendor` & `device.type` by guessing from `device.model`
- Browser naming adjustments:
- `Google Chrome` => `Chrome`
- `Microsoft Edge` => `Edge`
- `Android WebView` => `Chrome WebView`
- `HeadlessChrome` => `Chrome Headless`
- `enums` submodule:
- Add TypeScript definitions
- `extensions` submodule:
- Add new list:
- `Vehicles`: BYD, Rivian, Volvo
- Add new Fetcher: Bluesky
- Add new Library: Apache-HttpClient, go-http-client, got, GuzzleHttp, Java-http-client, libwww-perl, lua-resty-http, Needle, OkHttp, node-fetch, PHP-SOAP, PostmanRuntime, superagent
## Version 2.0.0 ## Version 2.0.0
- `ua-parser-js/extensions` submodule: - `ua-parser-js/extensions` submodule:
@@ -219,15 +166,6 @@
--- ---
## Version 0.7.40 / 1.0.40
- Add new browser: 115, LibreWolf, Slimboat, Slimjet
- Add new device: Advan, Cat, Energizer, IMO, Micromax, Smartfren
- Add new engine: ArkWeb, Servo
- Add new os: OpenHarmony
- Improve browser detection: 2345, 360, Dragon, Iron, Maxthon
- Recognize Honor as a separate device vendor from Huawei
- Fix Python Request mistakenly identified as Meta Quest
## Version 0.7.39 / 1.0.39 ## Version 0.7.39 / 1.0.39
- Add new feature: executable command using `npx ua-parser-js "[INSERT-UA-HERE]"` - Add new feature: executable command using `npx ua-parser-js "[INSERT-UA-HERE]"`
- Add new browser: Helio, Pico Browser, Wolvic - Add new browser: Helio, Pico Browser, Wolvic

View File

@@ -239,13 +239,4 @@ Made with [contributors-img](https://contrib.rocks).
<a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/organizations.svg?avatarHeight=64"></a> <a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/organizations.svg?avatarHeight=64"></a>
<a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/individuals.svg?avatarHeight=64"></a> <a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/individuals.svg?avatarHeight=64"></a>
You can support the open-source editions of UAParser.js through one of the following options: Support the open-source editions of UAParser.js on [OpenCollective](https://opencollective.com/ua-parser-js) or [GitHub Sponsors](https://github.com/sponsors/faisalman).
[![OpenCollective](https://img.shields.io/badge/OpenCollective-dddddd?style=for-the-badge&logo=opencollective&color=dddddd
)](https://opencollective.com/ua-parser-js)
[![GitHub Sponsors](https://img.shields.io/badge/GitHub_Sponsors-333333?style=for-the-badge&logo=githubsponsors&color=333333
)](https://github.com/sponsors/faisalman)
[![PayPal](https://img.shields.io/badge/Paypal-003087?style=for-the-badge&logo=paypal&color=003087
)](https://paypal.me/faisalman)
[![WeChat/Alipay](https://img.shields.io/badge/Other_Payment_Methods-Alipay_/_WeChat_Pay-09b83e?style=for-the-badge&logo=mastercard&color=09b83e
)](https://store.faisalman.com/buy/3d71f2f3-cf4d-473c-892a-9d4497c890be)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1628
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{ {
"title": "UAParser.js", "title": "UAParser.js",
"name": "ua-parser-js", "name": "ua-parser-js",
"version": "2.0.3", "version": "2.0.0",
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)", "author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment", "description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment",
"keywords": [ "keywords": [
@@ -25,17 +25,14 @@
"contributors": [ "contributors": [
"Aamir Poonawalla <aamir@urx.com>", "Aamir Poonawalla <aamir@urx.com>",
"Admas <mollases@users.noreply.github.com>", "Admas <mollases@users.noreply.github.com>",
"Aiyush <aiyushdhar85@gmail.com>",
"algenon <m@antonz.ru>", "algenon <m@antonz.ru>",
"Alvin Portillo <alvin@8thwall.com>", "Alvin Portillo <alvin@8thwall.com>",
"Amumu <yoyo837@hotmail.com>", "Amumu <yoyo837@hotmail.com>",
"Andreas Kogler <andreas.kogler@bitmovin.com>",
"Andrea Vaghi <andrea.vaghi@jobrapido.com>", "Andrea Vaghi <andrea.vaghi@jobrapido.com>",
"Anton Zhiyanov <m@antonz.ru>", "Anton Zhiyanov <m@antonz.ru>",
"Arturo Mejia <amejia@blim.com>", "Arturo Mejia <amejia@blim.com>",
"Arun Rama Reddy <arunramareddy@gmail.com>", "Arun Rama Reddy <arunramareddy@gmail.com>",
"Austin Pray <austin@austinpray.com>", "Austin Pray <austin@austinpray.com>",
"Beat YT <66485277+Beat-YT@users.noreply.github.com>",
"Bendeguz <symunona@gmail.com>", "Bendeguz <symunona@gmail.com>",
"Benjamin Bertrand <bertrand.design@gmail.com>", "Benjamin Bertrand <bertrand.design@gmail.com>",
"Benjamin Urban <benjamin.urban@sueddeutsche.de>", "Benjamin Urban <benjamin.urban@sueddeutsche.de>",
@@ -47,8 +44,6 @@
"chenyuan-new <53860479+chenyuan-new@users.noreply.github.com>", "chenyuan-new <53860479+chenyuan-new@users.noreply.github.com>",
"Christopher De Cairos <chris.decairos@gmail.com>", "Christopher De Cairos <chris.decairos@gmail.com>",
"Cyrille David <cyrille@qonto.eu>", "Cyrille David <cyrille@qonto.eu>",
"Dai Jie <daijie@php.net>",
"Danila Rodichkin <daniluk4000@outlook.com>",
"Dante <duanjl.china@gmail.com>", "Dante <duanjl.china@gmail.com>",
"Dario Vladovic <d.vladimyr@gmail.com>", "Dario Vladovic <d.vladimyr@gmail.com>",
"David Annez <david.annez@gmail.com>", "David Annez <david.annez@gmail.com>",
@@ -78,15 +73,11 @@
"Grigory Dmitrenko <grigory@snsk.ru>", "Grigory Dmitrenko <grigory@snsk.ru>",
"gulpin <gulping.gulpin@gmail.com>", "gulpin <gulping.gulpin@gmail.com>",
"Hans Ott <hansott@hotmail.be>", "Hans Ott <hansott@hotmail.be>",
"Harald Reingruber <74898239+haraldreingruber-dedalus@users.noreply.github.com>",
"Hendrik Helwich <h.helwich@iplabs.de>", "Hendrik Helwich <h.helwich@iplabs.de>",
"Hermann Ebert <ebbmo@HE.local>", "Hermann Ebert <ebbmo@HE.local>",
"hr6r <hedian@gmail.com>", "hr6r <hedian@gmail.com>",
"Hyewon Kang <gpffps369@gmail.com>",
"Hyunbin <47051820+hyunbinseo@users.noreply.github.com>",
"Igor Topal <i.topal@smartweb.com.ua>", "Igor Topal <i.topal@smartweb.com.ua>",
"Ildar Kamalov <i.kamalov@adguard.com>", "Ildar Kamalov <i.kamalov@adguard.com>",
"Ilya Daraseliya <idarase@gmail.com>",
"insanehong <insane.hong@navercorp.com>", "insanehong <insane.hong@navercorp.com>",
"jackpoll <jackpoll123456@gmail.com>", "jackpoll <jackpoll123456@gmail.com>",
"Jacky Choo <jackychoo@adly-macbook.local>", "Jacky Choo <jackychoo@adly-macbook.local>",
@@ -107,7 +98,6 @@
"Liam Quinn <lquinn@blackberry.com>", "Liam Quinn <lquinn@blackberry.com>",
"Lithin <lithin@webklipper.com>", "Lithin <lithin@webklipper.com>",
"liujunlve <liujunlve@henhaoji.com>", "liujunlve <liujunlve@henhaoji.com>",
"lj0812 <xoyljlj@163.com>",
"ll-syber <670159357@qq.com>", "ll-syber <670159357@qq.com>",
"Loris Guignard <loris.guignard@gmail.com>", "Loris Guignard <loris.guignard@gmail.com>",
"Lukas Drgon <lukas.drgon@gmail.com>", "Lukas Drgon <lukas.drgon@gmail.com>",
@@ -121,7 +111,6 @@
"Max Maurer <maxemanuel.maurer@gmail.com>", "Max Maurer <maxemanuel.maurer@gmail.com>",
"Max Nordlund <max.nordlund@gmail.com>", "Max Nordlund <max.nordlund@gmail.com>",
"Michael Hess <mhess@connectify.me>", "Michael Hess <mhess@connectify.me>",
"Mike <mikehuebner@me.com>",
"MimyyK <michele.marais@hakisa.com>", "MimyyK <michele.marais@hakisa.com>",
"Mok <mok@moekm.com>", "Mok <mok@moekm.com>",
"nabetama <mao.nabeta@gmail.com>", "nabetama <mao.nabeta@gmail.com>",
@@ -135,7 +124,6 @@
"o.drapeza <o.drapeza@tinkoff.ru>", "o.drapeza <o.drapeza@tinkoff.ru>",
"Oscar Becerra <oscarbecerra@google.com>", "Oscar Becerra <oscarbecerra@google.com>",
"otakuSiD <otakusid@gmail.com>", "otakuSiD <otakusid@gmail.com>",
"Pablo Osés <opablo@gmail.com>",
"Paris Morgan <paris@8thwall.com>", "Paris Morgan <paris@8thwall.com>",
"patrick-nurt <github@pereira.dk>", "patrick-nurt <github@pereira.dk>",
"Pavel Studeny <studeny@avast.com>", "Pavel Studeny <studeny@avast.com>",
@@ -190,6 +178,11 @@
"import": "./src/main/ua-parser.mjs", "import": "./src/main/ua-parser.mjs",
"types": "./src/main/ua-parser.d.ts" "types": "./src/main/ua-parser.d.ts"
}, },
"./device-utils": {
"require": "./src/device-utils/ua-parser-device-utils.js",
"import": "./src/device-utils/ua-parser-device-utils.mjs",
"types": "./src/device-utils/ua-parser-device-utils.d.ts"
},
"./enums": { "./enums": {
"require": "./src/enums/ua-parser-enums.js", "require": "./src/enums/ua-parser-enums.js",
"import": "./src/enums/ua-parser-enums.mjs", "import": "./src/enums/ua-parser-enums.mjs",
@@ -221,25 +214,27 @@
"test:jshint": "jshint src/main", "test:jshint": "jshint src/main",
"test:lockfile-lint": "npx lockfile-lint -p package-lock.json", "test:lockfile-lint": "npx lockfile-lint -p package-lock.json",
"test:mocha": "mocha test/unit", "test:mocha": "mocha test/unit",
"test:playwright": "npx playwright install && playwright test test/e2e --browser all" "test:playwright": "playwright test test/e2e --browser all"
}, },
"dependencies": { "dependencies": {
"detect-europe-js": "^0.1.2", "detect-europe-js": "^0.1.2",
"is-standalone-pwa": "^0.1.1", "is-standalone-pwa": "^0.1.1",
"ua-is-frozen": "^0.1.2", "ua-is-frozen": "^0.1.2"
"node-fetch": "^2.7.0",
"@types/node-fetch": "^2.6.12"
}, },
"devDependencies": { "devDependencies": {
"@babel/parser": "7.15.8", "@babel/parser": "7.15.8",
"@babel/traverse": "7.23.2", "@babel/traverse": "7.23.2",
"@jazzer.js/core": "^1.4.0",
"@playwright/test": "^1.49.0", "@playwright/test": "^1.49.0",
"@types/node": "^22.9.1",
"@types/node-fetch": "^2.6.12",
"jshint": "~2.13.6", "jshint": "~2.13.6",
"mocha": "~8.2.0", "mocha": "~8.2.0",
"node-fetch": "^2.7.0",
"requirejs": "2.3.2", "requirejs": "2.3.2",
"safe-regex": "^2.1.1", "safe-regex": "^2.1.1",
"tsd": "^0.29.0", "tsd": "^0.29.0",
"uglify-js": "~3.19.3" "uglify-js": "~3.12.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@@ -4,20 +4,10 @@ SRC_PATH="src/main/ua-parser.js"
MIN_PATH="dist/ua-parser.min.js" MIN_PATH="dist/ua-parser.min.js"
PACK_PATH="dist/ua-parser.pack.js" PACK_PATH="dist/ua-parser.pack.js"
SRC_PATH_MJS="src/main/ua-parser.mjs"
MIN_PATH_MJS="dist/ua-parser.min.mjs"
PACK_PATH_MJS="dist/ua-parser.pack.mjs"
# minified # minified
echo "Generate ${MIN_PATH}" echo "Generate ${MIN_PATH}"
uglifyjs $SRC_PATH -o $MIN_PATH --comments "/^ UA/" uglifyjs $SRC_PATH -o $MIN_PATH --comments "/^ UA/"
echo "Generate ${MIN_PATH_MJS}"
uglifyjs $SRC_PATH_MJS -o $MIN_PATH_MJS --comments "/^ UA/" --module
# packed # packed
echo "Generate ${PACK_PATH}" echo "Generate ${PACK_PATH}"
uglifyjs $SRC_PATH -o $PACK_PATH --comments "/^ UA/" --compress --mangle uglifyjs $SRC_PATH -o $PACK_PATH --comments "/^ UA/" --compress --mangle
echo "Generate ${PACK_PATH_MJS}"
uglifyjs $SRC_PATH_MJS -o $PACK_PATH_MJS --comments "/^ UA/" --compress --mangle --module

View File

@@ -36,7 +36,14 @@ const modules = [
[/esversion\: 3/ig, 'esversion: 6'], [/esversion\: 3/ig, 'esversion: 6'],
[/\/[\/\s]+export[\s\S]+/ig,'export {UAParser};'] [/\/[\/\s]+export[\s\S]+/ig,'export {UAParser};']
] ]
},{ },
{
src : 'src/device-utils/ua-parser-device-utils.js',
dest :'src/device-utils/ua-parser-device-utils.mjs',
title : 'ua-parser-js/device-utils',
replacements : []
},
{
src : 'src/enums/ua-parser-enums.js', src : 'src/enums/ua-parser-enums.js',
dest :'src/enums/ua-parser-enums.mjs', dest :'src/enums/ua-parser-enums.mjs',
title : 'ua-parser-js/enums', title : 'ua-parser-js/enums',

View File

@@ -0,0 +1,5 @@
[
{
"SM-S928N" : "Galaxy S24 Ultra"
}
]

View File

@@ -0,0 +1,5 @@
[
{
"M2101K9C" : "Mi 11 Lite 5G"
}
]

View File

@@ -0,0 +1,21 @@
// Type definitions for Device Utils submodule of UAParser.js v2.0.0
// Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman>
import type { IResult, IDevice } from "../main/ua-parser";
declare function getMarketingName(model: string, vendor: string): boolean;
declare function isMobile(val: IResult | IDevice | string): boolean;
declare function isSmartTV(val: IResult | IDevice | string): boolean;
declare function isTablet(val: IResult | IDevice | string): boolean;
declare function isWearable(val: IResult | IDevice | string): boolean;
declare function isXR(val: IResult | IDevice | string): boolean;
export {
getMarketingName,
isMobile,
isSmartTV,
isTablet,
isWearable,
isXR
};

View File

@@ -0,0 +1,51 @@
//////////////////////////////////////////////////
/* Device Utils Submodule for UAParser.js v2.0.0
https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */
/////////////////////////////////////////////////
/*jshint esversion: 6 */
const fs = require('fs');
const path = require('path');
const UAParser = require('../main/ua-parser');
const { Device: DeviceType } = require('../enums/ua-parser-enums');
const isDeviceType = (val, expectedType) => {
const uap = typeof val == 'string' ? UAParser(val) : val; // string
let actualType;
if (uap.hasOwnProperty('device')) { // IResult
actualType = uap.device?.type;
} else if (uap.hasOwnProperty('type')) { // IDevice
actualType = uap.type;
}
return actualType == expectedType;
};
const getMarketingName = (model, vendor) => {
const normalizedVendor = vendor.toLowerCase();
const filePath = path.resolve(__dirname, `./data/marketing-name/${normalizedVendor}.json`);
if (fs.existsSync(filePath)) {
const map = require(`./data/marketing-name/${normalizedVendor}.json`)[0];
if (model in map) {
return map[model];
}
}
return model;
};
const isMobile = val => isDeviceType(val, DeviceType.MOBILE);
const isSmartTV = val => isDeviceType(val, DeviceType.SMARTTV);
const isTablet = val => isDeviceType(val, DeviceType.TABLET);
const isWearable = val => isDeviceType(val, DeviceType.WEARABLE);
const isXR = val => isDeviceType(val, DeviceType.XR);
module.exports = {
getMarketingName,
isMobile,
isSmartTV,
isTablet,
isWearable,
isXR
};

View File

@@ -1,374 +0,0 @@
// Type definitions for Enums submodule of UAParser.js v2.0.3
// Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman>
export const Browser: Readonly<{
'115': "115";
'2345': "2345";
'360': "360";
ALIPAY: "Alipay";
AMAYA: "Amaya";
ANDROID: "Android Browser";
ARORA: "Arora";
AVANT: "Avant";
AVAST: "Avast Secure Browser";
AVG: "AVG Secure Browser";
BAIDU: "Baidu Browser";
BASILISK: "Basilisk";
BLAZER: "Blazer";
BLU: "BLU";
BOLT: "Bolt";
BOWSER: "Bowser";
BRAVE: "Brave";
CAMINO: "Camino";
CHIMERA: "Chimera";
CHROME: "Chrome";
CHROME_HEADLESS: "Chrome Headless";
CHROME_MOBILE: "Mobile Chrome";
CHROME_WEBVIEW: "Chrome WebView";
CHROMIUM: "Chromium";
COBALT: "Cobalt";
COC_COC: "Coc Coc";
CONKEROR: "Conkeror";
DAUM: "Daum";
DILLO: "Dillo";
DOLPHIN: "Dolphin";
DOOBLE: 'Dooble',
DORIS: "Doris";
DRAGON: "Dragon";
DUCKDUCKGO: "DuckDuckGo";
ECOSIA: "Ecosia";
EDGE: "Edge";
EPIPHANY: "Epiphany";
FACEBOOK: "Facebook";
FALKON: "Falkon";
FIREBIRD: "Firebird";
FIREFOX: "Firefox";
FIREFOX_FOCUS: "Firefox Focus";
FIREFOX_MOBILE: "Mobile Firefox";
FIREFOX_REALITY: "Firefox Reality";
FENNEC: "Fennec";
FLOCK: "Flock";
FLOW: "Flow";
GO: "GoBrowser";
GOOGLE_SEARCH: "GSA";
HELIO: "Helio";
HEYTAP: "HeyTap";
HONOR: "Honor";
HUAWEI: "Huawei Browser";
ICAB: "iCab";
ICE: "ICE Browser";
ICEAPE: "IceApe";
ICECAT: "IceCat";
ICEDRAGON: "IceDragon";
ICEWEASEL: "IceWeasel";
IE: "IE";
INSTAGRAM: "Instagram";
IRIDIUM: "Iridium";
IRON: "Iron";
JASMINE: "Jasmine";
KONQUEROR: "Konqueror";
KAKAO: "KakaoTalk";
KHTML: "KHTML";
K_MELEON: "K-Meleon";
KLAR: "Klar";
KLARNA: "Klarna";
KINDLE: "Kindle";
LENOVO: "Smart Lenovo Browser";
LADYBIRD: "Ladybird";
LG: "LG Browser";
LIBREWOLF: "LibreWolf";
LIEBAO: "LBBROWSER";
LINE: "Line";
LINKEDIN: "LinkedIn";
LINKS: "Links";
LUNASCAPE: "Lunascape";
LYNX: "Lynx";
MAEMO: "Maemo Browser";
MAXTHON: "Maxthon";
MIDORI: "Midori";
MINIMO: "Minimo";
MIUI: "MIUI Browser";
MOZILLA: "Mozilla";
MOSAIC: "Mosaic";
NAVER: "Naver";
NETFRONT: "NetFront";
NETSCAPE: "Netscape";
NETSURF: "Netsurf";
NOKIA: "Nokia Browser";
OBIGO: "Obigo";
OCULUS: "Oculus Browser";
OMNIWEB: "OmniWeb";
OPERA: "Opera";
OPERA_COAST: "Opera Coast";
OPERA_GX: "Opera GX",
OPERA_MINI: "Opera Mini";
OPERA_MOBI: "Opera Mobi";
OPERA_TABLET: "Opera Tablet";
OPERA_TOUCH: "Opera Touch";
OTTER: "Otter";
OVI: "OviBrowser";
PALEMOON: "PaleMoon";
PHANTOMJS: "PhantomJS";
PHOENIX: "Phoenix";
PICOBROWSER: "Pico Browser";
POLARIS: "Polaris";
PUFFIN: "Puffin";
QQ: "QQBrowser";
QQ_LITE: "QQBrowserLite";
QUARK: "Quark";
QUPZILLA: "QupZilla";
QUTEBROWSER: "qutebrowser";
REKONQ: "rekonq";
ROCKMELT: "Rockmelt";
SAFARI: "Safari";
SAFARI_MOBILE: "Mobile Safari";
SAILFISH: "Sailfish Browser";
SAMSUNG: "Samsung Internet";
SEAMONKEY: "SeaMonkey";
SILK: "Silk";
SKYFIRE: "Skyfire";
SLEIPNIR: "Sleipnir";
SLIMBOAT: "SlimBoat";
SLIMBROWSER: "SlimBrowser";
SLIMJET: "Slimjet";
SNAPCHAT: "Snapchat";
SOGOU_EXPLORER: "Sogou Explorer";
SOGOU_MOBILE: "Sogou Mobile";
SURF: "Surf";
SWIFTFOX: "Swiftfox";
TESLA: "Tesla";
TIKTOK: "TikTok";
TIZEN: "Tizen Browser";
TWITTER: "Twitter";
UC: "UCBrowser";
UP: "UP.Browser";
VIVALDI: "Vivaldi";
VIVO: "Vivo Browser";
W3M: "w3m";
WATERFOX: "Waterfox";
WEBKIT: "WebKit";
WECHAT: "WeChat";
WEIBO: "Weibo";
WHALE: "Whale";
WOLVIC: "Wolvic";
YANDEX: "Yandex";
}>;
export const BrowserType: Readonly<{
CRAWLER: "crawler";
CLI: "cli";
EMAIL: "email";
FETCHER: "fetcher";
INAPP: "inapp";
MEDIAPLAYER: "mediaplayer";
LIBRARY: "library";
}>;
export const CPU: Readonly<{
'68K': "68k";
ARM: "arm";
ARM_64: "arm64";
ARM_HF: "armhf";
AVR: "avr";
AVR_32: "avr32";
IA64: "ia64";
IRIX: "irix";
IRIX_64: "irix64";
MIPS: "mips";
MIPS_64: "mips64";
PA_RISC: "pa-risc";
PPC: "ppc";
SPARC: "sparc";
SPARC_64: "sparc64";
X86: "ia32";
X86_64: "amd64";
}>;
export const Device: Readonly<{
CONSOLE: "console";
DESKTOP: "desktop";
EMBEDDED: "embedded";
MOBILE: "mobile";
SMARTTV: "smarttv";
TABLET: "tablet";
WEARABLE: "wearable";
XR: "xr";
}>;
export const Vendor: Readonly<{
ACER: "Acer";
ADVAN: "Advan";
ALCATEL: "Alcatel";
APPLE: "Apple";
AMAZON: "Amazon";
ARCHOS: "Archos";
ASUS: "ASUS";
ATT: "AT&T";
BENQ: "BenQ";
BLACKBERRY: "BlackBerry";
CAT: "Cat";
DELL: "Dell";
ENERGIZER: "Energizer";
ESSENTIAL: "Essential";
FACEBOOK: "Facebook";
FAIRPHONE: "Fairphone";
GEEKSPHONE: "GeeksPhone";
GENERIC: "Generic";
GOOGLE: "Google";
HMD: "HMD";
HP: "HP";
HTC: "HTC";
HUAWEI: "Huawei";
IMO: "IMO";
INFINIX: "Infinix";
ITEL: "itel";
JOLLA: "Jolla";
KOBO: "Kobo";
LENOVO: "Lenovo";
LG: "LG";
MEIZU: "Meizu";
MICROMAX: "Micromax";
MICROSOFT: "Microsoft";
MOTOROLA: "Motorola";
NEXIAN: "Nexian";
NINTENDO: "Nintendo";
NOKIA: "Nokia";
NOTHING: "Nothing";
NVIDIA: "Nvidia";
ONEPLUS: "OnePlus";
OPPO: "OPPO";
OUYA: "Ouya";
PALM: "Palm";
PANASONIC: "Panasonic";
PEBBLE: "Pebble";
PICO: "Pico";
POLYTRON: "Polytron";
REALME: "Realme";
RIM: "RIM";
ROKU: "Roku";
SAMSUNG: "Samsung";
SHARP: "Sharp";
SIEMENS: "Siemens";
SMARTFREN: "Smartfren";
SONY: "Sony";
SPRINT: "Sprint";
TCL: "TCL";
TECHNISAT: "TechniSAT";
TECNO: "Tecno";
TESLA: "Tesla";
ULEFONE: "Ulefone";
VIVO: "Vivo";
VODAFONE: "Vodafone";
XBOX: "Xbox";
XIAOMI: "Xiaomi";
ZEBRA: "Zebra";
ZTE: "ZTE";
}>;
export const Engine: Readonly<{
AMAYA: "Amaya";
ARKWEB: "ArkWeb";
BLINK: "Blink";
EDGEHTML: "EdgeHTML";
FLOW: "Flow";
GECKO: "Gecko";
GOANNA: "Goanna";
ICAB: "iCab";
KHTML: "KHTML";
LIBWEB: "LibWeb";
LINKS: "Links";
LYNX: "Lynx";
NETFRONT: "NetFront";
NETSURF: "NetSurf";
PRESTO: "Presto";
SERVO: "Servo";
TASMAN: "Tasman";
TRIDENT: "Trident";
W3M: "w3m";
WEBKIT: "WebKit";
}>;
export const OS: Readonly<{
AIX: "AIX";
AMIGA_OS: "Amiga OS";
ANDROID: "Android";
ANDROID_X86: "Android-x86";
ARCH: "Arch";
BADA: "Bada";
BEOS: "BeOS";
BLACKBERRY: "BlackBerry";
CENTOS: "CentOS";
CHROME_OS: "Chrome OS";
CHROMECAST: "Chromecast";
CHROMECAST_ANDROID: "Chromecast Android";
CHROMECAST_FUCHSIA: "Chromecast Fuchsia";
CHROMECAST_LINUX: "Chromecast Linux";
CHROMECAST_SMARTSPEAKER: "Chromecast SmartSpeaker";
CONTIKI: "Contiki";
DEBIAN: "Debian";
DEEPIN: "Deepin";
DRAGONFLY: "DragonFly";
ELEMENTARY_OS: "elementary OS";
FEDORA: "Fedora";
FIREFOX_OS: "Firefox OS";
FREEBSD: "FreeBSD";
FUCHSIA: "Fuchsia";
GENTOO: "Gentoo";
GHOSTBSD: "GhostBSD";
GNU: "GNU";
HAIKU: "Haiku";
HARMONYOS: "HarmonyOS";
HP_UX: "HP-UX";
HURD: "Hurd";
IOS: "iOS";
JOLI: "Joli";
KAIOS: "KaiOS";
KUBUNTU: "Kubuntu";
LINPUS: "Linpus";
LINSPIRE: "Linspire";
LINUX: "Linux";
MACOS: "macOS";
MAEMO: "Maemo";
MAGEIA: "Mageia";
MANDRIVA: "Mandriva";
MANJARO: "Manjaro";
MEEGO: "MeeGo";
MINIX: "Minix";
MINT: "Mint";
MORPH_OS: "Morph OS";
NETBSD: "NetBSD";
NETRANGE: "NetRange";
NETTV: "NetTV";
NINTENDO: "Nintendo";
OPENHARMONY: "OpenHarmony";
OPENBSD: "OpenBSD";
OPENVMS: "OpenVMS";
OS2: "OS/2";
PALM: "Palm";
PC_BSD: "PC-BSD";
PCLINUXOS: "PCLinuxOS";
PICO: "Pico";
PLAN9: "Plan9";
PLAYSTATION: "PlayStation";
QNX: "QNX";
RASPBIAN: "Raspbian";
REDHAT: "RedHat";
RIM_TABLET_OS: "RIM Tablet OS";
RISC_OS: "RISC OS";
SABAYON: "Sabayon";
SAILFISH: "Sailfish";
SERENITYOS: "SerenityOS";
SERIES40: "Series40";
SLACKWARE: "Slackware";
SOLARIS: "Solaris";
SUSE: "SUSE";
SYMBIAN: "Symbian";
TIZEN: "Tizen";
UBUNTU: "Ubuntu";
UBUNTU_TOUCH: "Ubuntu Touch",
UNIX: "Unix";
VECTORLINUX: "VectorLinux";
WATCHOS: "watchOS";
WEBOS: "WebOS";
WINDOWS: "Windows";
WINDOWS_IOT: "Windows IoT";
WINDOWS_MOBILE: "Windows Mobile";
WINDOWS_PHONE: "Windows Phone";
XBOX: "Xbox";
ZENWALK: "Zenwalk";
}>;

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Enums for UAParser.js v2.0.3 /* Enums for UAParser.js v2.0.0
https://github.com/faisalman/ua-parser-js https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com> Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */ AGPLv3 License */
@@ -21,7 +21,6 @@ const Browser = Object.freeze({
BAIDU: 'Baidu Browser', BAIDU: 'Baidu Browser',
BASILISK: 'Basilisk', BASILISK: 'Basilisk',
BLAZER: 'Blazer', BLAZER: 'Blazer',
BLU: 'BLU',
BOLT: 'Bolt', BOLT: 'Bolt',
BOWSER: 'Bowser', BOWSER: 'Bowser',
BRAVE: 'Brave', BRAVE: 'Brave',
@@ -35,14 +34,11 @@ const Browser = Object.freeze({
COBALT: 'Cobalt', COBALT: 'Cobalt',
COC_COC: 'Coc Coc', COC_COC: 'Coc Coc',
CONKEROR: 'Conkeror', CONKEROR: 'Conkeror',
DAUM: 'Daum',
DILLO: 'Dillo', DILLO: 'Dillo',
DOLPHIN: 'Dolphin', DOLPHIN: 'Dolphin',
DOOBLE: 'Dooble',
DORIS: 'Doris', DORIS: 'Doris',
DRAGON: 'Dragon', DRAGON: 'Dragon',
DUCKDUCKGO: 'DuckDuckGo', DUCKDUCKGO: 'DuckDuckGo',
ECOSIA: 'Ecosia',
EDGE: 'Edge', EDGE: 'Edge',
EPIPHANY: 'Epiphany', EPIPHANY: 'Epiphany',
FACEBOOK: 'Facebook', FACEBOOK: 'Facebook',
@@ -80,8 +76,6 @@ const Browser = Object.freeze({
KLARNA: 'Klarna', KLARNA: 'Klarna',
KINDLE: 'Kindle', KINDLE: 'Kindle',
LENOVO: 'Smart Lenovo Browser', LENOVO: 'Smart Lenovo Browser',
LADYBIRD: 'Ladybird',
LG: 'LG Browser',
LIBREWOLF: 'LibreWolf', LIBREWOLF: 'LibreWolf',
LIEBAO: 'LBBROWSER', LIEBAO: 'LBBROWSER',
LINE: 'Line', LINE: 'Line',
@@ -106,12 +100,10 @@ const Browser = Object.freeze({
OMNIWEB: 'OmniWeb', OMNIWEB: 'OmniWeb',
OPERA: 'Opera', OPERA: 'Opera',
OPERA_COAST: 'Opera Coast', OPERA_COAST: 'Opera Coast',
OPERA_GX: 'Opera GX',
OPERA_MINI: 'Opera Mini', OPERA_MINI: 'Opera Mini',
OPERA_MOBI: 'Opera Mobi', OPERA_MOBI: 'Opera Mobi',
OPERA_TABLET: 'Opera Tablet', OPERA_TABLET: 'Opera Tablet',
OPERA_TOUCH: 'Opera Touch', OPERA_TOUCH: 'Opera Touch',
OTTER: 'Otter',
OVI: 'OviBrowser', OVI: 'OviBrowser',
PALEMOON: 'PaleMoon', PALEMOON: 'PaleMoon',
PHANTOMJS: 'PhantomJS', PHANTOMJS: 'PhantomJS',
@@ -123,7 +115,6 @@ const Browser = Object.freeze({
QQ_LITE: 'QQBrowserLite', QQ_LITE: 'QQBrowserLite',
QUARK: 'Quark', QUARK: 'Quark',
QUPZILLA: 'QupZilla', QUPZILLA: 'QupZilla',
QUTEBROWSER: 'qutebrowser',
REKONQ: 'rekonq', REKONQ: 'rekonq',
ROCKMELT: 'Rockmelt', ROCKMELT: 'Rockmelt',
SAFARI: 'Safari', SAFARI: 'Safari',
@@ -140,7 +131,6 @@ const Browser = Object.freeze({
SNAPCHAT: 'Snapchat', SNAPCHAT: 'Snapchat',
SOGOU_EXPLORER: 'Sogou Explorer', SOGOU_EXPLORER: 'Sogou Explorer',
SOGOU_MOBILE: 'Sogou Mobile', SOGOU_MOBILE: 'Sogou Mobile',
SURF: 'Surf',
SWIFTFOX: 'Swiftfox', SWIFTFOX: 'Swiftfox',
TESLA: 'Tesla', TESLA: 'Tesla',
TIKTOK: 'TikTok', TIKTOK: 'TikTok',
@@ -375,13 +365,11 @@ const OS = Object.freeze({
SYMBIAN: 'Symbian', SYMBIAN: 'Symbian',
TIZEN: 'Tizen', TIZEN: 'Tizen',
UBUNTU: 'Ubuntu', UBUNTU: 'Ubuntu',
UBUNTU_TOUCH: 'Ubuntu Touch',
UNIX: 'Unix', UNIX: 'Unix',
VECTORLINUX: 'VectorLinux', VECTORLINUX: 'VectorLinux',
WATCHOS: 'watchOS', WATCHOS: 'watchOS',
WEBOS: 'WebOS', WEBOS: 'WebOS',
WINDOWS: 'Windows', WINDOWS: 'Windows',
WINDOWS_IOT: 'Windows IoT',
WINDOWS_MOBILE: 'Windows Mobile', WINDOWS_MOBILE: 'Windows Mobile',
WINDOWS_PHONE: 'Windows Phone', WINDOWS_PHONE: 'Windows Phone',
XBOX: 'Xbox', XBOX: 'Xbox',

View File

@@ -3,7 +3,7 @@
// Source: /src/enums/ua-parser-enums.js // Source: /src/enums/ua-parser-enums.js
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Enums for UAParser.js v2.0.3 /* Enums for UAParser.js v2.0.0
https://github.com/faisalman/ua-parser-js https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com> Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */ AGPLv3 License */
@@ -25,7 +25,6 @@ const Browser = Object.freeze({
BAIDU: 'Baidu Browser', BAIDU: 'Baidu Browser',
BASILISK: 'Basilisk', BASILISK: 'Basilisk',
BLAZER: 'Blazer', BLAZER: 'Blazer',
BLU: 'BLU',
BOLT: 'Bolt', BOLT: 'Bolt',
BOWSER: 'Bowser', BOWSER: 'Bowser',
BRAVE: 'Brave', BRAVE: 'Brave',
@@ -39,14 +38,11 @@ const Browser = Object.freeze({
COBALT: 'Cobalt', COBALT: 'Cobalt',
COC_COC: 'Coc Coc', COC_COC: 'Coc Coc',
CONKEROR: 'Conkeror', CONKEROR: 'Conkeror',
DAUM: 'Daum',
DILLO: 'Dillo', DILLO: 'Dillo',
DOLPHIN: 'Dolphin', DOLPHIN: 'Dolphin',
DOOBLE: 'Dooble',
DORIS: 'Doris', DORIS: 'Doris',
DRAGON: 'Dragon', DRAGON: 'Dragon',
DUCKDUCKGO: 'DuckDuckGo', DUCKDUCKGO: 'DuckDuckGo',
ECOSIA: 'Ecosia',
EDGE: 'Edge', EDGE: 'Edge',
EPIPHANY: 'Epiphany', EPIPHANY: 'Epiphany',
FACEBOOK: 'Facebook', FACEBOOK: 'Facebook',
@@ -84,8 +80,6 @@ const Browser = Object.freeze({
KLARNA: 'Klarna', KLARNA: 'Klarna',
KINDLE: 'Kindle', KINDLE: 'Kindle',
LENOVO: 'Smart Lenovo Browser', LENOVO: 'Smart Lenovo Browser',
LADYBIRD: 'Ladybird',
LG: 'LG Browser',
LIBREWOLF: 'LibreWolf', LIBREWOLF: 'LibreWolf',
LIEBAO: 'LBBROWSER', LIEBAO: 'LBBROWSER',
LINE: 'Line', LINE: 'Line',
@@ -110,12 +104,10 @@ const Browser = Object.freeze({
OMNIWEB: 'OmniWeb', OMNIWEB: 'OmniWeb',
OPERA: 'Opera', OPERA: 'Opera',
OPERA_COAST: 'Opera Coast', OPERA_COAST: 'Opera Coast',
OPERA_GX: 'Opera GX',
OPERA_MINI: 'Opera Mini', OPERA_MINI: 'Opera Mini',
OPERA_MOBI: 'Opera Mobi', OPERA_MOBI: 'Opera Mobi',
OPERA_TABLET: 'Opera Tablet', OPERA_TABLET: 'Opera Tablet',
OPERA_TOUCH: 'Opera Touch', OPERA_TOUCH: 'Opera Touch',
OTTER: 'Otter',
OVI: 'OviBrowser', OVI: 'OviBrowser',
PALEMOON: 'PaleMoon', PALEMOON: 'PaleMoon',
PHANTOMJS: 'PhantomJS', PHANTOMJS: 'PhantomJS',
@@ -127,7 +119,6 @@ const Browser = Object.freeze({
QQ_LITE: 'QQBrowserLite', QQ_LITE: 'QQBrowserLite',
QUARK: 'Quark', QUARK: 'Quark',
QUPZILLA: 'QupZilla', QUPZILLA: 'QupZilla',
QUTEBROWSER: 'qutebrowser',
REKONQ: 'rekonq', REKONQ: 'rekonq',
ROCKMELT: 'Rockmelt', ROCKMELT: 'Rockmelt',
SAFARI: 'Safari', SAFARI: 'Safari',
@@ -144,7 +135,6 @@ const Browser = Object.freeze({
SNAPCHAT: 'Snapchat', SNAPCHAT: 'Snapchat',
SOGOU_EXPLORER: 'Sogou Explorer', SOGOU_EXPLORER: 'Sogou Explorer',
SOGOU_MOBILE: 'Sogou Mobile', SOGOU_MOBILE: 'Sogou Mobile',
SURF: 'Surf',
SWIFTFOX: 'Swiftfox', SWIFTFOX: 'Swiftfox',
TESLA: 'Tesla', TESLA: 'Tesla',
TIKTOK: 'TikTok', TIKTOK: 'TikTok',
@@ -227,7 +217,6 @@ const Vendor = Object.freeze({
GEEKSPHONE: 'GeeksPhone', GEEKSPHONE: 'GeeksPhone',
GENERIC: 'Generic', GENERIC: 'Generic',
GOOGLE: 'Google', GOOGLE: 'Google',
HMD: 'HMD',
HP: 'HP', HP: 'HP',
HTC: 'HTC', HTC: 'HTC',
HUAWEI: 'Huawei', HUAWEI: 'Huawei',
@@ -337,7 +326,6 @@ const OS = Object.freeze({
IOS: 'iOS', IOS: 'iOS',
JOLI: 'Joli', JOLI: 'Joli',
KAIOS: 'KaiOS', KAIOS: 'KaiOS',
KUBUNTU: 'Kubuntu',
LINPUS: 'Linpus', LINPUS: 'Linpus',
LINSPIRE: 'Linspire', LINSPIRE: 'Linspire',
LINUX: 'Linux', LINUX: 'Linux',
@@ -379,13 +367,11 @@ const OS = Object.freeze({
SYMBIAN: 'Symbian', SYMBIAN: 'Symbian',
TIZEN: 'Tizen', TIZEN: 'Tizen',
UBUNTU: 'Ubuntu', UBUNTU: 'Ubuntu',
UBUNTU_TOUCH: 'Ubuntu Touch',
UNIX: 'Unix', UNIX: 'Unix',
VECTORLINUX: 'VectorLinux', VECTORLINUX: 'VectorLinux',
WATCHOS: 'watchOS', WATCHOS: 'watchOS',
WEBOS: 'WebOS', WEBOS: 'WebOS',
WINDOWS: 'Windows', WINDOWS: 'Windows',
WINDOWS_IOT: 'Windows IoT',
WINDOWS_MOBILE: 'Windows Mobile', WINDOWS_MOBILE: 'Windows Mobile',
WINDOWS_PHONE: 'Windows Phone', WINDOWS_PHONE: 'Windows Phone',
XBOX: 'Xbox', XBOX: 'Xbox',

View File

@@ -1,4 +1,4 @@
// Type definitions for Helpers submodule of UAParser.js v2.0.3 // Type definitions for Helpers submodule of UAParser.js v2.0.0
// Project: https://github.com/faisalman/ua-parser-js // Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman> // Definitions by: Faisal Salman <https://github.com/faisalman>
@@ -13,4 +13,3 @@ export const Fetchers: UAParserExt;
export const InApps: UAParserExt; export const InApps: UAParserExt;
export const Libraries: UAParserExt; export const Libraries: UAParserExt;
export const MediaPlayers: UAParserExt; export const MediaPlayers: UAParserExt;
export const Vehicles: UAParserExt;

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Extensions for UAParser.js v2.0.3 /* Extensions for UAParser.js v2.0.0
https://github.com/faisalman/ua-parser-js https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com> Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */ AGPLv3 License */
@@ -42,25 +42,25 @@ const Crawlers = Object.freeze({
[ [
// AhrefsBot - https://ahrefs.com/robot // AhrefsBot - https://ahrefs.com/robot
// Amazonbot - https://developer.amazon.com/amazonbot // Amazonbot - https://developer.amazon.com/amazonbot
// Bingbot / AdIdxBot - https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0 // Bingbot - http://www.bing.com/bingbot.htm
// CCBot - https://commoncrawl.org/faq // CCBot - https://commoncrawl.org/faq
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot // Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html // DuckDuckBot - http://duckduckgo.com/duckduckbot.html
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/ // FacebookBot - https://developers.facebook.com/docs/sharing/bot/
// GPTBot - https://platform.openai.com/docs/gptbot // GPTBot - https://platform.openai.com/docs/gptbot
// LinkedInBot - http://www.linkedin.com
// MJ12bot - https://mj12bot.com/ // MJ12bot - https://mj12bot.com/
// MojeekBot - https://www.mojeek.com/bot.html // MojeekBot - https://www.mojeek.com/bot.html
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots // OpenAI's SearchGPT - https://platform.openai.com/docs/bots
// PerplexityBot - https://perplexity.ai/perplexitybot // PerplexityBot - https://perplexity.ai/perplexitybot
// SemrushBot - http://www.semrush.com/bot.html
// SeznamBot - http://napoveda.seznam.cz/seznambot-intro // SeznamBot - http://napoveda.seznam.cz/seznambot-intro
/((?:adidx|ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|linkedin|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i, /((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i,
// Applebot - http://apple.com/go/applebot // Applebot - http://apple.com/go/applebot
/(applebot(?:-extended)?)\/?([\w\.]*)/i, /(applebot(?:-extended)?)\/([\w\.]+)/i,
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001 // Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
/(baiduspider[-imagevdonwsfcpr]{0,7})\/?([\w\.]*)/i, /(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
// ClaudeBot (Anthropic) // ClaudeBot (Anthropic)
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i, /(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
@@ -78,9 +78,6 @@ const Crawlers = Object.freeze({
// Internet Archive (archive.org) // Internet Archive (archive.org)
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i, /(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
// SemrushBot - http://www.semrush.com/bot.html
/((?:semrush|splitsignal)bot[-abcfimostw]*)\/?([\w\.-]*)/i,
// Sogou Spider // Sogou Spider
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i, /(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
@@ -93,8 +90,8 @@ const Crawlers = Object.freeze({
// Yeti (Naver) // Yeti (Naver)
/(yeti)\/([\w\.]+)/i, /(yeti)\/([\w\.]+)/i,
// aiHitBot / Diffbot / Linespider / Magpie-Crawler / Omgilibot / OpenAI Image Downloader / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot // aiHitBot / Diffbot / Magpie-Crawler / Omgilibot / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot
/((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|openai image downloader|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |line|yisou)spider)\/?([\w\.]*)/i /((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |yisou)spider)\/?([\w\.]*)/i
], ],
[NAME, VERSION, [TYPE, CRAWLER]], [NAME, VERSION, [TYPE, CRAWLER]],
@@ -111,7 +108,7 @@ const Crawlers = Object.freeze({
// Qihoo 360Spider // Qihoo 360Spider
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html // TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp // Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
/\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|yahoo! slurp)/i /\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|(?=yahoo! )slurp)/i
], ],
[NAME, [TYPE, CRAWLER]] [NAME, [TYPE, CRAWLER]]
] ]
@@ -220,35 +217,33 @@ const Fetchers = Object.freeze({
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit // AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot // ChatGPT-User - https://platform.openai.com/docs/plugins/bot
// DuckAssistBot - https://duckduckgo.com/duckassistbot/ // DuckAssistBot - https://duckduckgo.com/duckassistbot/
// Better Uptime / BingPreview / Mastodon / MicrosoftPreview / Pinterestbot / Redditbot / Rogerbot / SiteAuditBot / Telegrambot / Twitterbot / UptimeRobot // BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
// Google Site Verifier / Meta / Yahoo! Japan /(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
// Yandex Bots - https://yandex.com/bots
/(ahrefssiteaudit|(?:bing|microsoft)preview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|siteaudit|twitter|uptimero)bot|google-site-verification|meta-externalfetcher|y!?j-dlc|yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
// Bluesky // Google Site Verifier
/(bluesky) cardyb\/([\w\.]+)/i, /(google-site-verification)\/([\w\.]+)/i,
// Skype // Meta
/(skypeuripreview) preview\/([\w\.]+)/i, /(meta-externalfetcher)\/([\w\.]+)/i,
// Slackbot - https://api.slack.com/robots // Slackbot - https://api.slack.com/robots
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i, /(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
// WhatsApp // WhatsApp
/(whatsapp)\/([\w\.]+)/i /(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
// Yahoo! Japan
/(y!?j-dlc)\/([\w\.]+)/i,
// Yandex Bots - https://yandex.com/bots
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
/(yandex(?:sitelinks|userproxy))/i
], ],
[NAME, VERSION, [TYPE, FETCHER]], [NAME, VERSION, [TYPE, FETCHER]],
[ // Google Bots / Cohere / Snapchat / Vercelbot
// Google Bots / Cohere / Snapchat / Vercelbot / Yandex Bots [/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
/((?:better uptime |telegram|vercel)bot|cohere-ai|feedfetcher-google|google(?:imageproxy|-read-aloud|-pagerenderer|producer)|snap url preview|yandex(?:sitelinks|userproxy))/i
],
[NAME, [TYPE, FETCHER]], [NAME, [TYPE, FETCHER]],
],
os : [
[/whatsapp\/[\d\.]+ (a|i)/i],
[[NAME, os => os == 'A' ? 'Android' : 'iOS' ]]
] ]
}); });
@@ -259,12 +254,10 @@ const Fetchers = Object.freeze({
const InApps = Object.freeze({ const InApps = Object.freeze({
browser : [ browser : [
// Slack // Slack
[/(?:slack(?=.+electron|.+ios)|chatlyio)\/([\d\.]+)/i], [/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, INAPP]],
[VERSION, [NAME, 'Slack'], [TYPE, INAPP]],
// Yahoo! Japan // Yahoo! Japan
[/jp\.co\.yahoo\.(?:android\.yjtop|ipn\.appli)\/([\d\.]+)/i], [/jp\.co\.yahoo\.android\.yjtop\/([\d\.]+)/i], [VERSION, 'Yahoo! Japan', [TYPE, INAPP]]
[VERSION, [NAME, 'Yahoo! Japan'], [TYPE, INAPP]]
] ]
}); });
@@ -334,29 +327,6 @@ const Libraries = Object.freeze({
] ]
}); });
/////////////
// VEHICLES
////////////
const Vehicles = Object.freeze({
device : [
[/aftlbt962e2/i], // BMW
[[VENDOR, 'BMW']],
[/dilink.+(byd) auto/i], // BYD
[VENDOR],
[/aftlft962x3/i], // Jeep
[[VENDOR, 'Jeep'], [MODEL, 'Wagooner']],
[/(rivian) (r1t)/i], // Rivian
[VENDOR, MODEL],
[/vcc.+netfront/i], // Volvo
[[VENDOR, 'Volvo']]
]
});
////////// //////////
// BOTS // BOTS
///////// /////////
@@ -367,9 +337,6 @@ const Bots = Object.freeze({
...Crawlers.browser, ...Crawlers.browser,
...Fetchers.browser, ...Fetchers.browser,
...Libraries.browser ...Libraries.browser
],
os : [
...Fetchers.os
] ]
}); });
@@ -382,6 +349,5 @@ module.exports = {
Fetchers, Fetchers,
InApps, InApps,
Libraries, Libraries,
MediaPlayers, MediaPlayers
Vehicles
}; };

View File

@@ -3,7 +3,7 @@
// Source: /src/extensions/ua-parser-extensions.js // Source: /src/extensions/ua-parser-extensions.js
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Extensions for UAParser.js v2.0.3 /* Extensions for UAParser.js v2.0.0
https://github.com/faisalman/ua-parser-js https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com> Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */ AGPLv3 License */
@@ -46,25 +46,25 @@ const Crawlers = Object.freeze({
[ [
// AhrefsBot - https://ahrefs.com/robot // AhrefsBot - https://ahrefs.com/robot
// Amazonbot - https://developer.amazon.com/amazonbot // Amazonbot - https://developer.amazon.com/amazonbot
// Bingbot / AdIdxBot - https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0 // Bingbot - http://www.bing.com/bingbot.htm
// CCBot - https://commoncrawl.org/faq // CCBot - https://commoncrawl.org/faq
// Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot // Dotbot - https://moz.com/help/moz-procedures/crawlers/dotbot
// DuckDuckBot - http://duckduckgo.com/duckduckbot.html // DuckDuckBot - http://duckduckgo.com/duckduckbot.html
// FacebookBot - https://developers.facebook.com/docs/sharing/bot/ // FacebookBot - https://developers.facebook.com/docs/sharing/bot/
// GPTBot - https://platform.openai.com/docs/gptbot // GPTBot - https://platform.openai.com/docs/gptbot
// LinkedInBot - http://www.linkedin.com
// MJ12bot - https://mj12bot.com/ // MJ12bot - https://mj12bot.com/
// MojeekBot - https://www.mojeek.com/bot.html // MojeekBot - https://www.mojeek.com/bot.html
// OpenAI's SearchGPT - https://platform.openai.com/docs/bots // OpenAI's SearchGPT - https://platform.openai.com/docs/bots
// PerplexityBot - https://perplexity.ai/perplexitybot // PerplexityBot - https://perplexity.ai/perplexitybot
// SemrushBot - http://www.semrush.com/bot.html
// SeznamBot - http://napoveda.seznam.cz/seznambot-intro // SeznamBot - http://napoveda.seznam.cz/seznambot-intro
/((?:adidx|ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|linkedin|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i, /((?:ahrefs|amazon|bing|cc|dot|duckduck|exa|facebook|gpt|mj12|mojeek|oai-search|perplexity|semrush|seznam)bot)\/([\w\.-]+)/i,
// Applebot - http://apple.com/go/applebot // Applebot - http://apple.com/go/applebot
/(applebot(?:-extended)?)\/?([\w\.]*)/i, /(applebot(?:-extended)?)\/([\w\.]+)/i,
// Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001 // Baiduspider https://help.baidu.com/question?prod_id=99&class=0&id=3001
/(baiduspider[-imagevdonwsfcpr]{0,7})\/?([\w\.]*)/i, /(baiduspider)[-imagevdonsfcpr]{0,6}\/([\w\.]+)/i,
// ClaudeBot (Anthropic) // ClaudeBot (Anthropic)
/(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i, /(claude(?:bot|-web)|anthropic-ai)\/?([\w\.]*)/i,
@@ -82,9 +82,6 @@ const Crawlers = Object.freeze({
// Internet Archive (archive.org) // Internet Archive (archive.org)
/(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i, /(ia_archiver|archive\.org_bot)\/?([\w\.]*)/i,
// SemrushBot - http://www.semrush.com/bot.html
/((?:semrush|splitsignal)bot[-abcfimostw]*)\/?([\w\.-]*)/i,
// Sogou Spider // Sogou Spider
/(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i, /(sogou (?:pic|head|web|orion|news) spider)\/([\w\.]+)/i,
@@ -97,8 +94,8 @@ const Crawlers = Object.freeze({
// Yeti (Naver) // Yeti (Naver)
/(yeti)\/([\w\.]+)/i, /(yeti)\/([\w\.]+)/i,
// aiHitBot / Diffbot / Linespider / Magpie-Crawler / Omgilibot / OpenAI Image Downloader / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot // aiHitBot / Diffbot / Magpie-Crawler / Omgilibot / Webzio-Extended / Screaming Frog SEO Spider / Timpibot / VelenPublicWebCrawler / YisouSpider / YouBot
/((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|openai image downloader|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |line|yisou)spider)\/?([\w\.]*)/i /((?:aihit|diff|timpi|you)bot|omgili(?:bot)?|(?:magpie-|velenpublicweb)crawler|webzio-extended|(?:screaming frog seo |yisou)spider)\/?([\w\.]*)/i
], ],
[NAME, VERSION, [TYPE, CRAWLER]], [NAME, VERSION, [TYPE, CRAWLER]],
@@ -115,7 +112,7 @@ const Crawlers = Object.freeze({
// Qihoo 360Spider // Qihoo 360Spider
// TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html // TurnitinBot - https://www.turnitin.com/robot/crawlerinfo.html
// Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp // Yahoo! Slurp - http://help.yahoo.com/help/us/ysearch/slurp
/\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|yahoo! slurp)/i /\b(360spider-?(?:image|video)?|bytespider|(?:ai2|aspiegel|dataforseo|imagesift|petal|turnitin)bot|teoma|(?=yahoo! )slurp)/i
], ],
[NAME, [TYPE, CRAWLER]] [NAME, [TYPE, CRAWLER]]
] ]
@@ -168,7 +165,7 @@ const ExtraDevices = Object.freeze({
/\b(zur\d{3}) b/i // Swiss ZUR Tablet /\b(zur\d{3}) b/i // Swiss ZUR Tablet
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
/^((zeki)?tb.*\b) b/i // Zeki Tablets /\b((zeki)?tb.*\b) b/i // Zeki Tablets
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
/\b([yr]\d{2}) b/i, /\b([yr]\d{2}) b/i,
@@ -224,35 +221,33 @@ const Fetchers = Object.freeze({
// AhrefsSiteAudit - https://ahrefs.com/robot/site-audit // AhrefsSiteAudit - https://ahrefs.com/robot/site-audit
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot // ChatGPT-User - https://platform.openai.com/docs/plugins/bot
// DuckAssistBot - https://duckduckgo.com/duckassistbot/ // DuckAssistBot - https://duckduckgo.com/duckassistbot/
// Better Uptime / BingPreview / Mastodon / MicrosoftPreview / Pinterestbot / Redditbot / Rogerbot / SiteAuditBot / Telegrambot / Twitterbot / UptimeRobot // BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
// Google Site Verifier / Meta / Yahoo! Japan /(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
// Yandex Bots - https://yandex.com/bots
/(ahrefssiteaudit|(?:bing|microsoft)preview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|siteaudit|twitter|uptimero)bot|google-site-verification|meta-externalfetcher|y!?j-dlc|yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
// Bluesky // Google Site Verifier
/(bluesky) cardyb\/([\w\.]+)/i, /(google-site-verification)\/([\w\.]+)/i,
// Skype // Meta
/(skypeuripreview) preview\/([\w\.]+)/i, /(meta-externalfetcher)\/([\w\.]+)/i,
// Slackbot - https://api.slack.com/robots // Slackbot - https://api.slack.com/robots
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i, /(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
// WhatsApp // WhatsApp
/(whatsapp)\/([\w\.]+)/i /(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
// Yahoo! Japan
/(y!?j-dlc)\/([\w\.]+)/i,
// Yandex Bots - https://yandex.com/bots
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
/(yandex(?:sitelinks|userproxy))/i
], ],
[NAME, VERSION, [TYPE, FETCHER]], [NAME, VERSION, [TYPE, FETCHER]],
[ // Google Bots / Cohere / Snapchat / Vercelbot
// Google Bots / Cohere / Snapchat / Vercelbot / Yandex Bots [/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
/((?:better uptime |telegram|vercel)bot|cohere-ai|feedfetcher-google|google(?:imageproxy|-read-aloud|-pagerenderer|producer)|snap url preview|yandex(?:sitelinks|userproxy))/i
],
[NAME, [TYPE, FETCHER]], [NAME, [TYPE, FETCHER]],
],
os : [
[/whatsapp\/[\d\.]+ (a|i)/i],
[[NAME, os => os == 'A' ? 'Android' : 'iOS' ]]
] ]
}); });
@@ -263,12 +258,10 @@ const Fetchers = Object.freeze({
const InApps = Object.freeze({ const InApps = Object.freeze({
browser : [ browser : [
// Slack // Slack
[/(?:slack(?=.+electron|.+ios)|chatlyio)\/([\d\.]+)/i], [/chatlyio\/([\d\.]+)/i], [VERSION, 'Slack', [TYPE, INAPP]],
[VERSION, [NAME, 'Slack'], [TYPE, INAPP]],
// Yahoo! Japan // Yahoo! Japan
[/jp\.co\.yahoo\.(?:android\.yjtop|ipn\.appli)\/([\d\.]+)/i], [/jp\.co\.yahoo\.android\.yjtop\/([\d\.]+)/i], [VERSION, 'Yahoo! Japan', [TYPE, INAPP]]
[VERSION, [NAME, 'Yahoo! Japan'], [TYPE, INAPP]]
] ]
}); });
@@ -278,48 +271,104 @@ const InApps = Object.freeze({
const MediaPlayers = Object.freeze({ const MediaPlayers = Object.freeze({
browser : [[ browser : [[
/(apple(?:coremedia|tv))\/([\w\._]+)/i, // Generic Apple CoreMedia
/(coremedia) v([\w\._]+)/i, /(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
// Ares/Nexplayer/OSSProxy /(coremedia) v([\w\._]+)/i
/(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i, ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
// Aqualung/Lyssna/BSPlayer/Clementine/MPD
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/GnomeMplayer/MoC /(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
// NSPlayer/PSP-InternetRadioPlayer/Videos // NSPlayer/PSP-InternetRadioPlayer/Videos
// Nero Home/Nero Scout/Nokia /(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
// QuickTime/RealMedia/RadioApp/RadioClientApplication/ /(lg player|nexplayer)\s([\d\.]+)/i,
// SoundTap/Totem/Stagefright/Streamium /player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
// XBMC/gvfs/Xine/XMMS/irapp ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/^(aqualung|audacious|audimusicstream|amarok|bass|bsplayer|core|gnomemplayer|gvfs|irapp|lyssna|music on console|nero (?:home|scout)|nokia\d+|nsplayer|psp-internetradioplayer|quicktime|rma|radioapp|radioclientapplication|soundtap|stagefright|streamium|totem|videos|xbmc|xine|xmms)\/([\w\.-]+)/i, /(nexplayer)\s([\w\.-]+)/i // Nexplayer
/(lg player|nexplayer) ([\d\.]+)/i,
/player\/(nexplayer|lg player) ([\w\.-]+)/i, // NexPlayer/LG Player
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i, // Gstreamer
/(htc streaming player) [\w_]+ \/ ([\d\.]+)/i, // HTC Streaming Player
/(lavf)([\d\.]+)/i, // Lavf (FFMPEG)
// MPlayer SVN
/(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
/ (songbird)\/([\w\.-]+)/i, // Songbird/Philips-Songbird
/(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i, // Winamp
/(vlc)(?:\/| media player - version )([\w\.-]+)/i, // VLC Videolan
/^(foobar2000|itunes|smp)\/([\d\.]+)/i, // Foobar2000/iTunes/SMP
/com\.(riseupradioalarm)\/([\d\.]*)/i, // RiseUP Radio Alarm
/(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i, // MPlayer
// Windows Media Server
/(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [ ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(flrp)\/([\w\.-]+)/i // Flip Player /(flrp)\/([\w\.-]+)/i // Flip Player
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [ ], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
/(fstream|nativehost|queryseekspider)/i
// FStream/NativeHost/QuerySeekSpider // FStream/NativeHost/QuerySeekSpider
// MPlayer (no other info)/Media Player Classic/Nero ShowTime
// OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
// inlight radio / YourMuze
/(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i
], [NAME, [TYPE, MEDIAPLAYER]], [ ], [NAME, [TYPE, MEDIAPLAYER]], [
/(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i, // HTC One S / Windows Media Player /(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
], [[NAME, /[_-]/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [ // Gstreamer
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i // Rad.io /(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
// MPlayer SVN
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(mplayer)/i, // MPlayer (no other info)
/(yourmuze)/i, // YourMuze
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
], [NAME, [TYPE, MEDIAPLAYER]], [
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(nokia\d+)\/([\w\.-]+)/i // Nokia
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(winamp)3 version ([\w\.-]+)/i, // Winamp
/(winamp)\s([\w\.-]+)/i,
/(winamp)mpeg\/([\w\.-]+)/i
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
// inlight radio
], [NAME, [TYPE, MEDIAPLAYER]], [
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
// SoundTap/Totem/Stagefright/Streamium
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(smp)([\d\.]+)/i // SMP
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
/(vlc)\/([\w\.-]+)/i,
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
/(itunes)\/([\d\.]+)/i // iTunes
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
/(windows-media-player)\/([\w\.-]+)/i
], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
// Windows Media Server
], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(rad.io)\s([\d\.]+)/i, // Rad.io
/(radio.(?:de|at|fr))\s([\d\.]+)/i
], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]] ], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
] ]
}); });
@@ -338,29 +387,6 @@ const Libraries = Object.freeze({
] ]
}); });
/////////////
// VEHICLES
////////////
const Vehicles = Object.freeze({
device : [
[/aftlbt962e2/i], // BMW
[[VENDOR, 'BMW']],
[/dilink.+(byd) auto/i], // BYD
[VENDOR],
[/aftlft962x3/i], // Jeep
[[VENDOR, 'Jeep'], [MODEL, 'Wagooner']],
[/(rivian) (r1t)/i], // Rivian
[VENDOR, MODEL],
[/vcc.+netfront/i], // Volvo
[[VENDOR, 'Volvo']]
]
});
////////// //////////
// BOTS // BOTS
///////// /////////
@@ -371,9 +397,6 @@ const Bots = Object.freeze({
...Crawlers.browser, ...Crawlers.browser,
...Fetchers.browser, ...Fetchers.browser,
...Libraries.browser ...Libraries.browser
],
os : [
...Fetchers.os
] ]
}); });
@@ -386,6 +409,5 @@ export {
Fetchers, Fetchers,
InApps, InApps,
Libraries, Libraries,
MediaPlayers, MediaPlayers
Vehicles
}; };

View File

@@ -1,8 +1,8 @@
// Type definitions for Helpers submodule of UAParser.js v2.0.3 // Type definitions for Helpers submodule of UAParser.js v2.0.0
// Project: https://github.com/faisalman/ua-parser-js // Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman> // Definitions by: Faisal Salman <https://github.com/faisalman>
import type { IResult } from "../main/ua-parser"; import { IResult } from "../main/ua-parser";
declare function getDeviceVendor(model: string): string | undefined; declare function getDeviceVendor(model: string): string | undefined;
declare function isAppleSilicon(resultOrUA: IResult | string): boolean; declare function isAppleSilicon(resultOrUA: IResult | string): boolean;

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Helpers for UAParser.js v2.0.3 /* Helpers for UAParser.js v2.0.0
https://github.com/faisalman/ua-parser-js https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com> Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */ AGPLv3 License */
@@ -93,9 +93,6 @@ const isAIBot = (resultOrUA) => [
// Perplexity // Perplexity
'perplexitybot', 'perplexitybot',
// Semrush
'semrushbot-ocob',
// Timpi // Timpi
'timpibot', 'timpibot',

View File

@@ -3,7 +3,7 @@
// Source: /src/helpers/ua-parser-helpers.js // Source: /src/helpers/ua-parser-helpers.js
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Helpers for UAParser.js v2.0.3 /* Helpers for UAParser.js v2.0.0
https://github.com/faisalman/ua-parser-js https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com> Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */ AGPLv3 License */
@@ -97,9 +97,6 @@ const isAIBot = (resultOrUA) => [
// Perplexity // Perplexity
'perplexitybot', 'perplexitybot',
// Semrush
'semrushbot-ocob',
// Timpi // Timpi
'timpibot', 'timpibot',

View File

@@ -1,4 +1,4 @@
// Type definitions for UAParser.js v2.0.3 // Type definitions for UAParser.js v2.0.0
// Project: https://github.com/faisalman/ua-parser-js // Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman> // Definitions by: Faisal Salman <https://github.com/faisalman>

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v2.0.3 /* UAParser.js v2.0.0
Copyright © 2012-2025 Faisal Salman <f@faisalman.com> Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
AGPLv3 License *//* AGPLv3 License *//*
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
Supports browser & node.js environment. Supports browser & node.js environment.
@@ -19,35 +19,20 @@
// Constants // Constants
///////////// /////////////
var LIBVERSION = '2.0.3', var LIBVERSION = '2.0.0',
UA_MAX_LENGTH = 500,
USER_AGENT = 'user-agent',
EMPTY = '', EMPTY = '',
UNKNOWN = '?', UNKNOWN = '?',
// typeof
FUNC_TYPE = 'function', FUNC_TYPE = 'function',
UNDEF_TYPE = 'undefined', UNDEF_TYPE = 'undefined',
OBJ_TYPE = 'object', OBJ_TYPE = 'object',
STR_TYPE = 'string', STR_TYPE = 'string',
MAJOR = 'major',
// properties MODEL = 'model',
UA_BROWSER = 'browser',
UA_CPU = 'cpu',
UA_DEVICE = 'device',
UA_ENGINE = 'engine',
UA_OS = 'os',
UA_RESULT = 'result',
NAME = 'name', NAME = 'name',
TYPE = 'type', TYPE = 'type',
VENDOR = 'vendor', VENDOR = 'vendor',
VERSION = 'version', VERSION = 'version',
ARCHITECTURE= 'architecture', ARCHITECTURE= 'architecture',
MAJOR = 'major',
MODEL = 'model',
// device types
CONSOLE = 'console', CONSOLE = 'console',
MOBILE = 'mobile', MOBILE = 'mobile',
TABLET = 'tablet', TABLET = 'tablet',
@@ -55,11 +40,9 @@
WEARABLE = 'wearable', WEARABLE = 'wearable',
XR = 'xr', XR = 'xr',
EMBEDDED = 'embedded', EMBEDDED = 'embedded',
// browser types
INAPP = 'inapp', INAPP = 'inapp',
USER_AGENT = 'user-agent',
// client hints UA_MAX_LENGTH = 500,
BRANDS = 'brands', BRANDS = 'brands',
FORMFACTORS = 'formFactors', FORMFACTORS = 'formFactors',
FULLVERLIST = 'fullVersionList', FULLVERLIST = 'fullVersionList',
@@ -76,8 +59,12 @@
CH_HEADER_PLATFORM = CH_HEADER + '-' + PLATFORM, CH_HEADER_PLATFORM = CH_HEADER + '-' + PLATFORM,
CH_HEADER_PLATFORM_VER = CH_HEADER_PLATFORM + '-version', CH_HEADER_PLATFORM_VER = CH_HEADER_PLATFORM + '-version',
CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS], CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS],
UA_BROWSER = 'browser',
// device vendors UA_CPU = 'cpu',
UA_DEVICE = 'device',
UA_ENGINE = 'engine',
UA_OS = 'os',
UA_RESULT = 'result',
AMAZON = 'Amazon', AMAZON = 'Amazon',
APPLE = 'Apple', APPLE = 'Apple',
ASUS = 'ASUS', ASUS = 'ASUS',
@@ -89,7 +76,6 @@
LG = 'LG', LG = 'LG',
MICROSOFT = 'Microsoft', MICROSOFT = 'Microsoft',
MOTOROLA = 'Motorola', MOTOROLA = 'Motorola',
NVIDIA = 'Nvidia',
ONEPLUS = 'OnePlus', ONEPLUS = 'OnePlus',
OPPO = 'OPPO', OPPO = 'OPPO',
SAMSUNG = 'Samsung', SAMSUNG = 'Samsung',
@@ -97,8 +83,8 @@
SONY = 'Sony', SONY = 'Sony',
XIAOMI = 'Xiaomi', XIAOMI = 'Xiaomi',
ZEBRA = 'Zebra', ZEBRA = 'Zebra',
PREFIX_MOBILE = 'Mobile ',
// browsers SUFFIX_BROWSER = ' Browser',
CHROME = 'Chrome', CHROME = 'Chrome',
CHROMIUM = 'Chromium', CHROMIUM = 'Chromium',
CHROMECAST = 'Chromecast', CHROMECAST = 'Chromecast',
@@ -107,11 +93,6 @@
OPERA = 'Opera', OPERA = 'Opera',
FACEBOOK = 'Facebook', FACEBOOK = 'Facebook',
SOGOU = 'Sogou', SOGOU = 'Sogou',
PREFIX_MOBILE = 'Mobile ',
SUFFIX_BROWSER = ' Browser',
// os
WINDOWS = 'Windows'; WINDOWS = 'Windows';
var isWindow = typeof window !== UNDEF_TYPE, var isWindow = typeof window !== UNDEF_TYPE,
@@ -353,11 +334,11 @@
/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer /(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
// Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon/LG Browser/Otter/qutebrowser/Dooble // Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
/(heytap|ovi|115|surf)browser\/([\d\.]+)/i, // HeyTap/Ovi/115/Surf /(heytap|ovi|115)browser\/([\d\.]+)/i, // HeyTap/Ovi/115
/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i // Ecosia/Weibo /(weibo)__([\d\.]+)/i // Weibo
], [NAME, VERSION], [ ], [NAME, VERSION], [
/quark(?:pc)?\/([-\w\.]+)/i // Quark /quark(?:pc)?\/([-\w\.]+)/i // Quark
], [VERSION, [NAME, 'Quark']], [ ], [VERSION, [NAME, 'Quark']], [
@@ -421,7 +402,6 @@
/(Klarna)\/([\w\.]+)/i, // Klarna Shopping Browser for iOS & Android /(Klarna)\/([\w\.]+)/i, // Klarna Shopping Browser for iOS & Android
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, // Kakao App /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, // Kakao App
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp
/(daum)apps[\/ ]([\w\.]+)/i, // Daum App
/safari (line)\/([\w\.]+)/i, // Line App for iOS /safari (line)\/([\w\.]+)/i, // Line App for iOS
/\b(line)\/([\w\.]+)\/iab/i, // Line App for Android /\b(line)\/([\w\.]+)\/iab/i, // Line App for Android
/(alipay)client\/([\w\.]+)/i, // Alipay /(alipay)client\/([\w\.]+)/i, // Alipay
@@ -484,8 +464,8 @@
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, // Mozilla /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, // Mozilla
// Other // Other
/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser
/\b(links) \(([\w\.]+)/i // Links /\b(links) \(([\w\.]+)/i // Links
], [NAME, [VERSION, /_/g, '.']], [ ], [NAME, [VERSION, /_/g, '.']], [
@@ -495,30 +475,30 @@
cpu : [[ cpu : [[
/\b((amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64) /\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
], [[ARCHITECTURE, 'amd64']], [ ], [[ARCHITECTURE, 'amd64']], [
/(ia32(?=;))/i, // IA32 (quicktime) /(ia32(?=;))/i, // IA32 (quicktime)
/\b((i[346]|x)86)(pc)?\b/i // IA32 (x86) /\b((?:i[346]|x)86)\b/i // IA32 (x86)
], [[ARCHITECTURE, 'ia32']], [ ], [[ARCHITECTURE, 'ia32']], [
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i // ARM64 /\b(aarch64|arm(v?8e?l?|_?64))\b/i // ARM64
], [[ARCHITECTURE, 'arm64']], [ ], [[ARCHITECTURE, 'arm64']], [
/\b(arm(v[67])?ht?n?[fl]p?)\b/i // ARMHF /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i // ARMHF
], [[ARCHITECTURE, 'armhf']], [ ], [[ARCHITECTURE, 'armhf']], [
// PocketPC mistakenly identified as PowerPC // PocketPC mistakenly identified as PowerPC
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i /windows (ce|mobile); ppc;/i
], [[ARCHITECTURE, 'arm']], [ ], [[ARCHITECTURE, 'arm']], [
/((ppc|powerpc)(64)?)( mac|;|\))/i // PowerPC /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i // PowerPC
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [ ], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
/ sun4\w[;\)]/i // SPARC /(sun4\w)[;\)]/i // SPARC
], [[ARCHITECTURE, 'sparc']], [ ], [[ARCHITECTURE, 'sparc']], [
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
], [[ARCHITECTURE, lowerize]] ], [[ARCHITECTURE, lowerize]]
], ],
@@ -585,11 +565,8 @@
/\b(opd2(\d{3}a?))(?: bui|\))/i /\b(opd2(\d{3}a?))(?: bui|\))/i
], [MODEL, [VENDOR, strMapper, { 'OnePlus' : ['304', '403', '203'], '*' : OPPO }], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, strMapper, { 'OnePlus' : ['304', '403', '203'], '*' : OPPO }], [TYPE, TABLET]], [
// BLU Vivo Series
/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
], [MODEL, [VENDOR, 'BLU'], [TYPE, MOBILE]], [
// Vivo // Vivo
/; vivo (\w+)(?: bui|\))/i, /vivo (\w+)(?: bui|\))/i,
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [
@@ -609,7 +586,7 @@
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,
/\blg-?([\d\w]+) bui/i /\blg-?([\d\w]+) bui/i
], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [
@@ -621,8 +598,8 @@
// Nokia // Nokia
/(nokia) (t[12][01])/i /(nokia) (t[12][01])/i
], [VENDOR, MODEL, [TYPE, TABLET]], [ ], [VENDOR, MODEL, [TYPE, TABLET]], [
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i, /(?:maemo|nokia).*(n900|lumia \d+)/i,
/nokia[-_ ]?(([-\w\. ]*))/i /nokia[-_ ]?(([-\w\.]*))/i
], [[MODEL, /_/g, ' '], [TYPE, MOBILE], [VENDOR, 'Nokia']], [ ], [[MODEL, /_/g, ' '], [TYPE, MOBILE], [VENDOR, 'Nokia']], [
// Google // Google
@@ -716,14 +693,6 @@
/droid.+; (a(?:015|06[35]|142p?))/i /droid.+; (a(?:015|06[35]|142p?))/i
], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [
// Archos
/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
], [MODEL, [VENDOR, 'Archos'], [TYPE, TABLET]], [
/archos ([\w ]+)( b|\))/i,
/; (ac[3-6]\d\w{2,8})( b|\))/i
], [MODEL, [VENDOR, 'Archos'], [TYPE, MOBILE]], [
// MIXED // MIXED
/(imo) (tab \w+)/i, // IMO /(imo) (tab \w+)/i, // IMO
/(infinix) (x1101b?)/i // Infinix XPad /(infinix) (x1101b?)/i // Infinix XPad
@@ -731,7 +700,7 @@
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i, /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i, // BLU/HMD/IMO/TCL /; (hmd|imo) ([\w ]+?)(?: bui|\))/i, // HMD/IMO
/(hp) ([\w ]+\w)/i, // HP iPAQ /(hp) ([\w ]+\w)/i, // HP iPAQ
/(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia /(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia
/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i, // Lenovo /(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i, // Lenovo
@@ -739,6 +708,7 @@
], [VENDOR, MODEL, [TYPE, MOBILE]], [ ], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(kobo)\s(ereader|touch)/i, // Kobo /(kobo)\s(ereader|touch)/i, // Kobo
/(archos) (gamepad2?)/i, // Archos
/(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad /(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad
/(kindle)\/([\w\.]+)/i // Kindle /(kindle)\/([\w\.]+)/i // Kindle
], [VENDOR, MODEL, [TYPE, TABLET]], [ ], [VENDOR, MODEL, [TYPE, TABLET]], [
@@ -747,8 +717,8 @@
], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [
/droid [\d\.]+; (fp\du?)(?: b|\))/i // Fairphone /droid [\d\.]+; (fp\du?)(?: b|\))/i // Fairphone
], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [
/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i // Nvidia Tablets /(shield[\w ]+) b/i // Nvidia Shield Tablets
], [MODEL, [VENDOR, NVIDIA], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [
/(sprint) (\w+)/i // Sprint Phones /(sprint) (\w+)/i // Sprint Phones
], [VENDOR, MODEL, [TYPE, MOBILE]], [ ], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(kin\.[onetw]{3})/i // Microsoft Kin /(kin\.[onetw]{3})/i // Microsoft Kin
@@ -766,9 +736,7 @@
], [VENDOR, [TYPE, SMARTTV]], [ ], [VENDOR, [TYPE, SMARTTV]], [
/hbbtv.+maple;(\d+)/i /hbbtv.+maple;(\d+)/i
], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [ ], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [
/tcast.+(lg)e?. ([-\w]+)/i // LG SmartTV /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i // LG SmartTV
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
], [[VENDOR, LG], [TYPE, SMARTTV]], [ ], [[VENDOR, LG], [TYPE, SMARTTV]], [
/(apple) ?tv/i // Apple TV /(apple) ?tv/i // Apple TV
], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [ ], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [
@@ -780,12 +748,8 @@
], [[MODEL, CHROMECAST+' Nest Hub'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [ ], [[MODEL, CHROMECAST+' Nest Hub'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
/crkey/i // Google Chromecast, Linux-based or unknown /crkey/i // Google Chromecast, Linux-based or unknown
], [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [ ], [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
/(portaltv)/i // Facebook Portal TV
], [MODEL, [VENDOR, FACEBOOK], [TYPE, SMARTTV]], [
/droid.+aft(\w+)( bui|\))/i // Fire TV /droid.+aft(\w+)( bui|\))/i // Fire TV
], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [ ], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [
/(shield \w+ tv)/i // Nvidia Shield TV
], [MODEL, [VENDOR, NVIDIA], [TYPE, SMARTTV]], [
/\(dtv[\);].+(aquos)/i, /\(dtv[\);].+(aquos)/i,
/(aquos-tv[\w ]+)\)/i // Sharp /(aquos-tv[\w ]+)\)/i // Sharp
], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[ ], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[
@@ -798,10 +762,7 @@
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i // HbbTV devices /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i // HbbTV devices
], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [ ], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [
// SmartTV from Unidentified Vendors /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i // SmartTV from Unidentified Vendors
/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
], [MODEL, [TYPE, SMARTTV]], [
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
], [[TYPE, SMARTTV]], [ ], [[TYPE, SMARTTV]], [
/////////////////// ///////////////////
@@ -811,8 +772,8 @@
/(ouya)/i, // Ouya /(ouya)/i, // Ouya
/(nintendo) (\w+)/i // Nintendo /(nintendo) (\w+)/i // Nintendo
], [VENDOR, MODEL, [TYPE, CONSOLE]], [ ], [VENDOR, MODEL, [TYPE, CONSOLE]], [
/droid.+; (shield)( bui|\))/i // Nvidia Portable /droid.+; (shield) bui/i // Nvidia
], [MODEL, [VENDOR, NVIDIA], [TYPE, CONSOLE]], [ ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
/(playstation \w+)/i // Playstation /(playstation \w+)/i // Playstation
], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [ ], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [
/\b(xbox(?: one)?(?!; xbox))[\); ]/i // Microsoft Xbox /\b(xbox(?: one)?(?!; xbox))[\); ]/i // Microsoft Xbox
@@ -850,7 +811,7 @@
], [MODEL, [VENDOR, GOOGLE], [TYPE, XR]], [ ], [MODEL, [VENDOR, GOOGLE], [TYPE, XR]], [
/(pico) (4|neo3(?: link|pro)?)/i // Pico /(pico) (4|neo3(?: link|pro)?)/i // Pico
], [VENDOR, MODEL, [TYPE, XR]], [ ], [VENDOR, MODEL, [TYPE, XR]], [
/(quest( \d| pro)?s?).+vr/i // Meta Quest /; (quest( \d| pro)?)/i // Oculus Quest
], [MODEL, [VENDOR, FACEBOOK], [TYPE, XR]], [ ], [MODEL, [VENDOR, FACEBOOK], [TYPE, XR]], [
/////////////////// ///////////////////
@@ -861,22 +822,20 @@
], [VENDOR, [TYPE, EMBEDDED]], [ ], [VENDOR, [TYPE, EMBEDDED]], [
/(aeobc)\b/i // Echo Dot /(aeobc)\b/i // Echo Dot
], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [ ], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [
/(homepod).+mac os/i // Apple HomePod
], [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]], [
/windows iot/i
], [[TYPE, EMBEDDED]], [
//////////////////// ////////////////////
// MIXED (GENERIC) // MIXED (GENERIC)
/////////////////// ///////////////////
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
], [MODEL, [TYPE, strMapper, { 'mobile' : 'Mobile', 'xr' : 'VR', '*' : TABLET }]], [ ], [MODEL, [TYPE, MOBILE]], [
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
], [MODEL, [TYPE, TABLET]], [
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
], [[TYPE, TABLET]], [ ], [[TYPE, TABLET]], [
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
], [[TYPE, MOBILE]], [ ], [[TYPE, MOBILE]], [
/droid .+?; ([\w\. -]+)( bui|\))/i // Generic Android Device /(android[-\w\. ]{0,9});.+buil/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']] ], [MODEL, [VENDOR, 'Generic']]
], ],
@@ -896,11 +855,8 @@
/ekioh(flow)\/([\w\.]+)/i, // Flow /ekioh(flow)\/([\w\.]+)/i, // Flow
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab /(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
/\b(libweb)/i
/\b(libweb)/i // LibWeb
], [NAME, VERSION], [ ], [NAME, VERSION], [
/ladybird\//i
], [[NAME, 'LibWeb']], [
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko /rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko
], [VERSION, NAME] ], [VERSION, NAME]
@@ -911,15 +867,15 @@
// Windows // Windows
/microsoft (windows) (vista|xp)/i // Windows (iTunes) /microsoft (windows) (vista|xp)/i // Windows (iTunes)
], [NAME, VERSION], [ ], [NAME, VERSION], [
/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i // Windows Phone /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i // Windows Phone
], [NAME, [VERSION, strMapper, windowsVersionMap]], [ ], [NAME, [VERSION, strMapper, windowsVersionMap]], [
/windows nt 6\.2; (arm)/i, // Windows RT /windows nt 6\.2; (arm)/i, // Windows RT
/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [ ], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [
// iOS/macOS // iOS/macOS
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
/cfnetwork\/.+darwin/i /cfnetwork\/.+darwin/i
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [
@@ -941,15 +897,15 @@
// Mobile OSes // Mobile OSes
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS
], [VERSION, NAME], [ ], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS/OpenHarmony
/(ubuntu) ([\w\.]+) like android/i // Ubuntu Touch /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,
], [[NAME, /(.+)/, '$1 Touch'], VERSION], [ /(blackberry)\w*\/([\w\.]*)/i, // Blackberry
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen /(tizen|kaios)[\/ ]([\w\.]+)/i, // Tizen/KaiOS
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i /\((series40);/i // Series 40
], [NAME, VERSION], [ ], [NAME, VERSION], [
/\(bb(10);/i // BlackBerry 10 /\(bb(10);/i // BlackBerry 10
], [VERSION, [NAME, BLACKBERRY]], [ ], [VERSION, [NAME, BLACKBERRY]], [
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i // Symbian /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i // Symbian
], [VERSION, [NAME, 'Symbian']], [ ], [VERSION, [NAME, 'Symbian']], [
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS
], [VERSION, [NAME, FIREFOX+' OS']], [ ], [VERSION, [NAME, FIREFOX+' OS']], [
@@ -979,7 +935,7 @@
/(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux /(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i, // Hurd/Linux /(hurd|linux) ?([\w\.]*)/i, // Hurd/Linux
/(gnu) ?([\w\.]*)/i, // GNU /(gnu) ?([\w\.]*)/i, // GNU
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
/(haiku) (\w+)/i // Haiku /(haiku) (\w+)/i // Haiku
@@ -1227,11 +1183,7 @@
'Chrome' : 'Google Chrome', 'Chrome' : 'Google Chrome',
'Edge' : 'Microsoft Edge', 'Edge' : 'Microsoft Edge',
'Chrome WebView' : 'Android WebView', 'Chrome WebView' : 'Android WebView',
'Chrome Headless' : 'HeadlessChrome', 'Chrome Headless' : 'HeadlessChrome'
'Huawei Browser' : 'HuaweiBrowser',
'MIUI Browser' : 'Miui Browser',
'Opera Mobi' : 'OperaMobile',
'Yandex' : 'YaBrowser'
}); });
this.set(NAME, brandName) this.set(NAME, brandName)
.set(VERSION, brandVersion) .set(VERSION, brandVersion)

View File

@@ -3,8 +3,8 @@
// Source: /src/main/ua-parser.js // Source: /src/main/ua-parser.js
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v2.0.3 /* UAParser.js v2.0.0
Copyright © 2012-2025 Faisal Salman <f@faisalman.com> Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
AGPLv3 License *//* AGPLv3 License *//*
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
Supports browser & node.js environment. Supports browser & node.js environment.
@@ -21,35 +21,20 @@
// Constants // Constants
///////////// /////////////
var LIBVERSION = '2.0.3', var LIBVERSION = '2.0.0',
UA_MAX_LENGTH = 500,
USER_AGENT = 'user-agent',
EMPTY = '', EMPTY = '',
UNKNOWN = '?', UNKNOWN = '?',
// typeof
FUNC_TYPE = 'function', FUNC_TYPE = 'function',
UNDEF_TYPE = 'undefined', UNDEF_TYPE = 'undefined',
OBJ_TYPE = 'object', OBJ_TYPE = 'object',
STR_TYPE = 'string', STR_TYPE = 'string',
MAJOR = 'major',
// properties MODEL = 'model',
UA_BROWSER = 'browser',
UA_CPU = 'cpu',
UA_DEVICE = 'device',
UA_ENGINE = 'engine',
UA_OS = 'os',
UA_RESULT = 'result',
NAME = 'name', NAME = 'name',
TYPE = 'type', TYPE = 'type',
VENDOR = 'vendor', VENDOR = 'vendor',
VERSION = 'version', VERSION = 'version',
ARCHITECTURE= 'architecture', ARCHITECTURE= 'architecture',
MAJOR = 'major',
MODEL = 'model',
// device types
CONSOLE = 'console', CONSOLE = 'console',
MOBILE = 'mobile', MOBILE = 'mobile',
TABLET = 'tablet', TABLET = 'tablet',
@@ -57,11 +42,9 @@
WEARABLE = 'wearable', WEARABLE = 'wearable',
XR = 'xr', XR = 'xr',
EMBEDDED = 'embedded', EMBEDDED = 'embedded',
// browser types
INAPP = 'inapp', INAPP = 'inapp',
USER_AGENT = 'user-agent',
// client hints UA_MAX_LENGTH = 500,
BRANDS = 'brands', BRANDS = 'brands',
FORMFACTORS = 'formFactors', FORMFACTORS = 'formFactors',
FULLVERLIST = 'fullVersionList', FULLVERLIST = 'fullVersionList',
@@ -78,8 +61,12 @@
CH_HEADER_PLATFORM = CH_HEADER + '-' + PLATFORM, CH_HEADER_PLATFORM = CH_HEADER + '-' + PLATFORM,
CH_HEADER_PLATFORM_VER = CH_HEADER_PLATFORM + '-version', CH_HEADER_PLATFORM_VER = CH_HEADER_PLATFORM + '-version',
CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS], CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS],
UA_BROWSER = 'browser',
// device vendors UA_CPU = 'cpu',
UA_DEVICE = 'device',
UA_ENGINE = 'engine',
UA_OS = 'os',
UA_RESULT = 'result',
AMAZON = 'Amazon', AMAZON = 'Amazon',
APPLE = 'Apple', APPLE = 'Apple',
ASUS = 'ASUS', ASUS = 'ASUS',
@@ -91,29 +78,20 @@
LG = 'LG', LG = 'LG',
MICROSOFT = 'Microsoft', MICROSOFT = 'Microsoft',
MOTOROLA = 'Motorola', MOTOROLA = 'Motorola',
NVIDIA = 'Nvidia',
ONEPLUS = 'OnePlus',
OPPO = 'OPPO',
SAMSUNG = 'Samsung', SAMSUNG = 'Samsung',
SHARP = 'Sharp', SHARP = 'Sharp',
SONY = 'Sony', SONY = 'Sony',
XIAOMI = 'Xiaomi', XIAOMI = 'Xiaomi',
ZEBRA = 'Zebra', ZEBRA = 'Zebra',
PREFIX_MOBILE = 'Mobile ',
// browsers SUFFIX_BROWSER = ' Browser',
CHROME = 'Chrome', CHROME = 'Chrome',
CHROMIUM = 'Chromium',
CHROMECAST = 'Chromecast', CHROMECAST = 'Chromecast',
EDGE = 'Edge', EDGE = 'Edge',
FIREFOX = 'Firefox', FIREFOX = 'Firefox',
OPERA = 'Opera', OPERA = 'Opera',
FACEBOOK = 'Facebook', FACEBOOK = 'Facebook',
SOGOU = 'Sogou', SOGOU = 'Sogou',
PREFIX_MOBILE = 'Mobile ',
SUFFIX_BROWSER = ' Browser',
// os
WINDOWS = 'Windows'; WINDOWS = 'Windows';
var isWindow = typeof window !== UNDEF_TYPE, var isWindow = typeof window !== UNDEF_TYPE,
@@ -355,11 +333,11 @@
/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
/(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer /(?:ms|\()(ie) ([\w\.]+)/i, // Internet Explorer
// Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon/LG Browser/Otter/qutebrowser/Dooble // Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
/(heytap|ovi|115|surf)browser\/([\d\.]+)/i, // HeyTap/Ovi/115/Surf /(heytap|ovi|115)browser\/([\d\.]+)/i, // HeyTap/Ovi/115
/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i // Ecosia/Weibo /(weibo)__([\d\.]+)/i // Weibo
], [NAME, VERSION], [ ], [NAME, VERSION], [
/quark(?:pc)?\/([-\w\.]+)/i // Quark /quark(?:pc)?\/([-\w\.]+)/i // Quark
], [VERSION, [NAME, 'Quark']], [ ], [VERSION, [NAME, 'Quark']], [
@@ -423,7 +401,6 @@
/(Klarna)\/([\w\.]+)/i, // Klarna Shopping Browser for iOS & Android /(Klarna)\/([\w\.]+)/i, // Klarna Shopping Browser for iOS & Android
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, // Kakao App /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, // Kakao App
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp
/(daum)apps[\/ ]([\w\.]+)/i, // Daum App
/safari (line)\/([\w\.]+)/i, // Line App for iOS /safari (line)\/([\w\.]+)/i, // Line App for iOS
/\b(line)\/([\w\.]+)\/iab/i, // Line App for Android /\b(line)\/([\w\.]+)\/iab/i, // Line App for Android
/(alipay)client\/([\w\.]+)/i, // Alipay /(alipay)client\/([\w\.]+)/i, // Alipay
@@ -486,8 +463,8 @@
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, // Mozilla /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, // Mozilla
// Other // Other
/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser
/\b(links) \(([\w\.]+)/i // Links /\b(links) \(([\w\.]+)/i // Links
], [NAME, [VERSION, /_/g, '.']], [ ], [NAME, [VERSION, /_/g, '.']], [
@@ -497,30 +474,30 @@
cpu : [[ cpu : [[
/\b((amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64) /\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
], [[ARCHITECTURE, 'amd64']], [ ], [[ARCHITECTURE, 'amd64']], [
/(ia32(?=;))/i, // IA32 (quicktime) /(ia32(?=;))/i, // IA32 (quicktime)
/\b((i[346]|x)86)(pc)?\b/i // IA32 (x86) /((?:i[346]|x)86)[;\)]/i // IA32 (x86)
], [[ARCHITECTURE, 'ia32']], [ ], [[ARCHITECTURE, 'ia32']], [
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i // ARM64 /\b(aarch64|arm(v?8e?l?|_?64))\b/i // ARM64
], [[ARCHITECTURE, 'arm64']], [ ], [[ARCHITECTURE, 'arm64']], [
/\b(arm(v[67])?ht?n?[fl]p?)\b/i // ARMHF /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i // ARMHF
], [[ARCHITECTURE, 'armhf']], [ ], [[ARCHITECTURE, 'armhf']], [
// PocketPC mistakenly identified as PowerPC // PocketPC mistakenly identified as PowerPC
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i /windows (ce|mobile); ppc;/i
], [[ARCHITECTURE, 'arm']], [ ], [[ARCHITECTURE, 'arm']], [
/((ppc|powerpc)(64)?)( mac|;|\))/i // PowerPC /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i // PowerPC
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [ ], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
/ sun4\w[;\)]/i // SPARC /(sun4\w)[;\)]/i // SPARC
], [[ARCHITECTURE, 'sparc']], [ ], [[ARCHITECTURE, 'sparc']], [
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
], [[ARCHITECTURE, lowerize]] ], [[ARCHITECTURE, lowerize]]
], ],
@@ -554,44 +531,37 @@
], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [
// Honor // Honor
/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i /(?:honor)([-\w ]+)[;\)]/i
], [MODEL, [VENDOR, HONOR], [TYPE, TABLET]], [
/honor([-\w ]+)[;\)]/i
], [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]], [
// Huawei // Huawei
/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [
/(?:huawei)([-\w ]+)[;\)]/i, /(?:huawei)([-\w ]+)[;\)]/i,
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [
// Xiaomi // Xiaomi
/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i // Mi Pad tablets
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, // Xiaomi POCO /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, // Xiaomi POCO
/\b; (\w+) build\/hm\1/i, // Xiaomi Hongmi 'numeric' models /\b; (\w+) build\/hm\1/i, // Xiaomi Hongmi 'numeric' models
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, // Xiaomi Hongmi /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, // Xiaomi Hongmi
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, // Xiaomi Redmi /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, // Xiaomi Redmi
/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, // Xiaomi Redmi 'numeric' models /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, // Xiaomi Redmi 'numeric' models
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i, // Xiaomi Mi /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i // Xiaomi Mi
/ ([\w ]+) miui\/v?\d/i
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [ ], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, // Redmi Pad
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i // Mi Pad tablets
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [
// OPPO // OPPO
/; (\w+) bui.+ oppo/i, /; (\w+) bui.+ oppo/i,
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
], [MODEL, [VENDOR, OPPO], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [
/\b(opd2(\d{3}a?))(?: bui|\))/i /\b(opd2\d{3}a?) bui/i
], [MODEL, [VENDOR, strMapper, { 'OnePlus' : ['304', '403', '203'], '*' : OPPO }], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'OPPO'], [TYPE, TABLET]], [
// BLU Vivo Series
/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
], [MODEL, [VENDOR, 'BLU'], [TYPE, MOBILE]], [
// Vivo // Vivo
/; vivo (\w+)(?: bui|\))/i, /vivo (\w+)(?: bui|\))/i,
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [
@@ -602,7 +572,7 @@
// Motorola // Motorola
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
/\bmot(?:orola)?[- ](\w*)/i, /\bmot(?:orola)?[- ](\w*)/i,
/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [
/\b(mz60\d|xoom[2 ]{0,2}) build\//i /\b(mz60\d|xoom[2 ]{0,2}) build\//i
], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [
@@ -611,24 +581,22 @@
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
/\blg-?([\d\w]+) bui/i /\blg-?([\d\w]+) bui/i
], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [
// Lenovo // Lenovo
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i, /(ideatab[-\w ]+)/i,
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [
// Nokia // Nokia
/(nokia) (t[12][01])/i /(?:maemo|nokia).*(n900|lumia \d+)/i,
], [VENDOR, MODEL, [TYPE, TABLET]], [ /nokia[-_ ]?([-\w\.]*)/i
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i, ], [[MODEL, /_/g, ' '], [VENDOR, 'Nokia'], [TYPE, MOBILE]], [
/nokia[-_ ]?(([-\w\. ]*))/i
], [[MODEL, /_/g, ' '], [TYPE, MOBILE], [VENDOR, 'Nokia']], [
// Google // Google
/(pixel (c|tablet))\b/i // Google Pixel C/Tablet /(pixel c)\b/i // Google Pixel C
], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i // Google Pixel /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i // Google Pixel
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [
@@ -643,7 +611,7 @@
// OnePlus // OnePlus
/ (kb2005|in20[12]5|be20[12][59])\b/i, / (kb2005|in20[12]5|be20[12][59])\b/i,
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
], [MODEL, [VENDOR, ONEPLUS], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [
// Amazon // Amazon
/(alexa)webm/i, /(alexa)webm/i,
@@ -718,29 +686,21 @@
/droid.+; (a(?:015|06[35]|142p?))/i /droid.+; (a(?:015|06[35]|142p?))/i
], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [
// Archos
/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
], [MODEL, [VENDOR, 'Archos'], [TYPE, TABLET]], [
/archos ([\w ]+)( b|\))/i,
/; (ac[3-6]\d\w{2,8})( b|\))/i
], [MODEL, [VENDOR, 'Archos'], [TYPE, MOBILE]], [
// MIXED // MIXED
/(imo) (tab \w+)/i, // IMO /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
/(infinix) (x1101b?)/i // Infinix XPad
], [VENDOR, MODEL, [TYPE, TABLET]], [
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i, // BLU/HMD/IMO/TCL /; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i, // IMO
/(hp) ([\w ]+\w)/i, // HP iPAQ /(hp) ([\w ]+\w)/i, // HP iPAQ
/(asus)-?(\w+)/i, // Asus
/(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia /(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia
/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i, // Lenovo /(lenovo)[-_ ]?([-\w]+)/i, // Lenovo
/(jolla)/i, // Jolla
/(oppo) ?([\w ]+) bui/i // OPPO /(oppo) ?([\w ]+) bui/i // OPPO
], [VENDOR, MODEL, [TYPE, MOBILE]], [ ], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(imo) (tab \w+)/i, // IMO
/(kobo)\s(ereader|touch)/i, // Kobo /(kobo)\s(ereader|touch)/i, // Kobo
/(archos) (gamepad2?)/i, // Archos
/(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad /(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad
/(kindle)\/([\w\.]+)/i // Kindle /(kindle)\/([\w\.]+)/i // Kindle
], [VENDOR, MODEL, [TYPE, TABLET]], [ ], [VENDOR, MODEL, [TYPE, TABLET]], [
@@ -749,8 +709,8 @@
], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [
/droid [\d\.]+; (fp\du?)(?: b|\))/i // Fairphone /droid [\d\.]+; (fp\du?)(?: b|\))/i // Fairphone
], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [
/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i // Nvidia Tablets /(shield[\w ]+) b/i // Nvidia Shield Tablets
], [MODEL, [VENDOR, NVIDIA], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [
/(sprint) (\w+)/i // Sprint Phones /(sprint) (\w+)/i // Sprint Phones
], [VENDOR, MODEL, [TYPE, MOBILE]], [ ], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(kin\.[onetw]{3})/i // Microsoft Kin /(kin\.[onetw]{3})/i // Microsoft Kin
@@ -768,9 +728,7 @@
], [VENDOR, [TYPE, SMARTTV]], [ ], [VENDOR, [TYPE, SMARTTV]], [
/hbbtv.+maple;(\d+)/i /hbbtv.+maple;(\d+)/i
], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [ ], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [
/tcast.+(lg)e?. ([-\w]+)/i // LG SmartTV /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i // LG SmartTV
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
], [[VENDOR, LG], [TYPE, SMARTTV]], [ ], [[VENDOR, LG], [TYPE, SMARTTV]], [
/(apple) ?tv/i // Apple TV /(apple) ?tv/i // Apple TV
], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [ ], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [
@@ -782,28 +740,21 @@
], [[MODEL, CHROMECAST+' Nest Hub'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [ ], [[MODEL, CHROMECAST+' Nest Hub'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
/crkey/i // Google Chromecast, Linux-based or unknown /crkey/i // Google Chromecast, Linux-based or unknown
], [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [ ], [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
/(portaltv)/i // Facebook Portal TV
], [MODEL, [VENDOR, FACEBOOK], [TYPE, SMARTTV]], [
/droid.+aft(\w+)( bui|\))/i // Fire TV /droid.+aft(\w+)( bui|\))/i // Fire TV
], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [ ], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [
/(shield \w+ tv)/i // Nvidia Shield TV
], [MODEL, [VENDOR, NVIDIA], [TYPE, SMARTTV]], [
/\(dtv[\);].+(aquos)/i, /\(dtv[\);].+(aquos)/i,
/(aquos-tv[\w ]+)\)/i // Sharp /(aquos-tv[\w ]+)\)/i // Sharp
], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[ ], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[
/(bravia[\w ]+)( bui|\))/i // Sony /(bravia[\w ]+)( bui|\))/i // Sony
], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [ ], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [
/(mi(tv|box)-?\w+) bui/i // Xiaomi /(mitv-\w{5}) bui/i // Xiaomi
], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [ ], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [
/Hbbtv.*(technisat) (.*);/i // TechniSAT /Hbbtv.*(technisat) (.*);/i // TechniSAT
], [VENDOR, MODEL, [TYPE, SMARTTV]], [ ], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i // HbbTV devices /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i // HbbTV devices
], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [ ], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [
// SmartTV from Unidentified Vendors /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i // SmartTV from Unidentified Vendors
/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
], [MODEL, [TYPE, SMARTTV]], [
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
], [[TYPE, SMARTTV]], [ ], [[TYPE, SMARTTV]], [
/////////////////// ///////////////////
@@ -813,8 +764,8 @@
/(ouya)/i, // Ouya /(ouya)/i, // Ouya
/(nintendo) (\w+)/i // Nintendo /(nintendo) (\w+)/i // Nintendo
], [VENDOR, MODEL, [TYPE, CONSOLE]], [ ], [VENDOR, MODEL, [TYPE, CONSOLE]], [
/droid.+; (shield)( bui|\))/i // Nvidia Portable /droid.+; (shield) bui/i // Nvidia
], [MODEL, [VENDOR, NVIDIA], [TYPE, CONSOLE]], [ ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
/(playstation \w+)/i // Playstation /(playstation \w+)/i // Playstation
], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [ ], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [
/\b(xbox(?: one)?(?!; xbox))[\); ]/i // Microsoft Xbox /\b(xbox(?: one)?(?!; xbox))[\); ]/i // Microsoft Xbox
@@ -824,23 +775,12 @@
// WEARABLES // WEARABLES
/////////////////// ///////////////////
/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i // Samsung Galaxy Watch /\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i // Samsung Galaxy Watch
], [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]], [ ], [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]], [
/((pebble))app/i, // Pebble /((pebble))app/i // Pebble
/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i // Asus ZenWatch / LG Watch / Pixel Watch
], [VENDOR, MODEL, [TYPE, WEARABLE]], [ ], [VENDOR, MODEL, [TYPE, WEARABLE]], [
/(ow(?:19|20)?we?[1-3]{1,3})/i // Oppo Watch
], [MODEL, [VENDOR, OPPO], [TYPE, WEARABLE]], [
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i // Apple Watch /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i // Apple Watch
], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [ ], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [
/(opwwe\d{3})/i // OnePlus Watch
], [MODEL, [VENDOR, ONEPLUS], [TYPE, WEARABLE]], [
/(moto 360)/i // Motorola 360
], [MODEL, [VENDOR, MOTOROLA], [TYPE, WEARABLE]], [
/(smartwatch 3)/i // Sony SmartWatch
], [MODEL, [VENDOR, SONY], [TYPE, WEARABLE]], [
/(g watch r)/i // LG G Watch R
], [MODEL, [VENDOR, LG], [TYPE, WEARABLE]], [
/droid.+; (wt63?0{2,3})\)/i /droid.+; (wt63?0{2,3})\)/i
], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [ ], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [
@@ -852,7 +792,7 @@
], [MODEL, [VENDOR, GOOGLE], [TYPE, XR]], [ ], [MODEL, [VENDOR, GOOGLE], [TYPE, XR]], [
/(pico) (4|neo3(?: link|pro)?)/i // Pico /(pico) (4|neo3(?: link|pro)?)/i // Pico
], [VENDOR, MODEL, [TYPE, XR]], [ ], [VENDOR, MODEL, [TYPE, XR]], [
/(quest( \d| pro)?s?).+vr/i // Meta Quest /; (quest( \d| pro)?)/i // Oculus Quest
], [MODEL, [VENDOR, FACEBOOK], [TYPE, XR]], [ ], [MODEL, [VENDOR, FACEBOOK], [TYPE, XR]], [
/////////////////// ///////////////////
@@ -863,22 +803,20 @@
], [VENDOR, [TYPE, EMBEDDED]], [ ], [VENDOR, [TYPE, EMBEDDED]], [
/(aeobc)\b/i // Echo Dot /(aeobc)\b/i // Echo Dot
], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [ ], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [
/(homepod).+mac os/i // Apple HomePod
], [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]], [
/windows iot/i
], [[TYPE, EMBEDDED]], [
//////////////////// ////////////////////
// MIXED (GENERIC) // MIXED (GENERIC)
/////////////////// ///////////////////
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
], [MODEL, [TYPE, strMapper, { 'mobile' : 'Mobile', 'xr' : 'VR', '*' : TABLET }]], [ ], [MODEL, [TYPE, MOBILE]], [
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
], [MODEL, [TYPE, TABLET]], [
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
], [[TYPE, TABLET]], [ ], [[TYPE, TABLET]], [
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
], [[TYPE, MOBILE]], [ ], [[TYPE, MOBILE]], [
/droid .+?; ([\w\. -]+)( bui|\))/i // Generic Android Device /(android[-\w\. ]{0,9});.+buil/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']] ], [MODEL, [VENDOR, 'Generic']]
], ],
@@ -898,11 +836,8 @@
/ekioh(flow)\/([\w\.]+)/i, // Flow /ekioh(flow)\/([\w\.]+)/i, // Flow
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab /(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
/\b(libweb)/i
/\b(libweb)/i // LibWeb
], [NAME, VERSION], [ ], [NAME, VERSION], [
/ladybird\//i
], [[NAME, 'LibWeb']], [
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko /rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko
], [VERSION, NAME] ], [VERSION, NAME]
@@ -913,15 +848,15 @@
// Windows // Windows
/microsoft (windows) (vista|xp)/i // Windows (iTunes) /microsoft (windows) (vista|xp)/i // Windows (iTunes)
], [NAME, VERSION], [ ], [NAME, VERSION], [
/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i // Windows Phone /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i // Windows Phone
], [NAME, [VERSION, strMapper, windowsVersionMap]], [ ], [NAME, [VERSION, strMapper, windowsVersionMap]], [
/windows nt 6\.2; (arm)/i, // Windows RT /windows nt 6\.2; (arm)/i, // Windows RT
/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [ ], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [
// iOS/macOS // iOS/macOS
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
/cfnetwork\/.+darwin/i /cfnetwork\/.+darwin/i
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [
@@ -943,15 +878,15 @@
// Mobile OSes // Mobile OSes
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS
], [VERSION, NAME], [ ], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS/OpenHarmony
/(ubuntu) ([\w\.]+) like android/i // Ubuntu Touch /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,
], [[NAME, /(.+)/, '$1 Touch'], VERSION], [ /(blackberry)\w*\/([\w\.]*)/i, // Blackberry
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen /(tizen|kaios)[\/ ]([\w\.]+)/i, // Tizen/KaiOS
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i /\((series40);/i // Series 40
], [NAME, VERSION], [ ], [NAME, VERSION], [
/\(bb(10);/i // BlackBerry 10 /\(bb(10);/i // BlackBerry 10
], [VERSION, [NAME, BLACKBERRY]], [ ], [VERSION, [NAME, BLACKBERRY]], [
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i // Symbian /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i // Symbian
], [VERSION, [NAME, 'Symbian']], [ ], [VERSION, [NAME, 'Symbian']], [
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS
], [VERSION, [NAME, FIREFOX+' OS']], [ ], [VERSION, [NAME, FIREFOX+' OS']], [
@@ -981,7 +916,7 @@
/(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux /(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i, // Hurd/Linux /(hurd|linux) ?([\w\.]*)/i, // Hurd/Linux
/(gnu) ?([\w\.]*)/i, // GNU /(gnu) ?([\w\.]*)/i, // GNU
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
/(haiku) (\w+)/i // Haiku /(haiku) (\w+)/i // Haiku
@@ -1218,31 +1153,17 @@
switch (this.itemType) { switch (this.itemType) {
case UA_BROWSER: case UA_BROWSER:
case UA_ENGINE:
var brands = uaCH[FULLVERLIST] || uaCH[BRANDS], prevName; var brands = uaCH[FULLVERLIST] || uaCH[BRANDS], prevName;
if (brands) { if (brands) {
for (var i in brands) { for (var i in brands) {
var brandName = brands[i].brand || brands[i], var brandName = strip(/(Google|Microsoft) /, brands[i].brand || brands[i]),
brandVersion = brands[i].version; brandVersion = brands[i].version;
if (this.itemType == UA_BROWSER && !/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && brandName != CHROMIUM))) { if (!/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && !/chromi/i.test(brandName)))) {
brandName = strMapper(brandName, {
'Chrome' : 'Google Chrome',
'Edge' : 'Microsoft Edge',
'Chrome WebView' : 'Android WebView',
'Chrome Headless' : 'HeadlessChrome',
'Huawei Browser' : 'HuaweiBrowser',
'MIUI Browser' : 'Miui Browser',
'Opera Mobi' : 'OperaMobile',
'Yandex' : 'YaBrowser'
});
this.set(NAME, brandName) this.set(NAME, brandName)
.set(VERSION, brandVersion) .set(VERSION, brandVersion)
.set(MAJOR, majorize(brandVersion)); .set(MAJOR, majorize(brandVersion));
prevName = brandName; prevName = brandName;
} }
if (this.itemType == UA_ENGINE && brandName == CHROMIUM) {
this.set(VERSION, brandVersion);
}
} }
} }
break; break;
@@ -1259,16 +1180,11 @@
} }
if (uaCH[MODEL]) { if (uaCH[MODEL]) {
this.set(MODEL, uaCH[MODEL]); this.set(MODEL, uaCH[MODEL]);
if (!this.get(TYPE) || !this.get(VENDOR)) { }
var reParse = {}; // Xbox-Specific Detection
rgxMapper.call(reParse, 'droid 9; ' + uaCH[MODEL] + ')', rgxMap); if (uaCH[MODEL] == 'Xbox') {
if (!this.get(TYPE) && !!reParse.type) { this.set(TYPE, CONSOLE)
this.set(TYPE, reParse.type); .set(VENDOR, MICROSOFT);
}
if (!this.get(VENDOR) && !!reParse.vendor) {
this.set(VENDOR, reParse.vendor);
}
}
} }
if (uaCH[FORMFACTORS]) { if (uaCH[FORMFACTORS]) {
var ff; var ff;

View File

@@ -511,16 +511,6 @@
"major" : "2" "major" : "2"
} }
}, },
{
"desc" : "Dooble",
"ua" : "Mozilla/5.0 (X11; Haiku BePC) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.17 Chrome/87.0.4280.144 Safari/537.36 Dooble/2023.12.25 Dooble/2023.12.25",
"expect" :
{
"name" : "Dooble",
"version" : "2023.12.25",
"major" : "2023"
}
},
{ {
"desc" : "Doris", "desc" : "Doris",
"ua" : "Doris/1.15 [en] (Symbian)", "ua" : "Doris/1.15 [en] (Symbian)",
@@ -551,26 +541,6 @@
"major" : "5" "major" : "5"
} }
}, },
{
"desc" : "Ecosia on Android",
"ua" : "Mozilla/5.0 (Linux; Android 10; SM-G975U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36 (Ecosia android@85.0.4183.127)",
"expect" :
{
"name" : "Ecosia",
"version" : "85.0.4183.127",
"major" : "85"
}
},
{
"desc" : "Ecosia on iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 (Ecosia ios@3.0.1.533)",
"expect" :
{
"name" : "Ecosia",
"version" : "3.0.1.533",
"major" : "3"
}
},
{ {
"desc" : "Epiphany", "desc" : "Epiphany",
"ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6", "ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6",
@@ -1036,16 +1006,6 @@
"major" : "5" "major" : "5"
} }
}, },
{
"desc" : "Otter",
"ua" : "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/602.1 (KHTML, like Gecko) Otter/1.0.81",
"expect" :
{
"name" : "Otter",
"version" : "1.0.81",
"major" : "1"
}
},
{ {
"desc" : "PicoBrowser", "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", "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",
@@ -1107,33 +1067,13 @@
} }
}, },
{ {
"desc" : "Surf Browser", "desc" : "LibreWolf",
"ua" : "Mozilla/5.0 (Android 6.0; HUAWEI ALE-L21) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 SurfBrowser/3.0", "ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 LibreWolf/91.0",
"expect" : "expect" :
{ {
"name" : "Surf", "name" : "LibreWolf",
"version" : "3.0", "version" : "91.0",
"major" : "3" "major" : "91"
}
},
{
"desc" : "LG Browser",
"ua" : "Mozilla/5.0 (Unknown; Linux armv7l) AppleWebKit/537.1+ (KHTML, like Gecko) Safari/537.1+ LG Browser/6.00.00(+mouse+3D+SCREEN+TUNER; LGE; 47LA621V-ZD; 04.28.17; 0x00000001;); LG NetCast.TV-2013 /04.28.17 (LG, 47LA621V-ZD, wired)",
"expect" :
{
"name" : "LG Browser",
"version" : "6.00.00",
"major" : "6"
}
},
{
"desc" : "Ladybird",
"ua" : "Mozilla/5.0 (Linux; x86_64) Ladybird/1.0",
"expect" :
{
"name" : "Ladybird",
"version" : "1.0",
"major" : "1"
} }
}, },
{ {
@@ -1678,16 +1618,6 @@
"major" : "1" "major" : "1"
} }
}, },
{
"desc" : "qutebrowser",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) qutebrowser/2.4.0 QtWebEngine/5.15.6 Chrome/95.0.4628.2 Safari/537.36",
"expect" :
{
"name" : "qutebrowser",
"version" : "2.4.0",
"major" : "2"
}
},
{ {
"desc" : "Rekonq 2", "desc" : "Rekonq 2",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) rekonq/2.2.1 Safari/537.21", "ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) rekonq/2.2.1 Safari/537.21",
@@ -2563,26 +2493,6 @@
"type" : "inapp" "type" : "inapp"
} }
}, },
{
"desc" : "Daum App Android",
"ua" : "Mozilla/5.0 (Linux; Android 11; SM-G970N Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 DaumApps/7.5.0 DaumDevice/mobile",
"expect" : {
"name" : "Daum",
"version": "7.5.0",
"major" : "7",
"type" : "inapp"
}
},
{
"desc" : "Daum App iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Safari/605.1.15 Mobile/15E148 DaumApps/7.5.1 DaumDevice/mobile",
"expect" : {
"name" : "Daum",
"version": "7.5.1",
"major" : "7",
"type" : "inapp"
}
},
{ {
"desc" : "TikTok", "desc" : "TikTok",
"ua" : "Mozilla/5.0 (Linux; Android 11; 21061119AG Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile Safari/537.36 trill_2022109040 JsSdk/1.0 NetType/MOBILE Channel/googleplay AppName/musical_ly app_version/21.9.4 ByteLocale/ru-RU ByteFullLocale/ru-RU Region/KG BytedanceWebview/d8a21c6", "ua" : "Mozilla/5.0 (Linux; Android 11; 21061119AG Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile Safari/537.36 trill_2022109040 JsSdk/1.0 NetType/MOBILE Channel/googleplay AppName/musical_ly app_version/21.9.4 ByteLocale/ru-RU ByteFullLocale/ru-RU Region/KG BytedanceWebview/d8a21c6",

View File

@@ -175,14 +175,6 @@
"architecture" : "arm64" "architecture" : "arm64"
} }
}, },
{
"desc" : "Google Search App",
"ua" : "Mozilla/5.0 (Linux; Android 9; JAT-LX1 Build/HONORJAT-LX1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.96 Mobile Safari/537.36 GoogleApp/11.11.10.21.arm",
"expect" :
{
"architecture" : "arm"
}
},
{ {
"desc" : "Google Search App", "desc" : "Google Search App",
"ua" : "Mozilla/5.0 (Linux; Android 6.0; M5s Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.147 Mobile Safari/537.36 GSA/12.40.17.23.arm64", "ua" : "Mozilla/5.0 (Linux; Android 6.0; M5s Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.147 Mobile Safari/537.36 GSA/12.40.17.23.arm64",
@@ -278,13 +270,5 @@
{ {
"architecture" : "68k" "architecture" : "68k"
} }
},
{
"desc" : "x86",
"ua" : "Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.8.1.20) Gecko/20090127 BonEcho/2.0.0.20",
"expect" :
{
"architecture" : "ia32"
}
} }
] ]

View File

@@ -1,18 +1,10 @@
[ [
{
"desc": "Generic Android Device",
"ua": "Dalvik/2.1.0 (Linux; U; Android 9; X96mini_RP Build/X96mini_RP)",
"expect": {
"vendor": "Generic",
"model": "X96mini_RP"
}
},
{ {
"desc": "Generic Android Device", "desc": "Generic Android Device",
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; i980 Build/MRA58K)", "ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; i980 Build/MRA58K)",
"expect": { "expect": {
"vendor": "Generic", "vendor": "Generic",
"model": "i980" "model": "Android 6.0.1"
} }
}, },
{ {
@@ -24,14 +16,6 @@
"type": "mobile" "type": "mobile"
} }
}, },
{
"desc": "Unknown VR Device",
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; Unknown Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile VR Safari/537.36",
"expect": {
"model": "Unknown",
"type": "xr"
}
},
{ {
"desc": "Desktop (IE11 with Tablet string)", "desc": "Desktop (IE11 with Tablet string)",
"ua": "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; GWX:MANAGED; rv:11.0) like Gecko", "ua": "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; GWX:MANAGED; rv:11.0) like Gecko",
@@ -50,33 +34,6 @@
"type": "mobile" "type": "mobile"
} }
}, },
{
"desc": "ChangHong Android TV",
"ua": "Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; ChangHong Android TV Build/LMY49J) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/10.8 Mobile Safari/537.36",
"expect": {
"vendor": "undefined",
"model": "ChangHong",
"type": "smarttv"
}
},
{
"desc": "MStar Android TV",
"ua": "Mozilla/5.0 (Linux; Android 4.3.1; MStar Android TV Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Safari/537.36",
"expect": {
"vendor": "undefined",
"model": "MStar",
"type": "smarttv"
}
},
{
"desc": "ONIDA Android TV",
"ua": "Mozilla/5.0 (Linux; Android 6.0; ONIDA Android TV Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/48.0.2542.0 Mobile Safari/537.36",
"expect": {
"vendor": "undefined",
"model": "ONIDA",
"type": "smarttv"
}
},
{ {
"desc": "JVC LT-43V55LFA Smart TV", "desc": "JVC LT-43V55LFA Smart TV",
"ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 OPR/40.0.2207.0 OMI/4.9.0.237.DOM3-OPT.245 Model/Vestel-MB211 VSTVB MB200 HbbTV/1.2.1 (; JVC; MB211; 3.19.4.2; _TV_NT72563_2017 SmartTvA/3.0.0", "ua": "Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 OPR/40.0.2207.0 OMI/4.9.0.237.DOM3-OPT.245 Model/Vestel-MB211 VSTVB MB200 HbbTV/1.2.1 (; JVC; MB211; 3.19.4.2; _TV_NT72563_2017 SmartTvA/3.0.0",
@@ -289,14 +246,5 @@
"model": "undefined", "model": "undefined",
"type": "mobile" "type": "mobile"
} }
},
{
"desc" : "Windows IoT",
"ua" : "Mozilla/5.0 (Windows IoT 10.0; Android 6.0.1; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Mobile Safari/537.36 Edge/18.17763",
"expect": {
"vendor": "undefined",
"model": "undefined",
"type": "embedded"
}
} }
] ]

View File

@@ -1,15 +1,6 @@
[ [
{ {
"desc": "Alcatel 4056W", "desc": "Alcatel",
"ua": "Mozilla/5.0 (Mobile; ALCATEL 4056W; rv:84.0) Gecko/84.0 Firefox/84.0 KAIOS/3.0",
"expect": {
"vendor": "ALCATEL",
"model": "4056W",
"type": "mobile"
}
},
{
"desc": "Alcatel A564C",
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; ALCATEL A564C Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36", "ua": "Mozilla/5.0 (Linux; Android 4.4.2; ALCATEL A564C Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36",
"expect": { "expect": {
"vendor": "ALCATEL", "vendor": "ALCATEL",

View File

@@ -116,15 +116,6 @@
"type": "mobile" "type": "mobile"
} }
}, },
{
"desc": "Apple HomePod",
"ua": "AppleCoreMedia/1.0.0.15D61 (HomePod; U; CPU OS 11_2_5 like Mac OS X; en_us)",
"expect": {
"vendor": "Apple",
"model": "HomePod",
"type": "embedded"
}
},
{ {
"desc": "Issue #519", "desc": "Issue #519",
"ua": "ios/iPhone/14.2/SOME_CUSTOM_APP_VERSION", "ua": "ios/iPhone/14.2/SOME_CUSTOM_APP_VERSION",

View File

@@ -1,227 +0,0 @@
[
{
"desc": "Archos 5",
"ua": "Mozilla/5.0 (Linux; U; Android 1.6; fr-fr; Archos5 Build/Donut) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1",
"expect": {
"vendor": "Archos",
"model": "5",
"type": "tablet"
}
},
{
"desc": "Archos 40b Titanium Surround",
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Archos 40b Titanium Surround Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "40b Titanium Surround",
"type": "mobile"
}
},
{
"desc": "Archos 40c Titanium v2",
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; ARCHOS 40C TIv2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "40C TIv2",
"type": "mobile"
}
},
{
"desc": "Archos 45 Neon",
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Archos 45 Neon Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "45 Neon",
"type": "mobile"
}
},
{
"desc": "Archos 45 Neon",
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; AC45NE Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 YaBrowser/15.6.2311.6088.00 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "AC45NE",
"type": "mobile"
}
},
{
"desc": "Archos 45B Helium",
"ua": "Mozilla/5.0 (Linux; Android 7.0; AC45BHE Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "AC45BHE",
"type": "mobile"
}
},
{
"desc": "Archos 45B Titanium",
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Archos 45B Titanium) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "45B Titanium",
"type": "mobile"
}
},
{
"desc": "Archos 50 Cesium",
"ua": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; ARCHOS; AC50CE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586",
"expect": {
"vendor": "Archos",
"model": "AC50CE",
"type": "mobile"
}
},
{
"desc": "Archos 50B Helium 4G",
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; AC50BHE Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "AC50BHE",
"type": "mobile"
}
},
{
"desc": "Archos 55 diamond Selfie",
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; Archos 55 diamond Selfie Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "55 diamond Selfie",
"type": "mobile"
}
},
{
"desc": "Archos 80 G9",
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; zh-tw; ARCHOS 80G9 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
"expect": {
"vendor": "Archos",
"model": "80G9",
"type": "tablet"
}
},
{
"desc": "Archos 80 Xenon",
"ua": "Mozilla/5.0 (Linux; Android 4.1.2; Archos 80 Xenon Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.99 Safari/537.36 OPR/50.6.2426.201126",
"expect": {
"vendor": "Archos",
"model": "80 Xenon",
"type": "tablet"
}
},
{
"desc": "Archos 97c Platinum",
"ua": "Mozilla/5.0 (Linux; Android 6.0; Archos 97c Platinum Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "97c Platinum",
"type": "tablet"
}
},
{
"desc": "Archos 101 Access 3G V2",
"ua": "Mozilla/5.0 (Linux; Android 7.0; Archos Access 101 3G V2 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.130 Safari/537.36[FBAN/EMA;FBLC/pt_PT;FBAV/360.0.0.7.53;]",
"expect": {
"vendor": "Archos",
"model": "Access 101 3G V2",
"type": "tablet"
}
},
{
"desc": "Archos 101 Oxygen 4G",
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Archos 101 Oxygen 4G Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.71 Safari/537.36 [FB_IAB/FB4A;FBAV/374.0.0.20.109;]",
"expect": {
"vendor": "Archos",
"model": "101 Oxygen 4G",
"type": "tablet"
}
},
{
"desc": "Archos 101 Platinum 3G V2",
"ua": "Mozilla/5.0 (Linux; Android 7.0; AC101PL3GV2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "AC101PL3GV2",
"type": "tablet"
}
},
{
"desc": "Archos 101B Helium 4G",
"ua": "Mozilla/5.0 (Linux; Android 6.0; AC101BHE Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "AC101BHE",
"type": "tablet"
}
},
{
"desc": "Archos 101s Oxygen Ardoiz",
"ua": "Mozilla/5.0 (Linux; Android 9; Archos Oxygen 101S ARDOIZ Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.102 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "Oxygen 101S ARDOIZ",
"type": "tablet"
}
},
{
"desc": "Archos GAMEPAD2",
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; ARCHOS GAMEPAD2 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.94 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "GAMEPAD2",
"type": "tablet"
}
},
{
"desc": "Archos Hello 7",
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Archos Hello 7 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.53 Safari/537.36 GoogleApp/13.24.9.26.arm64",
"expect": {
"vendor": "Archos",
"model": "Hello 7",
"type": "tablet"
}
},
{
"desc": "Archos Sense 101 X",
"ua": "Mozilla/5.0 (Linux; arm; Android 7.0; Archos Sense 101 X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 YaBrowser/20.2.0.215.01 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "Sense 101 X",
"type": "tablet"
}
},
{
"desc": "Archos T101 FHD WiFi",
"ua": "Mozilla/5.0 (Linux; Android 13; ARCHOS T101 FHD WiFi Build/T00624; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.159 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "T101 FHD WiFi",
"type": "tablet"
}
},
{
"desc": "Archos Tikeasy 10d",
"ua": "Mozilla/5.0 (Linux; Android 13; Tikeasy 10d Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.260 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "Tikeasy 10d",
"type": "tablet"
}
},
{
"desc": "Archos T96 WIFI",
"ua": "Mozilla/5.0 (Linux; Android 11; ARCHOS T96 WIFI_EEA Build/RP1A.201005.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.78 Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "T96 WIFI_EEA",
"type": "tablet"
}
},
{
"desc": "Archos X67 5G",
"ua": "Mozilla/5.0 (Linux; Android 10; X67 5G Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.58 Mobile Safari/537.36",
"expect": {
"vendor": "Archos",
"model": "X67 5G",
"type": "tablet"
}
}
]

View File

@@ -1,101 +0,0 @@
[
{
"desc": "BLU Grand X LTE",
"ua": "Mozilla/5.0 (Linux; Android 7.0; BLU Grand X LTE Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.137 Mobile Safari/537.36",
"expect": {
"vendor": "BLU",
"model": "Grand X LTE",
"type": "mobile"
}
},
{
"desc": "BLU Neo Energy Mini",
"ua": "Mozilla/5.0 (Linux; Android 10; BLU_NEO_ENERGY_MINI Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.54 Mobile Safari/537.36",
"expect": {
"vendor": "BLU",
"model": "NEO_ENERGY_MINI",
"type": "mobile"
}
},
{
"desc": "BLU NEO X PLUS",
"ua": "Mozilla/5.0 (Linux; Android 5.1; BLU NEO X PLUS Build/N090U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36",
"expect": {
"vendor": "BLU",
"model": "NEO X PLUS",
"type": "mobile"
}
},
{
"desc": "BLU STUDIO X MINI",
"ua": "Mozilla/5.0 (Linux; Android 5.1; BLU STUDIO X MINI Build/S0150UU) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36",
"expect": {
"vendor": "BLU",
"model": "STUDIO X MINI",
"type": "mobile"
}
},
{
"desc": "BLU Tank Mega",
"ua": "Mozilla/5.0 (Mobile; BLU_TankMega_3G; rv:48.0; CAEN) Gecko/48.0 Firefox/48.0 KAIOS/2.5.1.1",
"expect": {
"vendor": "BLU",
"model": "TankMega_3G",
"type": "mobile"
}
},
{
"desc": "BLU TOUCHBOOK G7",
"ua": "Mozilla/5.0 (Linux; Android 5.0; BLU TOUCHBOOK G7 Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.107 Safari/537.36 OPR/29.0.1809.91837",
"expect": {
"vendor": "BLU",
"model": "TOUCHBOOK G7",
"type": "mobile"
}
},
{
"desc": "BLU Vivo 5 Mini",
"ua": "Mozilla/5.0 (Linux; Android 7.0; Vivo 5 Mini Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36",
"expect": {
"vendor": "BLU",
"model": "Vivo 5 Mini",
"type": "mobile"
}
},
{
"desc": "BLU VIVO AIR LTE",
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; BLU VIVO AIR LTE Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.107 Mobile Safari/537.36 OPR/29.0.1809.91837",
"expect": {
"vendor": "BLU",
"model": "VIVO AIR LTE",
"type": "mobile"
}
},
{
"desc": "BLU VIVO GO",
"ua": "Mozilla/5.0 (Linux; U; Android 9; VIVO GO Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.121 Mobile Safari/537.36 OPR/50.0.2254.149182",
"expect": {
"vendor": "BLU",
"model": "VIVO GO",
"type": "mobile"
}
},
{
"desc": "BLU Vivo One Plus 2019",
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; Vivo One Plus 2019 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/277.0.0.41.126;]",
"expect": {
"vendor": "BLU",
"model": "Vivo One Plus 2019",
"type": "mobile"
}
},
{
"desc": "BLU VIVO SELFIE",
"ua": "Mozilla/5.0 (Linux; U; Android 5.0; es-LA; BLU VIVO SELFIE Build/LRX21M) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/11.3.5.972 U3/0.8.0 Mobile Safari/534.30",
"expect": {
"vendor": "BLU",
"model": "VIVO SELFIE",
"type": "mobile"
}
}
]

View File

@@ -34,14 +34,5 @@
"model": "Quest Pro", "model": "Quest Pro",
"type": "xr" "type": "xr"
} }
},
{
"desc": "Portal TV",
"ua": "Mozilla/5.0 (Linux; Android 9; PortalTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.120 Mobile Safari/537.36",
"expect": {
"vendor": "Facebook",
"model": "PortalTV",
"type": "smarttv"
}
} }
] ]

View File

@@ -1,13 +1,4 @@
[ [
{
"desc": "HMD Barbie Phone",
"ua": "Mozilla/5.0 (Mobile; HMD Barbie Phone; rv:84.0) Gecko/84.0 Firefox/84.0 KAIOS/3.1",
"expect": {
"vendor": "HMD",
"model": "Barbie Phone",
"type": "mobile"
}
},
{ {
"desc": "HMD Pulse", "desc": "HMD Pulse",
"ua": "Mozilla/5.0 (Linux; Android 14; HMD Pulse) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36", "ua": "Mozilla/5.0 (Linux; Android 14; HMD Pulse) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36",

View File

@@ -134,15 +134,6 @@
"type": "smarttv" "type": "smarttv"
} }
}, },
{
"desc": "LG Smart TV",
"ua": "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.41 (KHTML, like Gecko) Large Screen Safari/537.41 LG Browser/7.00.00(LGE; 42LB670V-ZA; 05.05.90; 1); webOS.TV-2014; LG NetCast.TV-2013 Compatible (LGE, 42LB670V-ZA, wireless)",
"expect": {
"vendor": "LG",
"model": "42LB670V-ZA",
"type": "smarttv"
}
},
{ {
"desc": "LG Android TV", "desc": "LG Android TV",
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; LG Android TV Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; LG Android TV Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",

View File

@@ -17,15 +17,6 @@
"type": "mobile" "type": "mobile"
} }
}, },
{
"desc": "Nokia 5800 XpressMusic",
"ua": "Mozilla/5.0 (SymbianOS/9.4; U; Series60/5.0 Nokia5800d-1/10.4.016; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413",
"expect": {
"vendor": "Nokia",
"model": "5800d-1",
"type": "mobile"
}
},
{ {
"desc": "Nokia 7", "desc": "Nokia 7",
"ua": "Mozilla/5.0 (Linux; Android 11; Nokia 7.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36", "ua": "Mozilla/5.0 (Linux; Android 11; Nokia 7.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36",
@@ -35,33 +26,6 @@
"type": "mobile" "type": "mobile"
} }
}, },
{
"desc": "Nokia 808 PureView",
"ua": "Mozilla/5.0 (Symbian; U; Nokia808 PureView; en-GB) AppleWebKit/534.3 (KHTML, like Gecko) Version/3.0 Mobile/1A543a Mobile Safari/534.3",
"expect": {
"vendor": "Nokia",
"model": "808 PureView",
"type": "mobile"
}
},
{
"desc": "Nokia 808 PureView",
"ua": "Mozilla/5.0 (Symbian/3; Series60/5.5 Nokia808PureView/113.010.1508; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/535.1 (KHTML, like Gecko) NokiaBrowser/8.3.2.21 Mobile Safari/535.1 3gpp-gba",
"expect": {
"vendor": "Nokia",
"model": "808PureView",
"type": "mobile"
}
},
{
"desc": "Nokia Lumia 630",
"ua": "UCWEB/2.0 (Windows; U; wds 8.10; en-IN; NOKIA; RM-978_1046) U2/1.0.0 UCBrowser/4.2.0.524 U2/1.0.0 Mobile",
"expect": {
"vendor": "Nokia",
"model": "RM-978",
"type": "mobile"
}
},
{ {
"desc": "Nokia N9", "desc": "Nokia N9",
"ua": "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", "ua": "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",
@@ -71,15 +35,6 @@
"type": "mobile" "type": "mobile"
} }
}, },
{
"desc": "Nokia N900",
"ua": "Mozilla/5.0 (Linux; Maemo 5.0; Nokia N900; Build/4.0.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0 Mobile Safari/537.36",
"expect": {
"vendor": "Nokia",
"model": "N900",
"type": "mobile"
}
},
{ {
"desc": "Nokia T20", "desc": "Nokia T20",
"ua": "Mozilla/5.0 (Linux; Android 12; Nokia T20) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", "ua": "Mozilla/5.0 (Linux; Android 12; Nokia T20) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",

View File

@@ -1,22 +1,4 @@
[ [
{
"desc": "Tegra Note 7",
"ua": "Mozilla/5.0 (Linux; Android 5.1; TegraNote-P1640 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Safari/537.36",
"expect": {
"vendor": "Nvidia",
"model": "TegraNote-P1640",
"type": "tablet"
}
},
{
"desc": "Nvidia Shield",
"ua": "Mozilla/5.0 (Linux; Android 5.1; SHIELD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Mobile Safari/537.36",
"expect": {
"vendor": "Nvidia",
"model": "SHIELD",
"type": "console"
}
},
{ {
"desc": "Nvidia Shield Tablet", "desc": "Nvidia Shield Tablet",
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; SHIELD Tablet Build/LVY48E; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/45.0.2454.19 Safari/537.36", "ua": "Mozilla/5.0 (Linux; Android 5.1.1; SHIELD Tablet Build/LVY48E; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/45.0.2454.19 Safari/537.36",
@@ -25,23 +7,5 @@
"model": "SHIELD Tablet", "model": "SHIELD Tablet",
"type": "tablet" "type": "tablet"
} }
},
{
"desc": "Nvidia Shield Tablet K1",
"ua": "Mozilla/5.0 (Linux; Android 7.0; SHIELD Tablet K1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.98 Safari/537.36",
"expect": {
"vendor": "Nvidia",
"model": "SHIELD Tablet K1",
"type": "tablet"
}
},
{
"desc": "Nvidia Shield TV",
"ua": "Mozilla/5.0 (Linux; Android 11; SHIELD Android TV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36 ",
"expect": {
"vendor": "Nvidia",
"model": "SHIELD Android TV",
"type": "smarttv"
}
} }
] ]

View File

@@ -296,15 +296,6 @@
"type": "mobile" "type": "mobile"
} }
}, },
{
"desc": "TCL 4056S",
"ua": "Mozilla/5.0 (Mobile; TCL 4056S; rv:84.0) Gecko/84.0 Firefox/84.0 KAIOS/3.0",
"expect": {
"vendor": "TCL",
"model": "4056S",
"type": "mobile"
}
},
{ {
"desc": "TCL A3", "desc": "TCL A3",
"ua": "Mozilla/5.0 (Linux; Android 11; A509DL Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Mobile Safari/537.36 GSA/13.18.7.23.arm64", "ua": "Mozilla/5.0 (Linux; Android 11; A509DL Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Mobile Safari/537.36 GSA/13.18.7.23.arm64",

View File

@@ -62,15 +62,6 @@
"version" : "4.5.4" "version" : "4.5.4"
} }
}, },
{
"desc" : "LibWeb",
"ua" : "Mozilla/5.0 (Linux; x86_64) Ladybird/1.0",
"expect" :
{
"name" : "LibWeb",
"version" : "undefined"
}
},
{ {
"desc" : "LibWeb", "desc" : "LibWeb",
"ua" : "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb", "ua" : "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb",

View File

@@ -9,16 +9,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "AdIdxBot",
"ua" : "Mozilla/5.0 (compatible; adidxbot/2.0; +http://www.bing.com/bingbot.htm)",
"expect" :
{
"name" : "adidxbot",
"version" : "2.0",
"type" : "crawler"
}
},
{ {
"desc" : "AdsBot Mobile Web", "desc" : "AdsBot Mobile Web",
"ua" : "AdsBot-Google (+http://www.google.com/adsbot.html)", "ua" : "AdsBot-Google (+http://www.google.com/adsbot.html)",
@@ -89,16 +79,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "Applebot-Extended",
"ua" : "Applebot-Extended",
"expect" :
{
"name" : "Applebot-Extended",
"version" : "undefined",
"type" : "crawler"
}
},
{ {
"desc" : "Amazonbot", "desc" : "Amazonbot",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 (Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot)", "ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 (Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot)",
@@ -109,126 +89,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "Anthropic AI",
"ua" : "anthropic-ai",
"expect" :
{
"name" : "anthropic-ai",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "Archive.org Bot",
"ua" : "ia_archiver/8.1 (Windows 2000 1.9; en-US;)",
"expect" :
{
"name" : "ia_archiver",
"version" : "8.1",
"type" : "crawler"
}
},
{
"desc" : "Archive.org Bot",
"ua" : "Mozilla/5.0 (compatible; archive.org_bot/3.3.0 +https://archive.org/details/archive.org_bot)",
"expect" :
{
"name" : "archive.org_bot",
"version" : "3.3.0",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider",
"ua" : "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)",
"expect" :
{
"name" : "Baiduspider",
"version" : "2.0",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider-ads",
"ua" : "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0; Baiduspider-ads) Gecko/17.0 Firefox/17.0",
"expect" :
{
"name" : "Baiduspider-ads",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider-cpro",
"ua" : "Mozilla/5.0 (compatible; Baiduspider-cpro; +http://www.baidu.com/search/spider.html)",
"expect" :
{
"name" : "Baiduspider-cpro",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider-favo",
"ua" : "Baiduspider-favo",
"expect" :
{
"name" : "Baiduspider-favo",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider-image",
"ua" : "Baiduspider-image+(+http://www.baidu.com/search/spider.htm)",
"expect" :
{
"name" : "Baiduspider-image",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider-news",
"ua" : "Baiduspider-news",
"expect" :
{
"name" : "Baiduspider-news",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider-render",
"ua" : "Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)",
"expect" :
{
"name" : "Baiduspider-render",
"version" : "2.0",
"type" : "crawler"
}
},
{
"desc" : "Baiduspider-video",
"ua" : "Baiduspider-video",
"expect" :
{
"name" : "Baiduspider-video",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "Bingbot",
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/",
"expect" :
{
"name" : "bingbot",
"version" : "2.0",
"type" : "crawler"
}
},
{ {
"desc" : "Bytespider", "desc" : "Bytespider",
"ua" : "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.1511.1269 Mobile Safari/537.36; Bytespider", "ua" : "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.1511.1269 Mobile Safari/537.36; Bytespider",
@@ -319,16 +179,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "DuckDuckBot",
"ua" : "DuckDuckBot/1.1; ( http://duckduckgo.com/duckduckbot.html)",
"expect" :
{
"name" : "DuckDuckBot",
"version" : "1.1",
"type" : "crawler"
}
},
{ {
"desc" : "Exabot", "desc" : "Exabot",
"ua" : "Mozilla/5.0 (compatible; Exabot/3.0; +http://www.exabot.com/go/robot)", "ua" : "Mozilla/5.0 (compatible; Exabot/3.0; +http://www.exabot.com/go/robot)",
@@ -489,6 +339,26 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "Archive.org Bot",
"ua" : "ia_archiver/8.1 (Windows 2000 1.9; en-US;)",
"expect" :
{
"name" : "ia_archiver",
"version" : "8.1",
"type" : "crawler"
}
},
{
"desc" : "Archive.org Bot",
"ua" : "Mozilla/5.0 (compatible; archive.org_bot/3.3.0 +https://archive.org/details/archive.org_bot)",
"expect" :
{
"name" : "archive.org_bot",
"version" : "3.3.0",
"type" : "crawler"
}
},
{ {
"desc" : "ImagesiftBot", "desc" : "ImagesiftBot",
"ua" : "Mozilla/5.0 (compatible; ImagesiftBot; +imagesift.com)", "ua" : "Mozilla/5.0 (compatible; ImagesiftBot; +imagesift.com)",
@@ -499,26 +369,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "Linespider",
"ua" : "Mozilla/5.0 (compatible; Linespider/1.1; +https://lin.ee/4dwXkTH)",
"expect" :
{
"name" : "Linespider",
"version" : "1.1",
"type" : "crawler"
}
},
{
"desc" : "LinkedInBot",
"ua" : "LinkedInBot/1.0 (compatible; Mozilla/5.0; Apache-HttpClient +http://www.linkedin.com)",
"expect" :
{
"name" : "LinkedInBot",
"version" : "1.0",
"type" : "crawler"
}
},
{ {
"desc" : "magpie-crawler", "desc" : "magpie-crawler",
"ua" : "magpie-crawler/1.1 (robots-txt-checker; +http://www.brandwatch.net)", "ua" : "magpie-crawler/1.1 (robots-txt-checker; +http://www.brandwatch.net)",
@@ -612,7 +462,7 @@
}, },
{ {
"desc" : "PetalBot", "desc" : "PetalBot",
"ua" : "Mozilla/5.0 (Linux; Android 7.0;) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; PetalBot;+https://webmaster.petalsearch.com/site/petalbot)", "ua" : "Mozilla/5.0 (Linux; Android 7.0;) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; PetalBot;+https://webmaster.petalsearch.com/site/petalbot) ",
"expect" : "expect" :
{ {
"name" : "PetalBot", "name" : "PetalBot",
@@ -630,36 +480,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "SemrushBot for Backlink Audit tool",
"ua" : "Mozilla/5.0 (compatible; SemrushBot-BA; +http://www.semrush.com/bot.html)",
"expect" :
{
"name" : "SemrushBot-BA",
"version" : "undefined",
"type" : "crawler"
}
},
{
"desc" : "SemrushBot for On Page SEO Checker tool",
"ua" : "Mozilla/5.0 (compatible; SemrushBot-SI/0.97; +http://www.semrush.com/bot.html)",
"expect" :
{
"name" : "SemrushBot-SI",
"version" : "0.97",
"type" : "crawler"
}
},
{
"desc" : "SemrushBot for ContentShake AI tool",
"ua" : "Mozilla/5.0 (compatible; SemrushBot-OCOB/1; +https://www.semrush.com/bot/)",
"expect" :
{
"name" : "SemrushBot-OCOB",
"version" : "1",
"type" : "crawler"
}
},
{ {
"desc" : "SeznamBot", "desc" : "SeznamBot",
"ua" : "Mozilla/5.0 (compatible; SeznamBot/4.0-RC1; +http://napoveda.seznam.cz/seznambot-intro/)", "ua" : "Mozilla/5.0 (compatible; SeznamBot/4.0-RC1; +http://napoveda.seznam.cz/seznambot-intro/)",
@@ -670,16 +490,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "Sogou",
"ua" : "Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)",
"expect" :
{
"name" : "Sogou web spider",
"version" : "4.0",
"type" : "crawler"
}
},
{ {
"desc" : "Teoma", "desc" : "Teoma",
"ua" : "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)", "ua" : "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)",
@@ -730,16 +540,6 @@
"type" : "crawler" "type" : "crawler"
} }
}, },
{
"desc" : "Yahoo! Slurp",
"ua" : "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp) ",
"expect" :
{
"name" : "Yahoo! Slurp",
"version" : "undefined",
"type" : "crawler"
}
},
{ {
"desc" : "YandexBot", "desc" : "YandexBot",
"ua" : "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)", "ua" : "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)",

View File

@@ -9,16 +9,6 @@
"type" : "fetcher" "type" : "fetcher"
} }
}, },
{
"desc" : "Better Uptime Bot",
"ua" : "Better Uptime Bot Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
"expect" :
{
"name" : "Better Uptime Bot",
"version" : "undefined",
"type" : "fetcher"
}
},
{ {
"desc" : "BingPreview", "desc" : "BingPreview",
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b", "ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b",
@@ -29,16 +19,6 @@
"type" : "fetcher" "type" : "fetcher"
} }
}, },
{
"desc" : "Bluesky",
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Bluesky Cardyb/1.1; +mailto:support@bsky.app) Chrome/100.0.0.0 Safari/537.36",
"expect" :
{
"name" : "Bluesky",
"version" : "1.1",
"type" : "fetcher"
}
},
{ {
"desc" : "ChatGPT-User", "desc" : "ChatGPT-User",
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot", "ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot",
@@ -69,16 +49,6 @@
"type" : "fetcher" "type" : "fetcher"
} }
}, },
{
"desc" : "Google Image Proxy",
"ua" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)",
"expect" :
{
"name" : "GoogleImageProxy",
"version" : "undefined",
"type" : "fetcher"
}
},
{ {
"desc" : "Google Read Aloud - Mobile agent", "desc" : "Google Read Aloud - Mobile agent",
"ua" : "Mozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36 (compatible; Google-Read-Aloud; +https://support.google.com/webmasters/answer/1061943)", "ua" : "Mozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36 (compatible; Google-Read-Aloud; +https://support.google.com/webmasters/answer/1061943)",
@@ -99,16 +69,6 @@
"type" : "fetcher" "type" : "fetcher"
} }
}, },
{
"desc" : "Google Page Renderer",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Google-PageRenderer Google (+https://developers.google.com/+/web/snippet/) ",
"expect" :
{
"name" : "Google-PageRenderer",
"version" : "undefined",
"type" : "fetcher"
}
},
{ {
"desc" : "Google Publisher Center", "desc" : "Google Publisher Center",
"ua" : "GoogleProducer; (+https://developers.google.com/search/docs/crawling-indexing/google-producer)", "ua" : "GoogleProducer; (+https://developers.google.com/search/docs/crawling-indexing/google-producer)",
@@ -139,26 +99,6 @@
"type" : "fetcher" "type" : "fetcher"
} }
}, },
{
"desc" : "MicrosoftPreview",
"ua" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; MicrosoftPreview/2.0; +https://aka.ms/MicrosoftPreview) Chrome/W.X.Y.Z Safari/537.36",
"expect" :
{
"name" : "MicrosoftPreview",
"version" : "2.0",
"type" : "fetcher"
}
},
{
"desc" : "Pinterestbot",
"ua" : "Mozilla/5.0 (compatible; Pinterestbot/1.0; +http://www.pinterest.com/bot.html)",
"expect" :
{
"name" : "Pinterestbot",
"version" : "1.0",
"type" : "fetcher"
}
},
{ {
"desc" : "Rogerbot", "desc" : "Rogerbot",
"ua" : "Mozilla/5.0 (compatible; rogerBot/1.0; UrlCrawler; http://www.seomoz.org/dp/rogerbot)", "ua" : "Mozilla/5.0 (compatible; rogerBot/1.0; UrlCrawler; http://www.seomoz.org/dp/rogerbot)",
@@ -169,46 +109,6 @@
"type" : "fetcher" "type" : "fetcher"
} }
}, },
{
"desc" : "SiteAuditBot",
"ua" : "Mozilla/5.0 (compatible; SiteAuditBot/0.97; +http://www.semrush.com/bot.html)",
"expect" :
{
"name" : "SiteAuditBot",
"version" : "0.97",
"type" : "fetcher"
}
},
{
"desc" : "Snap URL Preview",
"ua" : "Snap URL Preview Service; bot; snapchat; https://developers.snap.com/robots ",
"expect" :
{
"name" : "Snap URL Preview",
"version" : "undefined",
"type" : "fetcher"
}
},
{
"desc" : "SkypeUriPreview",
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) SkypeUriPreview Preview/0.5 skype-url-preview@microsoft.com",
"expect" :
{
"name" : "SkypeUriPreview",
"version" : "0.5",
"type" : "fetcher"
}
},
{
"desc" : "TelegramBot",
"ua" : "TelegramBot (like TwitterBot)",
"expect" :
{
"name" : "TelegramBot",
"version" : "undefined",
"type" : "fetcher"
}
},
{ {
"desc" : "UptimeRobot", "desc" : "UptimeRobot",
"ua" : "Mozilla/5.0 (compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)", "ua" : "Mozilla/5.0 (compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)",
@@ -228,15 +128,5 @@
"version" : "undefined", "version" : "undefined",
"type" : "fetcher" "type" : "fetcher"
} }
},
{
"desc" : "WhatsApp",
"ua" : "WhatsApp/2.23.20.0",
"expect" :
{
"name" : "WhatsApp",
"version" : "2.23.20.0",
"type" : "fetcher"
}
} }
] ]

View File

@@ -1,32 +0,0 @@
[
{
"desc" : "Slack on mac",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Slack/4.39.90 Chrome/127.0.6533.72 Electron/13.1.9 Safari/537.36",
"expect" :
{
"name" : "Slack",
"version" : "4.39.90",
"type" : "inapp"
}
},
{
"desc" : "Yahoo! Japan on Android",
"ua" : "Mozilla/5.0 (Linux; Android 13; SH-M20 Build/TKQ1.220915.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/132.0.6834.163 Mobile Safari/537.36 YJApp-ANDROID jp.co.yahoo.android.yjtop/3.187.0",
"expect" :
{
"name" : "Yahoo! Japan",
"version" : "3.187.0",
"type" : "inapp"
}
},
{
"desc" : "Yahoo! Japan on iOS",
"ua" : "Mozilla/5.0 (iPad; CPU OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 YJApp-IOS jp.co.yahoo.ipn.appli/4.131.0",
"expect" :
{
"name" : "Yahoo! Japan",
"version" : "4.131.0",
"type" : "inapp"
}
}
]

View File

@@ -1,62 +0,0 @@
[
{
"desc" : "BMW",
"ua" : "Mozilla/5.0 (Linux; Android 9; AFTLBT962E2) AppleWebKit/537.36 (KHTML, like Gecko) Silk/118.3.1 like Chrome/118.0.5993.155 Safari/537.36",
"expect" :
{
"vendor" : "BMW",
"model" : "undefined",
"type" : "undefined"
}
},
{
"desc" : "BYD",
"ua" : "Mozilla/5.0 (Linux; Android 10; DiLink3.0 For BYD AUTO Build/QKQ1.200816.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Safari/537.36",
"expect" :
{
"vendor" : "BYD",
"model" : "undefined",
"type" : "undefined"
}
},
{
"desc" : "Jeep",
"ua" : "Mozilla/5.0 (Linux; Android 9; AFTLFT962X3) AppleWebKit/537.36 (KHTML, like Gecko) Silk/124.5.2 like Chrome/124.0.6367.248 Safari/537.36",
"expect" :
{
"vendor" : "Jeep",
"model" : "Wagooner",
"type" : "undefined"
}
},
{
"desc" : "Rivian",
"ua" : "Dalvik/2.1.0 (Linux; U; Android 10; Rivian R1T Build/QQ3A.200605.002)",
"expect" :
{
"vendor" : "Rivian",
"model" : "R1T",
"type" : "undefined"
}
},
{
"desc" : "Tesla",
"ua" : "Mozilla/5.0 (X11; GNU/Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chromium/79.0.3945.130 Chrome/79.0.3945.130 Safari/537.36 Tesla/2020.36.16-3e9e4e8dd287",
"expect" :
{
"vendor" : "Tesla",
"model" : "undefined",
"type" : "embedded"
}
},
{
"desc" : "Volvo",
"ua" : "Mozilla/5.0 (VCC; 1.0; like Gecko) NetFront/4.2",
"expect" :
{
"vendor" : "Volvo",
"model" : "undefined",
"type" : "undefined"
}
}
]

View File

@@ -52,14 +52,5 @@
"name" : "iOS", "name" : "iOS",
"version" : "7.0.2" "version" : "7.0.2"
} }
},
{
"desc": "Apple HomePod",
"ua": "AppleCoreMedia/1.0.0.15D61 (HomePod; U; CPU OS 11_2_5 like Mac OS X; en_us)",
"expect" :
{
"name" : "iOS",
"version" : "11.2.5"
}
} }
] ]

View File

@@ -5,16 +5,7 @@
"expect" : "expect" :
{ {
"name" : "Linux", "name" : "Linux",
"version" : "undefined" "version" : "x86_64"
}
},
{
"desc" : "Linux",
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
"expect" :
{
"name" : "Linux",
"version" : "undefined"
} }
} }
] ]

View File

@@ -7,23 +7,5 @@
"name" : "Maemo", "name" : "Maemo",
"version" : "undefined" "version" : "undefined"
} }
},
{
"desc" : "Nokia N900 Linux mobile, on the Maemo browser",
"ua" : "Mozilla/5.0(X11; U; Linux armv7l; fr-FR; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900",
"expect" :
{
"name" : "Maemo",
"version" : "undefined"
}
},
{
"desc" : "Nokia N900 Linux mobile, on the Maemo browser",
"ua" : "Mozilla/5.0 (Linux; Maemo 5.0; Nokia N900; Build/4.0.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0 Mobile Safari/537.36",
"expect" :
{
"name" : "Maemo",
"version" : "5.0"
}
} }
] ]

View File

@@ -5,7 +5,7 @@
"expect" : "expect" :
{ {
"name" : "QNX", "name" : "QNX",
"version" : "undefined" "version" : "x86pc"
} }
} }
] ]

View File

@@ -1,6 +1,6 @@
[ [
{ {
"desc" : "Nokia 5250", "desc" : "Symbian",
"ua" : "Nokia5250/10.0.011 (SymbianOS/9.4; U; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Safari/525 3gpp-gba", "ua" : "Nokia5250/10.0.011 (SymbianOS/9.4; U; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Safari/525 3gpp-gba",
"expect" : "expect" :
{ {
@@ -9,57 +9,12 @@
} }
}, },
{ {
"desc" : "Nokia N79", "desc" : "Symbian",
"ua" : "Mozilla/5.0 (SymbianOS/9.3; U; Series60/3.2 NokiaN79-1/32.001; Profile/MIDP-2.1 Configuration/CLDC-1",
"expect" :
{
"name" : "Symbian",
"version" : "9.3"
}
},
{
"desc" : "Nokia E71",
"ua" : "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaE71-1/110.07.127; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413",
"expect" :
{
"name" : "Symbian",
"version" : "9.2"
}
},
{
"desc" : "Opera Mini on S60",
"ua" : "Opera/9.80 (Series 60; Opera Mini/7.1.32444/191.361; U; de) Presto/2.12.423 Version/12.16",
"expect" :
{
"name" : "Symbian",
"version" : "undefined"
}
},
{
"desc" : "NokiaBrowser on Nokia C7",
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaC7-00/024.001; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba", "ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaC7-00/024.001; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba",
"expect" : "expect" :
{ {
"name" : "Symbian", "name" : "Symbian",
"version" : "3" "version" : "5.2"
}
},
{
"desc" : "Nokia 808 PureView",
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.5 Nokia808PureView/113.010.1508; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/535.1 (KHTML, like Gecko) NokiaBrowser/8.3.2.21 Mobile Safari/535.1 3gpp-gba",
"expect" :
{
"name" : "Symbian",
"version" : "3"
}
},
{
"desc" : "Nokia 808 PureView",
"ua" : "Mozilla/5.0 (Symbian; U; Nokia808 PureView; en-GB) AppleWebKit/534.3 (KHTML, like Gecko) Version/3.0 Mobile/1A543a Mobile Safari/534.3",
"expect" :
{
"name" : "Symbian",
"version" : "undefined"
} }
} }
] ]

View File

@@ -1,11 +0,0 @@
[
{
"desc" : "Ubuntu Touch",
"ua" : "Mozilla/5.0 (Linux; Ubuntu 16.04 like Android 4.4) AppleWebKit/537.36 Chromium/65.0.3325.151 Mobile Safari/537.36",
"expect" :
{
"name" : "Ubuntu Touch",
"version" : "16.04"
}
}
]

View File

@@ -1,11 +0,0 @@
[
{
"desc" : "Windows IoT",
"ua" : "Mozilla/5.0 (Windows IoT 10.0; Android 6.0.1; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Mobile Safari/537.36 Edge/18.17763",
"expect" :
{
"name" : "Windows IoT",
"version" : "10.0"
}
}
]

56
test/unit/device-utils.js Normal file
View File

@@ -0,0 +1,56 @@
const assert = require('assert');
const { UAParser } = require('../../src/main/ua-parser');
const { getMarketingName, isMobile, isSmartTV, isTablet, isWearable, isXR } = require('../../src/device-utils/ua-parser-device-utils');
const { Vendor } = require('../../src/enums/ua-parser-enums');
describe('Device type check', () => {
const advanM4 = 'Mozilla/5.0 (Linux; U; Android 6.0; ADVAN M4 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36 OPR/28.0.2254.119214';
const galaxyWatch5 = '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';
const miTV = 'Mozilla/5.0 (Linux; Android 10; MiTV-MOOQ0 Build/QTG3.200305.006; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/94.0.4606.61 Mobile Safari/537.36';
const nokiaT20 = 'Mozilla/5.0 (Linux; Android 11; Nokia T20 Build/RP1A.201005.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/93.0.4577.62 Safari/537.36';
const questPro = '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';
it('isMobile()', () => {
assert.strictEqual(isMobile(advanM4), true);
assert.strictEqual(isMobile(galaxyWatch5), false);
assert.strictEqual(isMobile(nokiaT20), false);
assert.strictEqual(isMobile(miTV), false);
const uaResult = UAParser(advanM4);
const { device: uaDevice } = uaResult;
assert.strictEqual(isMobile(uaResult), true);
assert.strictEqual(isMobile(uaDevice), true);
assert.strictEqual(isMobile(isMobile), false);
});
it('isSmartTV()', () => {
assert.strictEqual(isSmartTV(nokiaT20), false);
assert.strictEqual(isSmartTV(galaxyWatch5), false);
assert.strictEqual(isSmartTV(miTV), true);
});
it('isTablet()', () => {
assert.strictEqual(isTablet(nokiaT20), true);
assert.strictEqual(isTablet(questPro), false);
});
it('isWearable()', () => {
assert.strictEqual(isWearable(advanM4), false);
assert.strictEqual(isWearable(galaxyWatch5), true);
assert.strictEqual(isWearable(miTV), false);
});
it('isXR()', () => {
assert.strictEqual(isXR(advanM4), false);
assert.strictEqual(isXR(questPro), true);
});
});
describe('getMarketingName()', () => {
it('Returns marketing name from given model name', () => {
assert.strictEqual(getMarketingName('M2101K9C', Vendor.XIAOMI), 'Mi 11 Lite 5G');
assert.strictEqual(getMarketingName('SM-S928N', Vendor.SAMSUNG), 'Galaxy S24 Ultra');
});
});

View File

@@ -4,33 +4,29 @@ const parseJS = require('@babel/parser').parse;
const traverse = require('@babel/traverse').default; const traverse = require('@babel/traverse').default;
const safe = require('safe-regex'); const safe = require('safe-regex');
const { UAParser } = require('../../src/main/ua-parser'); const { UAParser } = require('../../src/main/ua-parser');
const { Bots, CLIs, Crawlers, Emails, Fetchers, InApps, Libraries, Vehicles } = require('../../src/extensions/ua-parser-extensions'); const clis = require('../data/ua/extension/cli.json');
const crawlers = require('../data/ua/extension/crawler.json');
const emails = require('../data/ua/extension/email.json');
const fetchers = require('../data/ua/extension/fetcher.json');
const libraries = require('../data/ua/extension/library.json');
const { Bots, CLIs, Crawlers, Emails, Fetchers, Libraries } = require('../../src/extensions/ua-parser-extensions');
describe('Extensions', () => { describe('Extensions', () => {
[ [
['CLIs', 'cli', CLIs], ['CLIs', clis, CLIs],
['Crawlers', 'crawler', Crawlers], ['Crawlers', crawlers, Crawlers],
['Emails', 'email', Emails], ['Emails', emails, Emails],
['Fetchers', 'fetcher', Fetchers], ['Fetchers', fetchers, Fetchers],
['InApps', 'inapp', InApps], ['Libraries', libraries, Libraries]
['Libraries', 'library', Libraries],
['Vehicles', 'vehicle', Vehicles]
] ]
.forEach(([desc, path, ext]) => { .forEach((list) => {
const tests = require(`../data/ua/extension/${path}.json`); describe(list[0], () => {
describe(desc, () => { list[1].forEach((agent) => {
tests.forEach((test) => { it(`Can detect ${agent.desc}: "${agent.ua}"`, () => {
it(`Can detect ${test.desc}: "${test.ua}"`, () => { let browser = UAParser(agent.ua, list[2]).browser;
const { browser, device } = UAParser(test.ua, ext); assert.strictEqual(String(browser.name), agent.expect.name);
if ('browser' in ext) { assert.strictEqual(String(browser.version), agent.expect.version);
assert.strictEqual(String(browser.name), test.expect.name); assert.strictEqual(String(browser.type), agent.expect.type);
assert.strictEqual(String(browser.version), test.expect.version);
assert.strictEqual(String(browser.type), test.expect.type);
} else if ('device' in ext) {
assert.strictEqual(String(device.vendor), test.expect.vendor);
assert.strictEqual(String(device.model), test.expect.model);
assert.strictEqual(String(device.type), test.expect.type);
}
}); });
}); });
}); });
@@ -52,21 +48,6 @@ describe('Extensions', () => {
assert.deepEqual(libraryParser.setUA(axios).getBrowser(), {name: "axios", version: "1.3.5", major: "1", type: "library"}); assert.deepEqual(libraryParser.setUA(axios).getBrowser(), {name: "axios", version: "1.3.5", major: "1", type: "library"});
assert.deepEqual(libraryParser.setUA(jsdom).getBrowser(), {name: "jsdom", version: "20.0.3", major: "20", type: "library"}); assert.deepEqual(libraryParser.setUA(jsdom).getBrowser(), {name: "jsdom", version: "20.0.3", major: "20", type: "library"});
assert.deepEqual(libraryParser.setUA(scrapy).getBrowser(), {name: "Scrapy", version: "1.5.0", major: "1", type: "library"}); assert.deepEqual(libraryParser.setUA(scrapy).getBrowser(), {name: "Scrapy", version: "1.5.0", major: "1", type: "library"});
// Bluesky
const bluesky = 'Mozilla/5.0 (compatible; Bluesky Cardyb/1.1; +mailto:support@bsky.app)';
assert.deepEqual(new UAParser(bluesky, Bots).getBrowser(), {
name: 'Bluesky',
version: '1.1',
major: '1',
type: 'fetcher'
});
const whatsapp = "WhatsApp/2.0 A";
assert.deepEqual(new UAParser(whatsapp, Fetchers).getOS(), {
name : 'Android',
version : undefined
});
}); });
describe('Merge', () => { describe('Merge', () => {

View File

@@ -9,11 +9,13 @@ describe('getDeviceVendor', () => {
const modelSM = 'SM-A605G'; const modelSM = 'SM-A605G';
const modelRedmi = 'Redmi Note 8'; const modelRedmi = 'Redmi Note 8';
const modelNexus = 'Nexus 6P'; const modelNexus = 'Nexus 6P';
const modelQuest = 'Quest 3';
const modelAquos = 'AQUOS-TVX19B'; const modelAquos = 'AQUOS-TVX19B';
assert.equal(getDeviceVendor(modelSM), 'Samsung'); assert.equal(getDeviceVendor(modelSM), 'Samsung');
assert.equal(getDeviceVendor(modelRedmi), 'Xiaomi'); assert.equal(getDeviceVendor(modelRedmi), 'Xiaomi');
assert.equal(getDeviceVendor(modelNexus), 'Huawei'); assert.equal(getDeviceVendor(modelNexus), 'Huawei');
assert.equal(getDeviceVendor(modelQuest), 'Facebook');
assert.equal(getDeviceVendor(modelAquos), 'Sharp'); assert.equal(getDeviceVendor(modelAquos), 'Sharp');
}); });
}); });
@@ -38,13 +40,11 @@ describe('isAIBot', () => {
const claudeBot = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)'; const claudeBot = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)';
const firefox = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0'; const firefox = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0';
const searchGPT = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OAI-SearchBot/1.0; +https://openai.com/searchbot'; const searchGPT = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OAI-SearchBot/1.0; +https://openai.com/searchbot';
const semrushAI = 'Mozilla/5.0 (compatible; SemrushBot-OCOB/1; +https://www.semrush.com/bot/)';
assert.equal(isAIBot(UAParser(claudeBot, Bots)), true); assert.equal(isAIBot(UAParser(claudeBot, Bots)), true);
assert.equal(isAIBot(claudeBot), true); assert.equal(isAIBot(claudeBot), true);
assert.equal(isAIBot(firefox), false); assert.equal(isAIBot(firefox), false);
assert.equal(isAIBot(searchGPT), true); assert.equal(isAIBot(searchGPT), true);
assert.equal(isAIBot(semrushAI), true);
}); });
}); });

View File

@@ -68,7 +68,7 @@ describe('Map UA-CH headers', () => {
assert.strictEqual(uap.engine.name, 'Blink'); assert.strictEqual(uap.engine.name, 'Blink');
assert.strictEqual(uap.engine.version, '110.0.0.0'); assert.strictEqual(uap.engine.version, '110.0.0.0');
assert.strictEqual(uap.os.name, "Linux"); assert.strictEqual(uap.os.name, "Linux");
assert.strictEqual(uap.os.version, undefined); assert.strictEqual(uap.os.version, "x86_64");
}); });
it('Fallback to user-agent header when using `withClientHints()` but found no client hints-related headers', () => { it('Fallback to user-agent header when using `withClientHints()` but found no client hints-related headers', () => {
@@ -90,7 +90,7 @@ describe('Map UA-CH headers', () => {
assert.strictEqual(uap.engine.name, 'Blink'); assert.strictEqual(uap.engine.name, 'Blink');
assert.strictEqual(uap.engine.version, '110.0.0.0'); assert.strictEqual(uap.engine.version, '110.0.0.0');
assert.strictEqual(uap.os.name, "Linux"); assert.strictEqual(uap.os.name, "Linux");
assert.strictEqual(uap.os.version, undefined); assert.strictEqual(uap.os.version, "x86_64");
}); });
it('Can detect Apple silicon from client hints data', () => { it('Can detect Apple silicon from client hints data', () => {
@@ -220,220 +220,45 @@ describe('Map UA-CH headers', () => {
}); });
}); });
describe('UA-CH Headers tests', () => { describe('Browser naming adjustments', () => {
[ [
{ {
headers : { ua_ch: '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',
'sec-ch-ua': '"Avast Secure Browser";v="131", "Chromium";v="131", "Not_A Brand";v="24"'
},
expect: { expect: {
browser : { before: 'Google Chrome',
name : 'Avast Secure Browser', after: 'Chrome'
version : '131',
major : '131',
type : undefined
}
} }
}, },
{ {
headers : { ua_ch: '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
'sec-ch-ua': '"Not A(Brand";v="8", "Chromium";v="132", "Brave";v="132"'
},
expect: { expect: {
browser : { before: "Microsoft Edge",
name : 'Brave', after: "Edge"
version : '132',
major : '132',
type : undefined
}
} }
}, },
{ {
headers : { ua_ch: '"Android WebView";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
'sec-ch-ua': '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"'
},
expect: { expect: {
browser : { before: "Android WebView",
name : 'Chrome', after: "Chrome WebView"
version : '111',
major : '111',
type : undefined
}
} }
}, },
{ {
headers : { ua_ch: '"Chromium";v="124", "HeadlessChrome";v="124", "Not-A.Brand";v="99"',
'sec-ch-ua': '"Chromium";v="124", "HeadlessChrome";v="124", "Not-A.Brand";v="99"'
},
expect: { expect: {
browser : { before: "HeadlessChrome",
name : 'Chrome Headless', after: "Chrome Headless"
version : '124',
major : '124',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Android WebView";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
},
expect: {
browser : {
name : 'Chrome WebView',
version : '123',
major : '123',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"DuckDuckGo";v="131", "Chromium";v="131", "Not_A Brand";v="24"'
},
expect : {
browser : {
name : 'DuckDuckGo',
version : '131',
major : '131',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"'
},
expect: {
browser : {
name : 'Edge',
version : '120',
major : '120',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "HuaweiBrowser";v="114"'
},
expect: {
browser : {
name : 'Huawei Browser',
version : '114',
major : '114',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Miui Browser";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
},
expect: {
browser : {
name : 'MIUI Browser',
version : '123',
major : '123',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Chromium";v="130", "Oculus Browser";v="36", "Not?A_Brand";v="99"'
},
expect: {
browser : {
name : 'Oculus Browser',
version : '36',
major : '36',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Opera";v="116", "Chromium";v="131", "Not_A Brand";v="24"'
},
expect: {
browser : {
name : 'Opera',
version : '116',
major : '116',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Chromium";v="128", "Not;A=Brand";v="24", "Opera GX";v="114"'
},
expect: {
browser : {
name : 'Opera GX',
version : '114',
major : '114',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"OperaMobile";v="86", ";Not A Brand";v="99", "Opera";v="115", "Chromium";v="130"'
},
expect: {
browser : {
name : 'Opera Mobi',
version : '86',
major : '86',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Chromium";v="132", "OperaMobile";v="87", "Opera";v="117", " Not A;Brand";v="99"'
},
expect: {
browser : {
name : 'Opera Mobi',
version : '87',
major : '87',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Chromium";v="125", "Not.A/Brand";v="24", "Samsung Internet";v="27.0"'
},
expect: {
browser : {
name : 'Samsung Internet',
version : '27.0',
major : '27',
type : undefined
}
}
},
{
headers : {
'sec-ch-ua': '"Chromium";v="130", "YaBrowser";v="24.12", "Not?A_Brand";v="99", "Yowser";v="2.5"'
},
expect: {
browser : {
name : 'Yandex',
version : '24.12',
major : '24',
type : undefined
}
} }
}, },
] ]
.forEach(test => { .forEach(test => {
const { browser } = UAParser(test.headers).withClientHints(); it(`"${test.expect.before}" => "${test.expect.after}"`, () => {
assert.deepEqual(browser, test.expect.browser); const headers = {
'sec-ch-ua' : test.ua_ch,
};
const { browser } = UAParser(headers).withClientHints();
assert.strictEqual(browser.name, test.expect.after);
});
}); });
}); });