Compare commits

...

13 Commits

Author SHA1 Message Date
Faisal Salman
a1644b6775 Update version to 2.0.0-rc.2 2024-11-07 21:00:04 +07:00
Faisal Salman
0808d1d940 Fix #759 - Incorrect import path for ESM files in build script 2024-11-07 18:38:17 +07:00
Faisal Salman
e954f19b5c Move isFrozenUA() & isStandalonePWA() to its own npm module 2024-11-05 19:57:08 +07:00
Faisal Salman
5097b8093e [submodule:enums] Add some of Chromecast OS variants 2024-11-04 11:10:44 +07:00
Faisal Salman
2223a2b2d4 Add new browser: LibreWolf
https://librewolf.net/
2024-11-03 11:32:02 +07:00
Faisal Salman
246c038895 Improve browser detection: Maxthon 2024-11-03 11:17:30 +07:00
Faisal Salman
2dc1be1a50 Add new browser: 115 Browser
http://pc.115.com/
2024-11-03 01:35:47 +07:00
Faisal Salman
2624a92b39 Improve browser detection: 2345 & 360 2024-11-03 01:30:47 +07:00
Faisal Salman
d571859b2e Improve browser detection: Comodo Dragon, or simply Dragon 2024-11-02 20:17:50 +07:00
Faisal Salman
b7c2f541d9 Add new browsers: Slimjet & SlimBoat
https://www.slimjet.com/
2024-11-02 19:57:54 +07:00
Faisal Salman
10b81836f1 Improve browser detection: SRWare Iron 2024-11-02 18:26:35 +07:00
Faisal Salman
5a1d0319f8 Add new helper method: isBot() to detect whether current browser is a bot 2024-11-02 13:15:33 +07:00
Faisal Salman
7a754ef227 Update browser.type="inapp" for InApp browsers 2024-11-02 12:30:31 +07:00
21 changed files with 461 additions and 158 deletions

View File

@@ -10,8 +10,6 @@ assignees: ''
**Library version** **Library version**
Which version of the library that you use, eg: v0.7.35 or v2.0.0-alpha.3 Which version of the library that you use, eg: v0.7.35 or v2.0.0-alpha.3
For the issue related with detection result, you can use the demo section in https://uaparser.dev to confirm
**Describe the bug** **Describe the bug**
A clear and concise description of what the bug is. A clear and concise description of what the bug is.
@@ -23,11 +21,13 @@ Steps to reproduce the behavior:
4. See error 4. See error
**Expected behavior** **Expected behavior**
A clear and concise description of what you expected to happen. A clear and concise description of what you expected to happen, or what's referred in the docs https://docs.uaparser.dev/
**Screenshots** **Screenshots**
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to help explain your problem.
For issues related to detection results, you can send the screenshots of the demo section at https://uaparser.dev/#demo to confirm.
**Desktop (please complete the following information):** **Desktop (please complete the following information):**
- OS: [e.g. iOS] - OS: [e.g. iOS]
- Browser [e.g. chrome, safari] - Browser [e.g. chrome, safari]
@@ -40,4 +40,4 @@ If applicable, add screenshots to help explain your problem.
- Version [e.g. 22] - Version [e.g. 22]
**Additional context** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.

View File

@@ -1,5 +1,46 @@
# UAParser.js Changelog # UAParser.js Changelog
## Migrating from v1 to v2
- What's breaking:
- Licensed under AGPLv3 (open-source) or PRO License (commercial)
- Browser detection on mobile device: `"Chrome" => "Mobile Chrome"`, `"Firefox" => "Mobile Firefox"`
- OS detection: `"Mac OS" => "macOS"`, `"Chromium OS" => "Chrome OS"`
- What's new:
- New device type: `xr`, to identify AR/VR devices
- New browser property: `browser.type`, to identify the type of the browser: `crawler`, `cli`, `email`, `fetcher`, `inapp`, `mediaplayer`, `module`
- New methods in result object (all of `get*()` return value):
- Support for client hints: `withClientHints()`
- Support for feature detection: `withFeatureCheck()`
- Utility for easy comparison: `is()`
- Utility to print full-name: `toString()`
- Parse directly from command line using `npx ua-parser-js`
- Extensions can be passed as a list to `UAParser()`
- Support for ES module & TypeScript `import { UAParser } from 'ua-parser-js'`
- Provided Enums submodule `'ua-parser-js/enums'`
- Provided Extensions submodule `'ua-parser-js/extensions'`
- Provided Helpers submodule `'ua-parser-js/helpers'`:
- `getDeviceVendor()` to guess for a device vendor based on its model name
- `isAppleSilicon()` to check if the device has Apple Silicon Mac device properties
- `isBot()` to check if the browser is identified as a bot
- `isChromeFamily()` to check if the browser is Chrome-based / has Blink engine (i.e: New Opera, New Edge, Vivaldi, Brave, Arc, etc.)
- `isElectron()` to check if current window is running inside Electron
- `isFromEU()` to check if current window is from an EU (European Union) country
- `isFrozenUA()` to check if a user-agent string match with the reduced/frozen user-agent pattern
- `isStandalonePWA()` to check if current window is a standalone PWA
--
## Version 2.0.0-rc.2
- Fix incorrect import path in ESM files
- Add new browser: 115, SlimBoat, Slimjet, LibreWolf
- Improve browser detection: 2345, 360, Dragon, Iron, Maxthon
- `ua-parser-js/enums` submodule:
- Add Chromecast OS variants: Android/Fuchsia/Linux/SmartSpeaker
- `ua-parser-js/helpers` submodule:
- Add new method: `isBot()` to check if the browser is identified as a bot
## Version 2.0.0-rc.1 ## Version 2.0.0-rc.1
- Fix Python Request mistakenly identified as Meta Quest - Fix Python Request mistakenly identified as Meta Quest
@@ -68,27 +109,6 @@
- Initial work on new major version - Initial work on new major version
## Version 2.0
- What's breaking:
- Dual-licensed under AGPLv3 or PRO License
- Browser detection on mobile device: `"Chrome" => "Mobile Chrome"`, `"Firefox" => "Mobile Firefox"`
- OS detection: `"Mac OS" => "macOS"`, `"Chromium OS" => "Chrome OS"`
- AR/VR devices moved to new device type: `xr`
- New property in `browser`: `type`
- What's new:
- Some new methods in result object:
- Support for client hints: `withClientHints()`
- Support for feature detection: `withFeatureCheck()`
- Utility for easy comparison: `is()`
- Utility to print full-name: `toString()`
- Parse directly from command line using `npx ua-parser-js`
- Extensions can be passed as a list to `UAParser()`
- Support for ES module `import { UAParser } from 'ua-parser-js'`
- Provided Enums submodule `'ua-parser-js/enums'`
- Provided Extensions submodule `'ua-parser-js/extensions'`
- Provided Helpers submodule `'ua-parser-js/helpers'`
--- ---
## Version 0.7.38 / 1.0.38 ## Version 0.7.38 / 1.0.38

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

46
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "ua-parser-js", "name": "ua-parser-js",
"version": "2.0.0-rc.1", "version": "2.0.0-rc.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ua-parser-js", "name": "ua-parser-js",
"version": "2.0.0-rc.1", "version": "2.0.0-rc.2",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@@ -23,7 +23,9 @@
], ],
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"detect-europe-js": "^0.1.1" "detect-europe-js": "^0.1.1",
"is-standalone-pwa": "^0.1.0",
"ua-is-frozen": "^0.1.1"
}, },
"bin": { "bin": {
"ua-parser-js": "script/cli.js" "ua-parser-js": "script/cli.js"
@@ -2609,6 +2611,25 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/is-standalone-pwa": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/is-standalone-pwa/-/is-standalone-pwa-0.1.0.tgz",
"integrity": "sha512-n5SQqXd0/JEkrKYEB7ZUndwuS7NKskZvk6rZZt6kTE1jiPxtPfPvVhXkfteIKpUfcEP07qsja/Wjz9NDjiZ5gg==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/faisalman"
},
{
"type": "opencollective",
"url": "https://opencollective.com/ua-parser-js"
},
{
"type": "paypal",
"url": "https://paypal.me/faisalman"
}
]
},
"node_modules/isarray": { "node_modules/isarray": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
@@ -4597,6 +4618,25 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/ua-is-frozen": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ua-is-frozen/-/ua-is-frozen-0.1.1.tgz",
"integrity": "sha512-TxhyfblPzcDJXRXu/j+73OI6s1jG6PUZBF/8hjTHoAsjZYKl9IhZzLQlnZHFLe5U2mvL1lMOOmcy647KpUq25A==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/faisalman"
},
{
"type": "opencollective",
"url": "https://opencollective.com/ua-parser-js"
},
{
"type": "paypal",
"url": "https://paypal.me/faisalman"
}
]
},
"node_modules/uglify-js": { "node_modules/uglify-js": {
"version": "3.12.8", "version": "3.12.8",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.8.tgz", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.8.tgz",

View File

@@ -1,7 +1,7 @@
{ {
"title": "UAParser.js", "title": "UAParser.js",
"name": "ua-parser-js", "name": "ua-parser-js",
"version": "2.0.0-rc.1", "version": "2.0.0-rc.2",
"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": [
@@ -211,7 +211,9 @@
"test:playwright": "playwright test" "test:playwright": "playwright test"
}, },
"dependencies": { "dependencies": {
"detect-europe-js": "^0.1.1" "detect-europe-js": "^0.1.1",
"is-standalone-pwa": "^0.1.0",
"ua-is-frozen": "^0.1.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/parser": "7.15.8", "@babel/parser": "7.15.8",

View File

@@ -7,7 +7,7 @@ const generateMJS = (module) => {
let text = fs.readFileSync(src, 'utf-8'); let text = fs.readFileSync(src, 'utf-8');
replacements.push( replacements.push(
[/const (.+?)\s*=\s*require\(\'\.(.+)\'\)/ig, 'import $1 from \'$2.mjs\''], [/const (.+?)\s*=\s*require\(\'\.(.+)\'\)/ig, 'import $1 from \'\.$2.mjs\''],
[/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2\''], [/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2\''],
[/module\.exports =/ig, 'export'] [/module\.exports =/ig, 'export']
); );

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Enums for UAParser.js v2.0.0-rc.1 /* Enums for UAParser.js v2.0.0-rc.2
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 */
@@ -8,8 +8,9 @@
/*jshint esversion: 6 */ /*jshint esversion: 6 */
const Browser = Object.freeze({ const Browser = Object.freeze({
'2345_EXPLORER': '2345Explorer', '115': '115',
'360': '360 Browser', '2345': '2345',
'360': '360',
ALIPAY: 'Alipay', ALIPAY: 'Alipay',
AMAYA: 'Amaya', AMAYA: 'Amaya',
ANDROID: 'Android Browser', ANDROID: 'Android Browser',
@@ -32,11 +33,11 @@ const Browser = Object.freeze({
CHROMIUM: 'Chromium', CHROMIUM: 'Chromium',
COBALT: 'Cobalt', COBALT: 'Cobalt',
COC_COC: 'Coc Coc', COC_COC: 'Coc Coc',
COMODO_DRAGON: 'Comodo Dragon',
CONKEROR: 'Conkeror', CONKEROR: 'Conkeror',
DILLO: 'Dillo', DILLO: 'Dillo',
DOLPHIN: 'Dolphin', DOLPHIN: 'Dolphin',
DORIS: 'Doris', DORIS: 'Doris',
DRAGON: 'Dragon',
DUCKDUCKGO: 'DuckDuckGo', DUCKDUCKGO: 'DuckDuckGo',
EDGE: 'Edge', EDGE: 'Edge',
EPIPHANY: 'Epiphany', EPIPHANY: 'Epiphany',
@@ -74,6 +75,7 @@ const Browser = Object.freeze({
KLARNA: 'Klarna', KLARNA: 'Klarna',
KINDLE: 'Kindle', KINDLE: 'Kindle',
LENOVO: 'Smart Lenovo Browser', LENOVO: 'Smart Lenovo Browser',
LIBREWOLF: 'LibreWolf',
LIEBAO: 'LBBROWSER', LIEBAO: 'LBBROWSER',
LINE: 'Line', LINE: 'Line',
LINKEDIN: 'LinkedIn', LINKEDIN: 'LinkedIn',
@@ -122,7 +124,9 @@ const Browser = Object.freeze({
SILK: 'Silk', SILK: 'Silk',
SKYFIRE: 'Skyfire', SKYFIRE: 'Skyfire',
SLEIPNIR: 'Sleipnir', SLEIPNIR: 'Sleipnir',
SLIMBOAT: 'SlimBoat',
SLIMBROWSER: 'SlimBrowser', SLIMBROWSER: 'SlimBrowser',
SLIMJET: 'Slimjet',
SNAPCHAT: 'Snapchat', SNAPCHAT: 'Snapchat',
SOGOU_EXPLORER: 'Sogou Explorer', SOGOU_EXPLORER: 'Sogou Explorer',
SOGOU_MOBILE: 'Sogou Mobile', SOGOU_MOBILE: 'Sogou Mobile',
@@ -287,6 +291,10 @@ const OS = Object.freeze({
CENTOS: 'CentOS', CENTOS: 'CentOS',
CHROME_OS: 'Chrome OS', CHROME_OS: 'Chrome OS',
CHROMECAST: 'Chromecast', CHROMECAST: 'Chromecast',
CHROMECAST_ANDROID: 'Chromecast Android',
CHROMECAST_FUCHSIA: 'Chromecast Fuchsia',
CHROMECAST_LINUX: 'Chromecast Linux',
CHROMECAST_SMARTSPEAKER: 'Chromecast SmartSpeaker',
CONTIKI: 'Contiki', CONTIKI: 'Contiki',
DEBIAN: 'Debian', DEBIAN: 'Debian',
DEEPIN: 'Deepin', DEEPIN: 'Deepin',

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.0-rc.1 /* Enums for UAParser.js v2.0.0-rc.2
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 */
@@ -12,8 +12,9 @@
/*jshint esversion: 6 */ /*jshint esversion: 6 */
const Browser = Object.freeze({ const Browser = Object.freeze({
'2345_EXPLORER': '2345Explorer', '115': '115',
'360': '360 Browser', '2345': '2345',
'360': '360',
ALIPAY: 'Alipay', ALIPAY: 'Alipay',
AMAYA: 'Amaya', AMAYA: 'Amaya',
ANDROID: 'Android Browser', ANDROID: 'Android Browser',
@@ -36,11 +37,11 @@ const Browser = Object.freeze({
CHROMIUM: 'Chromium', CHROMIUM: 'Chromium',
COBALT: 'Cobalt', COBALT: 'Cobalt',
COC_COC: 'Coc Coc', COC_COC: 'Coc Coc',
COMODO_DRAGON: 'Comodo Dragon',
CONKEROR: 'Conkeror', CONKEROR: 'Conkeror',
DILLO: 'Dillo', DILLO: 'Dillo',
DOLPHIN: 'Dolphin', DOLPHIN: 'Dolphin',
DORIS: 'Doris', DORIS: 'Doris',
DRAGON: 'Dragon',
DUCKDUCKGO: 'DuckDuckGo', DUCKDUCKGO: 'DuckDuckGo',
EDGE: 'Edge', EDGE: 'Edge',
EPIPHANY: 'Epiphany', EPIPHANY: 'Epiphany',
@@ -78,6 +79,7 @@ const Browser = Object.freeze({
KLARNA: 'Klarna', KLARNA: 'Klarna',
KINDLE: 'Kindle', KINDLE: 'Kindle',
LENOVO: 'Smart Lenovo Browser', LENOVO: 'Smart Lenovo Browser',
LIBREWOLF: 'LibreWolf',
LIEBAO: 'LBBROWSER', LIEBAO: 'LBBROWSER',
LINE: 'Line', LINE: 'Line',
LINKEDIN: 'LinkedIn', LINKEDIN: 'LinkedIn',
@@ -126,7 +128,9 @@ const Browser = Object.freeze({
SILK: 'Silk', SILK: 'Silk',
SKYFIRE: 'Skyfire', SKYFIRE: 'Skyfire',
SLEIPNIR: 'Sleipnir', SLEIPNIR: 'Sleipnir',
SLIMBOAT: 'SlimBoat',
SLIMBROWSER: 'SlimBrowser', SLIMBROWSER: 'SlimBrowser',
SLIMJET: 'Slimjet',
SNAPCHAT: 'Snapchat', SNAPCHAT: 'Snapchat',
SOGOU_EXPLORER: 'Sogou Explorer', SOGOU_EXPLORER: 'Sogou Explorer',
SOGOU_MOBILE: 'Sogou Mobile', SOGOU_MOBILE: 'Sogou Mobile',
@@ -291,6 +295,10 @@ const OS = Object.freeze({
CENTOS: 'CentOS', CENTOS: 'CentOS',
CHROME_OS: 'Chrome OS', CHROME_OS: 'Chrome OS',
CHROMECAST: 'Chromecast', CHROMECAST: 'Chromecast',
CHROMECAST_ANDROID: 'Chromecast Android',
CHROMECAST_FUCHSIA: 'Chromecast Fuchsia',
CHROMECAST_LINUX: 'Chromecast Linux',
CHROMECAST_SMARTSPEAKER: 'Chromecast SmartSpeaker',
CONTIKI: 'Contiki', CONTIKI: 'Contiki',
DEBIAN: 'Debian', DEBIAN: 'Debian',
DEEPIN: 'Deepin', DEEPIN: 'Deepin',

View File

@@ -1,4 +1,4 @@
// Type definitions for Helpers submodule of UAParser.js v2.0.0-beta.3 // Type definitions for Helpers submodule of UAParser.js v2.0.0-rc.2
// 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,5 +1,5 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Extensions for UAParser.js v2.0.0-rc.1 /* Extensions for UAParser.js v2.0.0-rc.2
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 */

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.0-rc.1 /* Extensions for UAParser.js v2.0.0-rc.2
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 */

View File

@@ -1,4 +1,4 @@
// Type definitions for Helpers submodule of UAParser.js v2.0.0-beta.3 // Type definitions for Helpers submodule of UAParser.js v2.0.0-rc.2
// 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>
@@ -6,6 +6,7 @@ import { IResult } from "../main/ua-parser";
declare function getDeviceVendor(model: string): string | undefined; declare function getDeviceVendor(model: string): string | undefined;
declare function isAppleSilicon(res: IResult): boolean; declare function isAppleSilicon(res: IResult): boolean;
declare function isBot(res: IResult): boolean;
declare function isChromeFamily(res: IResult): boolean; declare function isChromeFamily(res: IResult): boolean;
declare function isElectron(): boolean; declare function isElectron(): boolean;
declare function isFromEU(): boolean; declare function isFromEU(): boolean;
@@ -15,6 +16,7 @@ declare function isStandalonePWA(): boolean;
export { export {
getDeviceVendor, getDeviceVendor,
isAppleSilicon, isAppleSilicon,
isBot,
isChromeFamily, isChromeFamily,
isElectron, isElectron,
isFromEU, isFromEU,

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
/* Helpers for UAParser.js v2.0.0-rc.1 /* Helpers for UAParser.js v2.0.0-rc.2
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 */
@@ -7,9 +7,11 @@
/*jshint esversion: 6 */ /*jshint esversion: 6 */
const { CPU, OS, Engine } = require('../enums/ua-parser-enums');
const { UAParser } = require('../main/ua-parser'); const { UAParser } = require('../main/ua-parser');
const { CPU, OS, Engine } = require('../enums/ua-parser-enums');
const { isFromEU } = require('detect-europe-js'); const { isFromEU } = require('detect-europe-js');
const { isFrozenUA } = require('ua-is-frozen');
const { isStandalonePWA } = require('is-standalone-pwa');
const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36`).device.vendor; const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36`).device.vendor;
@@ -33,26 +35,17 @@ const isAppleSilicon = (res) => {
return false; return false;
} }
const isBot = (res) => ['cli', 'crawler', 'fetcher', 'module'].includes(res.browser.type);
const isChromeFamily = (res) => res.engine.is(Engine.BLINK); const isChromeFamily = (res) => res.engine.is(Engine.BLINK);
const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js
/ electron\//i.test(navigator?.userAgent)); // browser / electron\//i.test(navigator?.userAgent)); // browser
const isFrozenUA = (ua) => /^Mozilla\/5\.0 \((Windows NT 10\.0; Win64; x64|Macintosh; Intel Mac OS X 10_15_7|X11; Linux x86_64|X11; CrOS x86_64 14541\.0\.0|Fuchsia|Linux; Android 10; K)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/\d+\.0\.0\.0 (Mobile )?Safari\/537\.36/.test(ua);
const isStandalonePWA = () => window && (window.matchMedia('(display-mode: standalone)').matches ||
// iOS
navigator.standalone ||
// Android
document.referrer.startsWith('android-app://') ||
// Windows
window.Windows ||
/trident.+(msapphost|webview)\//i.test(navigator.userAgent) ||
document.referrer.startsWith('app-info://platform/microsoft-store'));
module.exports = { module.exports = {
getDeviceVendor, getDeviceVendor,
isAppleSilicon, isAppleSilicon,
isBot,
isChromeFamily, isChromeFamily,
isElectron, isElectron,
isFromEU, isFromEU,

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.0-rc.1 /* Helpers for UAParser.js v2.0.0-rc.2
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 */
@@ -11,9 +11,11 @@
/*jshint esversion: 6 */ /*jshint esversion: 6 */
import { CPU, OS, Engine } from './enums/ua-parser-enums.mjs'; import { UAParser } from '../main/ua-parser.mjs';
import { UAParser } from './main/ua-parser.mjs'; import { CPU, OS, Engine } from '../enums/ua-parser-enums.mjs';
import { isFromEU } from 'detect-europe-js'; import { isFromEU } from 'detect-europe-js';
import { isFrozenUA } from 'ua-is-frozen';
import { isStandalonePWA } from 'is-standalone-pwa';
const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36`).device.vendor; const getDeviceVendor = (model) => UAParser(`Mozilla/5.0 (Linux; Android 10; ${model}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36`).device.vendor;
@@ -37,26 +39,17 @@ const isAppleSilicon = (res) => {
return false; return false;
} }
const isBot = (res) => ['cli', 'crawler', 'fetcher', 'module'].includes(res.browser.type);
const isChromeFamily = (res) => res.engine.is(Engine.BLINK); const isChromeFamily = (res) => res.engine.is(Engine.BLINK);
const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js
/ electron\//i.test(navigator?.userAgent)); // browser / electron\//i.test(navigator?.userAgent)); // browser
const isFrozenUA = (ua) => /^Mozilla\/5\.0 \((Windows NT 10\.0; Win64; x64|Macintosh; Intel Mac OS X 10_15_7|X11; Linux x86_64|X11; CrOS x86_64 14541\.0\.0|Fuchsia|Linux; Android 10; K)\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/\d+\.0\.0\.0 (Mobile )?Safari\/537\.36/.test(ua);
const isStandalonePWA = () => window && (window.matchMedia('(display-mode: standalone)').matches ||
// iOS
navigator.standalone ||
// Android
document.referrer.startsWith('android-app://') ||
// Windows
window.Windows ||
/trident.+(msapphost|webview)\//i.test(navigator.userAgent) ||
document.referrer.startsWith('app-info://platform/microsoft-store'));
export { export {
getDeviceVendor, getDeviceVendor,
isAppleSilicon, isAppleSilicon,
isBot,
isChromeFamily, isChromeFamily,
isElectron, isElectron,
isFromEU, isFromEU,

View File

@@ -1,4 +1,4 @@
// Type definitions for UAParser.js v2.0.0-beta.3 // Type definitions for UAParser.js v2.0.0-rc.2
// 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,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v2.0.0-rc.1 /* UAParser.js v2.0.0-rc.2
Copyright © 2012-2024 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.
@@ -19,7 +19,7 @@
// Constants // Constants
///////////// /////////////
var LIBVERSION = '2.0.0-rc.1', var LIBVERSION = '2.0.0-rc.2',
EMPTY = '', EMPTY = '',
UNKNOWN = '?', UNKNOWN = '?',
FUNC_TYPE = 'function', FUNC_TYPE = 'function',
@@ -40,6 +40,7 @@
WEARABLE = 'wearable', WEARABLE = 'wearable',
XR = 'xr', XR = 'xr',
EMBEDDED = 'embedded', EMBEDDED = 'embedded',
INAPP = 'inapp',
USER_AGENT = 'user-agent', USER_AGENT = 'user-agent',
UA_MAX_LENGTH = 500, UA_MAX_LENGTH = 500,
BRANDS = 'brands', BRANDS = 'brands',
@@ -320,17 +321,19 @@
// Mixed // Mixed
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i // Baidu /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i // Baidu
], [VERSION, [NAME, 'Baidu']], [ ], [VERSION, [NAME, 'Baidu']], [
/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i // Maxthon
], [VERSION, [NAME, 'Maxthon']], [
/(kindle)\/([\w\.]+)/i, // Kindle /(kindle)\/([\w\.]+)/i, // Kindle
/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,
// Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir // Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir
// Trident based // Trident based
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser /(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
// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon // 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)\/([-\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 // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
/(heytap|ovi)browser\/([\d\.]+)/i, // HeyTap/Ovi /(heytap|ovi|115)browser\/([\d\.]+)/i, // HeyTap/Ovi/115
/(weibo)__([\d\.]+)/i // Weibo /(weibo)__([\d\.]+)/i // Weibo
], [NAME, VERSION], [ ], [NAME, VERSION], [
/quark(?:pc)?\/([-\w\.]+)/i // Quark /quark(?:pc)?\/([-\w\.]+)/i // Quark
@@ -367,31 +370,31 @@
], [VERSION, [NAME, 'MIUI' + SUFFIX_BROWSER]], [ ], [VERSION, [NAME, 'MIUI' + SUFFIX_BROWSER]], [
/fxios\/([\w\.-]+)/i // Firefox for iOS /fxios\/([\w\.-]+)/i // Firefox for iOS
], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [ ], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [
/\bqihu|(qi?ho?o?|360)browser/i // 360 /\bqihoobrowser\/?([\w\.]*)/i // 360
], [[NAME, '360' + SUFFIX_BROWSER]], [ ], [VERSION, [NAME, '360']], [
/\b(qq)\/([\w\.]+)/i // QQ /\b(qq)\/([\w\.]+)/i // QQ
], [[NAME, /(.+)/, '$1Browser'], VERSION], [ ], [[NAME, /(.+)/, '$1Browser'], VERSION], [
/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i /(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser ], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
/samsungbrowser\/([\w\.]+)/i // Samsung Internet /samsungbrowser\/([\w\.]+)/i // Samsung Internet
], [VERSION, [NAME, SAMSUNG + ' Internet']], [ ], [VERSION, [NAME, SAMSUNG + ' Internet']], [
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
], [[NAME, /_/g, ' '], VERSION], [
/metasr[\/ ]?([\d\.]+)/i // Sogou Explorer /metasr[\/ ]?([\d\.]+)/i // Sogou Explorer
], [VERSION, [NAME, SOGOU + ' Explorer']], [ ], [VERSION, [NAME, SOGOU + ' Explorer']], [
/(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile /(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile
], [[NAME, SOGOU + ' Mobile'], VERSION], [ ], [[NAME, SOGOU + ' Mobile'], VERSION], [
/(electron)\/([\w\.]+) safari/i, // Electron-based App /(electron)\/([\w\.]+) safari/i, // Electron-based App
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, // Tesla /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, // Tesla
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/2345 Browser /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i // QQ/2345
], [NAME, VERSION], [ ], [NAME, VERSION], [
/(lbbrowser|rekonq)/i, // LieBao Browser/Rekonq /(lbbrowser|rekonq)/i // LieBao Browser/Rekonq
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
], [NAME], [ ], [NAME], [
/ome\/([\w\.]+) \w* ?(iron) saf/i, // Iron
/ome\/([\w\.]+).+qihu (360)[es]e/i // 360
], [VERSION, NAME], [
// WebView // WebView
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i // Facebook App for iOS & Android /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i // Facebook App for iOS & Android
], [[NAME, FACEBOOK], VERSION], [ ], [[NAME, FACEBOOK], VERSION, [TYPE, INAPP]], [
/(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
@@ -399,12 +402,17 @@
/\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
/(twitter)(?:and| f.+e\/([\w\.]+))/i, // Twitter /(twitter)(?:and| f.+e\/([\w\.]+))/i, // Twitter
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i // Chromium/Instagram/Snapchat /(instagram|snapchat)[\/ ]([-\w\.]+)/i // Instagram/Snapchat
], [NAME, VERSION], [ ], [NAME, VERSION, [TYPE, INAPP]], [
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS /\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
], [VERSION, [NAME, 'GSA']], [ ], [VERSION, [NAME, 'GSA'], [TYPE, INAPP]], [
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i // TikTok /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i // TikTok
], [VERSION, [NAME, 'TikTok']], [ ], [VERSION, [NAME, 'TikTok'], [TYPE, INAPP]], [
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
], [NAME, [TYPE, INAPP]], [
/(chromium)[\/ ]([-\w\.]+)/i // Chromium
], [NAME, VERSION], [
/headlesschrome(?:\/([\w\.]+)| )/i // Chrome Headless /headlesschrome(?:\/([\w\.]+)| )/i // Chrome Headless
], [VERSION, [NAME, CHROME+' Headless']], [ ], [VERSION, [NAME, CHROME+' Headless']], [
@@ -438,7 +446,7 @@
], [[NAME, PREFIX_MOBILE + FIREFOX], VERSION], [ ], [[NAME, PREFIX_MOBILE + FIREFOX], VERSION], [
/(navigator|netscape\d?)\/([-\w\.]+)/i // Netscape /(navigator|netscape\d?)\/([-\w\.]+)/i // Netscape
], [[NAME, 'Netscape'], VERSION], [ ], [[NAME, 'Netscape'], VERSION], [
/(wolvic)\/([\w\.]+)/i // Wolvic /(wolvic|librewolf)\/([\w\.]+)/i // Wolvic/LibreWolf
], [NAME, VERSION], [ ], [NAME, VERSION], [
/mobile vr; rv:([\w\.]+)\).+firefox/i // Firefox Reality /mobile vr; rv:([\w\.]+)\).+firefox/i // Firefox Reality
], [VERSION, [NAME, FIREFOX+' Reality']], [ ], [VERSION, [NAME, FIREFOX+' Reality']], [

View File

@@ -3,7 +3,7 @@
// Source: /src/main/ua-parser.js // Source: /src/main/ua-parser.js
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v2.0.0-rc.1 /* UAParser.js v2.0.0-rc.2
Copyright © 2012-2024 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.
@@ -21,7 +21,7 @@
// Constants // Constants
///////////// /////////////
var LIBVERSION = '2.0.0-rc.1', var LIBVERSION = '2.0.0-rc.2',
EMPTY = '', EMPTY = '',
UNKNOWN = '?', UNKNOWN = '?',
FUNC_TYPE = 'function', FUNC_TYPE = 'function',
@@ -42,6 +42,7 @@
WEARABLE = 'wearable', WEARABLE = 'wearable',
XR = 'xr', XR = 'xr',
EMBEDDED = 'embedded', EMBEDDED = 'embedded',
INAPP = 'inapp',
USER_AGENT = 'user-agent', USER_AGENT = 'user-agent',
UA_MAX_LENGTH = 500, UA_MAX_LENGTH = 500,
BRANDS = 'brands', BRANDS = 'brands',
@@ -322,17 +323,19 @@
// Mixed // Mixed
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i // Baidu /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i // Baidu
], [VERSION, [NAME, 'Baidu']], [ ], [VERSION, [NAME, 'Baidu']], [
/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i // Maxthon
], [VERSION, [NAME, 'Maxthon']], [
/(kindle)\/([\w\.]+)/i, // Kindle /(kindle)\/([\w\.]+)/i, // Kindle
/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,
// Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir // Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir
// Trident based // Trident based
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser /(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
// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon // 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)\/([-\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 // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
/(heytap|ovi)browser\/([\d\.]+)/i, // HeyTap/Ovi /(heytap|ovi|115)browser\/([\d\.]+)/i, // HeyTap/Ovi/115
/(weibo)__([\d\.]+)/i // Weibo /(weibo)__([\d\.]+)/i // Weibo
], [NAME, VERSION], [ ], [NAME, VERSION], [
/quark(?:pc)?\/([-\w\.]+)/i // Quark /quark(?:pc)?\/([-\w\.]+)/i // Quark
@@ -369,31 +372,31 @@
], [VERSION, [NAME, 'MIUI' + SUFFIX_BROWSER]], [ ], [VERSION, [NAME, 'MIUI' + SUFFIX_BROWSER]], [
/fxios\/([\w\.-]+)/i // Firefox for iOS /fxios\/([\w\.-]+)/i // Firefox for iOS
], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [ ], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [
/\bqihu|(qi?ho?o?|360)browser/i // 360 /\bqihoobrowser\/?([\w\.]*)/i // 360
], [[NAME, '360' + SUFFIX_BROWSER]], [ ], [VERSION, [NAME, '360']], [
/\b(qq)\/([\w\.]+)/i // QQ /\b(qq)\/([\w\.]+)/i // QQ
], [[NAME, /(.+)/, '$1Browser'], VERSION], [ ], [[NAME, /(.+)/, '$1Browser'], VERSION], [
/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i /(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser ], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
/samsungbrowser\/([\w\.]+)/i // Samsung Internet /samsungbrowser\/([\w\.]+)/i // Samsung Internet
], [VERSION, [NAME, SAMSUNG + ' Internet']], [ ], [VERSION, [NAME, SAMSUNG + ' Internet']], [
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
], [[NAME, /_/g, ' '], VERSION], [
/metasr[\/ ]?([\d\.]+)/i // Sogou Explorer /metasr[\/ ]?([\d\.]+)/i // Sogou Explorer
], [VERSION, [NAME, SOGOU + ' Explorer']], [ ], [VERSION, [NAME, SOGOU + ' Explorer']], [
/(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile /(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile
], [[NAME, SOGOU + ' Mobile'], VERSION], [ ], [[NAME, SOGOU + ' Mobile'], VERSION], [
/(electron)\/([\w\.]+) safari/i, // Electron-based App /(electron)\/([\w\.]+) safari/i, // Electron-based App
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, // Tesla /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, // Tesla
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/2345 Browser /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i // QQ/2345
], [NAME, VERSION], [ ], [NAME, VERSION], [
/(lbbrowser|rekonq)/i, // LieBao Browser/Rekonq /(lbbrowser|rekonq)/i // LieBao Browser/Rekonq
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
], [NAME], [ ], [NAME], [
/ome\/([\w\.]+) \w* ?(iron) saf/i, // Iron
/ome\/([\w\.]+).+qihu (360)[es]e/i // 360
], [VERSION, NAME], [
// WebView // WebView
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i // Facebook App for iOS & Android /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i // Facebook App for iOS & Android
], [[NAME, FACEBOOK], VERSION], [ ], [[NAME, FACEBOOK], VERSION, [TYPE, INAPP]], [
/(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
@@ -401,12 +404,17 @@
/\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
/(twitter)(?:and| f.+e\/([\w\.]+))/i, // Twitter /(twitter)(?:and| f.+e\/([\w\.]+))/i, // Twitter
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i // Chromium/Instagram/Snapchat /(instagram|snapchat)[\/ ]([-\w\.]+)/i // Instagram/Snapchat
], [NAME, VERSION], [ ], [NAME, VERSION, [TYPE, INAPP]], [
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS /\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
], [VERSION, [NAME, 'GSA']], [ ], [VERSION, [NAME, 'GSA'], [TYPE, INAPP]], [
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i // TikTok /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i // TikTok
], [VERSION, [NAME, 'TikTok']], [ ], [VERSION, [NAME, 'TikTok'], [TYPE, INAPP]], [
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
], [NAME, [TYPE, INAPP]], [
/(chromium)[\/ ]([-\w\.]+)/i // Chromium
], [NAME, VERSION], [
/headlesschrome(?:\/([\w\.]+)| )/i // Chrome Headless /headlesschrome(?:\/([\w\.]+)| )/i // Chrome Headless
], [VERSION, [NAME, CHROME+' Headless']], [ ], [VERSION, [NAME, CHROME+' Headless']], [
@@ -440,7 +448,7 @@
], [[NAME, PREFIX_MOBILE + FIREFOX], VERSION], [ ], [[NAME, PREFIX_MOBILE + FIREFOX], VERSION], [
/(navigator|netscape\d?)\/([-\w\.]+)/i // Netscape /(navigator|netscape\d?)\/([-\w\.]+)/i // Netscape
], [[NAME, 'Netscape'], VERSION], [ ], [[NAME, 'Netscape'], VERSION], [
/(wolvic)\/([\w\.]+)/i // Wolvic /(wolvic|librewolf)\/([\w\.]+)/i // Wolvic/LibreWolf
], [NAME, VERSION], [ ], [NAME, VERSION], [
/mobile vr; rv:([\w\.]+)\).+firefox/i // Firefox Reality /mobile vr; rv:([\w\.]+)\).+firefox/i // Firefox Reality
], [VERSION, [NAME, FIREFOX+' Reality']], [ ], [VERSION, [NAME, FIREFOX+' Reality']], [

View File

@@ -1,6 +1,7 @@
const assert = require('assert'); const assert = require('assert');
const { UAParser } = require('../src/main/ua-parser'); const { UAParser } = require('../src/main/ua-parser');
const { getDeviceVendor, isAppleSilicon, isChromeFamily } = require('../src/helpers/ua-parser-helpers'); const { getDeviceVendor, isAppleSilicon, isBot, isChromeFamily } = require('../src/helpers/ua-parser-helpers');
const { Bots, Emails } = require('../src/extensions/ua-parser-extensions');
describe('getDeviceVendor', () => { describe('getDeviceVendor', () => {
it('Can guess the device vendor from a model name', () => { it('Can guess the device vendor from a model name', () => {
@@ -31,6 +32,23 @@ describe('isAppleSilicon', () => {
}); });
}); });
describe('isBot', () => {
it('Can detect Bots', () => {
// non-real ua
const ahrefsBot = 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)';
const firefox = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0';
const scrapy = 'Scrapy/1.5.0 (+https://scrapy.org)';
const thunderbird = 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0';
const botParser = new UAParser(firefox, { Bots, Emails });
assert.equal(isBot(botParser.getResult()), false);
assert.equal(isBot(botParser.setUA(ahrefsBot).getResult()), true);
assert.equal(isBot(botParser.setUA(scrapy).getResult()), true);
assert.equal(isBot(botParser.setUA(thunderbird).getResult()), false);
});
});
describe('isChromeFamily', () => { describe('isChromeFamily', () => {
it('Can detect Chromium-based browser', () => { it('Can detect Chromium-based browser', () => {

View File

@@ -17,7 +17,7 @@ var methods = [
title : 'getBrowser', title : 'getBrowser',
label : 'browser', label : 'browser',
list : browsers, list : browsers,
properties : ['name', 'major', 'version'] properties : ['name', 'major', 'version', 'type']
}, },
{ {
title : 'getCPU', title : 'getCPU',

View File

@@ -1,12 +1,72 @@
[ [
{
"desc" : "115 Browser",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 115Browser/24.3.0.3",
"expect" :
{
"name" : "115",
"version" : "24.3.0.3",
"major" : "24"
}
},
{
"desc" : "2345 Browser",
"ua" : "Mozilla/5.0 (Linux; Android 7.0; MI NOTE Pro Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36 Mb2345Browser/15.6.2",
"expect" :
{
"name" : "2345",
"version" : "15.6.2",
"major" : "15"
}
},
{
"desc" : "2345 Chrome",
"ua" : "Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML like Gecko) Chrome/39.0.2171.99 Safari/537.36 2345chrome v3.0.0.9739",
"expect" :
{
"name" : "2345",
"version" : "3.0.0.9739",
"major" : "3"
}
},
{
"desc" : "2345 Explorer",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.90 Safari/537.36 2345Explorer/9.2.1.17116",
"expect" :
{
"name" : "2345",
"version" : "9.2.1.17116",
"major" : "9"
}
},
{ {
"desc" : "360 Browser on iOS", "desc" : "360 Browser on iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/607.3.9 (KHTML, like Gecko) Mobile/16G102 QHBrowser/317 QihooBrowser/4.0.10", "ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/607.3.9 (KHTML, like Gecko) Mobile/16G102 QHBrowser/317 QihooBrowser/4.0.10",
"expect" : "expect" :
{ {
"name" : "360 Browser", "name" : "360",
"version" : "undefined", "version" : "4.0.10",
"major" : "undefined" "major" : "4"
}
},
{
"desc" : "360 Secure Browser on Windows 10",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 QIHU 360SE",
"expect" :
{
"name" : "360",
"version" : "86.0.4240.198",
"major" : "86"
}
},
{
"desc" : "360 Speed Browser on Windows 10",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 QIHU 360EE",
"expect" :
{
"name" : "360",
"version" : "86.0.4240.198",
"major" : "86"
} }
}, },
{ {
@@ -16,7 +76,8 @@
{ {
"name" : "Alipay", "name" : "Alipay",
"version" : "10.2.51.7100", "version" : "10.2.51.7100",
"major" : "10" "major" : "10",
"type" : "inapp"
} }
}, },
{ {
@@ -26,7 +87,8 @@
{ {
"name" : "Alipay", "name" : "Alipay",
"version" : "10.3.50.9999", "version" : "10.3.50.9999",
"major" : "10" "major" : "10",
"type" : "inapp"
} }
}, },
{ {
@@ -404,11 +466,21 @@
"ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7", "ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7",
"expect" : "expect" :
{ {
"name" : "Comodo Dragon", "name" : "Dragon",
"version" : "16.1.1.0", "version" : "16.1.1.0",
"major" : "16" "major" : "16"
} }
}, },
{
"desc" : "Comodo Dragon",
"ua" : "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Dragon/98.0.4758.102 Chrome/98.0.4758.102 Safari/537.36",
"expect" :
{
"name" : "Dragon",
"version" : "98.0.4758.102",
"major" : "98"
}
},
{ {
"desc" : "Conkeror", "desc" : "Conkeror",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:6.0.1) Gecko/20110831 conkeror/0.9.3", "ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:6.0.1) Gecko/20110831 conkeror/0.9.3",
@@ -536,7 +608,8 @@
{ {
"name" : "Facebook", "name" : "Facebook",
"version" : "35.0.0.48.273", "version" : "35.0.0.48.273",
"major" : "35" "major" : "35",
"type" : "inapp"
} }
}, },
{ {
@@ -546,7 +619,8 @@
{ {
"name" : "Facebook", "name" : "Facebook",
"version" : "91.0.0.41.73", "version" : "91.0.0.41.73",
"major" : "91" "major" : "91",
"type" : "inapp"
} }
}, },
{ {
@@ -556,7 +630,8 @@
{ {
"name" : "Facebook", "name" : "Facebook",
"version" : "undefined", "version" : "undefined",
"major" : "undefined" "major" : "undefined",
"type" : "inapp"
} }
}, },
{ {
@@ -566,7 +641,8 @@
{ {
"name" : "Klarna", "name" : "Klarna",
"version" : "23.36.223", "version" : "23.36.223",
"major" : "23" "major" : "23",
"type" : "inapp"
} }
}, },
{ {
@@ -576,7 +652,8 @@
{ {
"name" : "Klarna", "name" : "Klarna",
"version" : "23.36.215", "version" : "23.36.215",
"major" : "23" "major" : "23",
"type" : "inapp"
} }
}, },
{ {
@@ -586,7 +663,8 @@
{ {
"name" : "Instagram", "name" : "Instagram",
"version" : "142.0.0.22.109", "version" : "142.0.0.22.109",
"major" : "142" "major" : "142",
"type" : "inapp"
} }
}, },
{ {
@@ -848,6 +926,26 @@
"major" : "22" "major" : "22"
} }
}, },
{
"desc" : "Iron",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Iron Safari/537.36",
"expect" :
{
"name" : "Iron",
"version" : "129.0.0.0",
"major" : "129"
}
},
{
"desc" : "Iron",
"ua" : "Mozilla/5.0 (Linux; Android 11; Pixel 4 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Iron Safari/537.36",
"expect" :
{
"name" : "Iron",
"version" : "113.0.0.0",
"major" : "113"
}
},
{ {
"desc" : "Jasmine", "desc" : "Jasmine",
"ua" : "SAMSUNG-S8000/S8000XXIF3 SHP/VPP/R5 Jasmine/1.0 Nextreaming SMM-MMS/1.2.0 profile/MIDP-2.1 configuration/CLDC-1.1", "ua" : "SAMSUNG-S8000/S8000XXIF3 SHP/VPP/R5 Jasmine/1.0 Nextreaming SMM-MMS/1.2.0 profile/MIDP-2.1 configuration/CLDC-1.1",
@@ -968,6 +1066,26 @@
"major" : "9" "major" : "9"
} }
}, },
{
"desc" : "LibreWolf",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 LibreWolf/91.0",
"expect" :
{
"name" : "LibreWolf",
"version" : "91.0",
"major" : "91"
}
},
{
"desc" : "LibreWolf",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0 LibreWolf/97.0.1",
"expect" :
{
"name" : "LibreWolf",
"version" : "97.0.1",
"major" : "97"
}
},
{ {
"desc" : "LINE on Android", "desc" : "LINE on Android",
"ua" : "Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.81 Mobile Safari/537.36 Line/6.5.1/IAB", "ua" : "Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.81 Mobile Safari/537.36 Line/6.5.1/IAB",
@@ -975,7 +1093,8 @@
{ {
"name" : "Line", "name" : "Line",
"version" : "6.5.1", "version" : "6.5.1",
"major" : "6" "major" : "6",
"type" : "inapp"
} }
}, },
{ {
@@ -985,7 +1104,8 @@
{ {
"name" : "Line", "name" : "Line",
"version" : "8.4.1", "version" : "8.4.1",
"major" : "8" "major" : "8",
"type" : "inapp"
} }
}, },
{ {
@@ -1019,7 +1139,57 @@
} }
}, },
{ {
"desc" : "Maxthon", "desc" : "Maxthon on Android",
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; KFAUWI Build/LVY48F; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.127 Safari/537.36 MxBrowser/4.3.5.2000",
"expect" :
{
"name" : "Maxthon",
"version" : "4.3.5.2000",
"major" : "4"
}
},
{
"desc" : "Maxthon on iOS",
"ua" : "Mozilla/5.0 (iPad; CPU OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/10.0 Mobile/15E148 Safari/602.1 MXiOS/5.4.5.2",
"expect" :
{
"name" : "Maxthon",
"version" : "5.4.5.2",
"major" : "5"
}
},
{
"desc" : "Maxthon on Linux",
"ua" : "Mozilla/5.0 (X11; Linux i686; Ubuntu 14.04.3 LTS) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.0 Maxthon/1.0.5.3 Safari/537.36",
"expect" :
{
"name" : "Maxthon",
"version" : "1.0.5.3",
"major" : "1"
}
},
{
"desc" : "Maxthon on macOS",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6 Maxthon/5.1.102",
"expect" :
{
"name" : "Maxthon",
"version" : "5.1.102",
"major" : "5"
}
},
{
"desc" : "Maxthon on Windows Server 2003",
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; MyIE2; .NET CLR 1.1.4322)",
"expect" :
{
"name" : "Maxthon",
"version" : "undefined",
"major" : "undefined"
}
},
{
"desc" : "Maxthon on Windows XP",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)", "ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)",
"expect" : "expect" :
{ {
@@ -1028,6 +1198,16 @@
"major" : "undefined" "major" : "undefined"
} }
}, },
{
"desc" : "Maxthon on Windows 10",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36 Maxthon/5.2.7.2000",
"expect" :
{
"name" : "Maxthon",
"version" : "5.2.7.2000",
"major" : "5"
}
},
{ {
"desc" : "Midori", "desc" : "Midori",
"ua" : "Midori/0.2.2 (X11; Linux i686; U; en-us) WebKit/531.2+", "ua" : "Midori/0.2.2 (X11; Linux i686; U; en-us) WebKit/531.2+",
@@ -1599,16 +1779,36 @@
"major" : "2" "major" : "2"
} }
}, },
{
"desc" : "SlimBoat",
"ua" : "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/534.34 (KHTML, like Gecko) SlimBoat/1.1.23 Chrome/11.0.696.7 Version/5.1 Safari/534.34",
"expect" :
{
"name" : "SlimBoat",
"version" : "1.1.23",
"major" : "1"
}
},
{ {
"desc" : "SlimBrowser", "desc" : "SlimBrowser",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SlimBrowser)", "ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SlimBrowser)",
"expect" : "expect" :
{ {
"name" : "Slim", "name" : "SlimBrowser",
"version" : "undefined", "version" : "undefined",
"major" : "undefined" "major" : "undefined"
} }
}, },
{
"desc" : "Slimjet",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36 Slimjet/20.0.2.0",
"expect" :
{
"name" : "Slimjet",
"version" : "20.0.2.0",
"major" : "20"
}
},
{ {
"desc" : "Swiftfox", "desc" : "Swiftfox",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)", "ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)",
@@ -2056,7 +2256,8 @@
{ {
"name" : "GSA", "name" : "GSA",
"version" : "30.1.161623614", "version" : "30.1.161623614",
"major" : "30" "major" : "30",
"type" : "inapp"
} }
}, },
{ {
@@ -2087,16 +2288,6 @@
"name" : "LBBROWSER" "name" : "LBBROWSER"
} }
}, },
{
"desc" : "2345 Browser",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.90 Safari/537.36 2345Explorer/9.2.1.17116",
"expect" :
{
"name" : "2345Explorer",
"version" : "9.2.1.17116",
"major" : "9"
}
},
{ {
"desc" : "QQBrowserLite", "desc" : "QQBrowserLite",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14 QQBrowserLite/1.1.0", "ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14 QQBrowserLite/1.1.0",
@@ -2152,7 +2343,8 @@
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [LinkedInApp]", "ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [LinkedInApp]",
"expect" : "expect" :
{ {
"name" : "LinkedIn" "name" : "LinkedIn",
"type" : "inapp"
} }
}, },
{ {
@@ -2257,7 +2449,8 @@
"expect" : { "expect" : {
"name" : "KAKAOTALK", "name" : "KAKAOTALK",
"version": "2409760", "version": "2409760",
"major" : "2409760" "major" : "2409760",
"type" : "inapp"
} }
}, },
{ {
@@ -2266,7 +2459,8 @@
"expect" : { "expect" : {
"name" : "KAKAOSTORY", "name" : "KAKAOSTORY",
"version": "6.8.3_21046", "version": "6.8.3_21046",
"major" : "6" "major" : "6",
"type" : "inapp"
} }
}, },
{ {
@@ -2275,7 +2469,8 @@
"expect" : { "expect" : {
"name" : "KAKAOTALK", "name" : "KAKAOTALK",
"version": "9.7.6", "version": "9.7.6",
"major" : "9" "major" : "9",
"type" : "inapp"
} }
}, },
{ {
@@ -2284,7 +2479,8 @@
"expect" : { "expect" : {
"name" : "NAVER", "name" : "NAVER",
"version": "11.11.2", "version": "11.11.2",
"major" : "11" "major" : "11",
"type" : "inapp"
} }
}, },
{ {
@@ -2293,7 +2489,8 @@
"expect" : { "expect" : {
"name" : "NAVER", "name" : "NAVER",
"version": "10.25.0", "version": "10.25.0",
"major" : "10" "major" : "10",
"type" : "inapp"
} }
}, },
{ {
@@ -2302,7 +2499,8 @@
"expect" : { "expect" : {
"name" : "TikTok", "name" : "TikTok",
"version": "21.9.4", "version": "21.9.4",
"major" : "21" "major" : "21",
"type" : "inapp"
} }
}, },
{ {
@@ -2311,7 +2509,8 @@
"expect" : { "expect" : {
"name" : "TikTok", "name" : "TikTok",
"version": "21.1.0", "version": "21.1.0",
"major" : "21" "major" : "21",
"type" : "inapp"
} }
}, },
{ {
@@ -2320,7 +2519,8 @@
"expect" : { "expect" : {
"name" : "TikTok", "name" : "TikTok",
"version": "28.3.4", "version": "28.3.4",
"major" : "28" "major" : "28",
"type" : "inapp"
} }
}, },
{ {
@@ -2360,7 +2560,8 @@
{ {
"name" : "Snapchat", "name" : "Snapchat",
"version" : "12.33.0.36", "version" : "12.33.0.36",
"major" : "12" "major" : "12",
"type" : "inapp"
} }
}, },
{ {
@@ -2370,7 +2571,8 @@
{ {
"name" : "Twitter", "name" : "Twitter",
"version" : "undefined", "version" : "undefined",
"major" : "undefined" "major" : "undefined",
"type" : "inapp"
} }
}, },
{ {
@@ -2380,7 +2582,8 @@
{ {
"name" : "Twitter", "name" : "Twitter",
"version" : "10.34", "version" : "10.34",
"major" : "10" "major" : "10",
"type" : "inapp"
} }
} }
] ]