mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-16 23:21:52 +03:00
Compare commits
35 Commits
2.0.0-beta
...
2.0.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f02da06e0 | ||
|
|
4d950db145 | ||
|
|
b5b5475ab4 | ||
|
|
7c22bc587f | ||
|
|
d6d8ac7cb4 | ||
|
|
54c633aac5 | ||
|
|
9c5d6ee70e | ||
|
|
b5c62b0c82 | ||
|
|
0c49d75074 | ||
|
|
09904a0a47 | ||
|
|
3622b614a7 | ||
|
|
e4f2463849 | ||
|
|
fdbeabbaed | ||
|
|
2046fe5209 | ||
|
|
5173a5442f | ||
|
|
106d882fba | ||
|
|
7abc8b9ecc | ||
|
|
7ad3e3b451 | ||
|
|
26f7e7d59e | ||
|
|
f8f71c65d4 | ||
|
|
17f0c1e1cd | ||
|
|
9cc274fb6f | ||
|
|
f56073bb3e | ||
|
|
5c10e2b107 | ||
|
|
46ff3df974 | ||
|
|
cfc01470b5 | ||
|
|
d565f65280 | ||
|
|
69ed6cec77 | ||
|
|
b51ae9eb38 | ||
|
|
125f0d9f16 | ||
|
|
e614108911 | ||
|
|
77e0aa1ac6 | ||
|
|
119515edd2 | ||
|
|
c8c6d121e0 | ||
|
|
177a496c34 |
44
CHANGELOG.md
44
CHANGELOG.md
@@ -16,10 +16,54 @@
|
|||||||
- Provided Extensions submodule `'ua-parser-js/extensions'`
|
- Provided Extensions submodule `'ua-parser-js/extensions'`
|
||||||
- Provided Helpers submodule `'ua-parser-js/helpers'`
|
- Provided Helpers submodule `'ua-parser-js/helpers'`
|
||||||
|
|
||||||
|
## Version 2.0.0-beta.2
|
||||||
|
|
||||||
|
- Increase UA_MAX_LENGTH to 500
|
||||||
|
- Add TypeScript declaration file in `ua-parser-js/extensions` submodule
|
||||||
|
- Improve TypeScript module resolution
|
||||||
|
- Add new methods in `ua-parser-js/helpers` submodule: `isAppleSilicon()` & `isChromiumBased()`
|
||||||
|
- Fix misidentified WebView token as device model
|
||||||
|
- Add new browser: Alipay, Klarna, Opera GX, Smart Lenovo Browser, Vivo Browser
|
||||||
|
- Rename browser: Avant, Baidu, Samsung Internet, Sogou Explorer, Sogou Mobile, WeChat
|
||||||
|
- Improve client-hints detection: Edge, Xbox
|
||||||
|
|
||||||
|
## Version 2.0.0-beta.1
|
||||||
|
|
||||||
|
- Update Client Hints Form-Factor
|
||||||
|
- Provide in-package type definitions
|
||||||
|
- Add new device: Ulefone
|
||||||
|
- Improve device detection: Realme, Xiaomi Redmi
|
||||||
|
|
||||||
|
## Version 2.0.0-alpha.3
|
||||||
|
|
||||||
|
- Add `withFeatureCheck()` method
|
||||||
|
- Add `isFrozenUA()` method in `ua-parser-js/helpers` submodule
|
||||||
|
- Add `MediaPlayers` & `Modules` in `ua-parser-js/extensions` submodule
|
||||||
|
- Fix issue with ESM import
|
||||||
|
|
||||||
|
## Version 2.0.0-alpha.2
|
||||||
|
|
||||||
|
- Fix browser result always returning Chromium when using withClientHints()
|
||||||
|
- Fix infinite-loop when await-ing withClientHints() in non-client-hints browser
|
||||||
|
|
||||||
|
## Version 2.0.0-alpha.1
|
||||||
|
|
||||||
|
- Initial work on new major version
|
||||||
|
|
||||||
|
|
||||||
# Version 0.7 / 1.0
|
# Version 0.7 / 1.0
|
||||||
|
|
||||||
Version 1.0.x is basically the equivalent of version 0.7.x. See [#536](https://github.com/faisalman/ua-parser-js/issues/536) for the reason behind this confusion.
|
Version 1.0.x is basically the equivalent of version 0.7.x. See [#536](https://github.com/faisalman/ua-parser-js/issues/536) for the reason behind this confusion.
|
||||||
|
|
||||||
|
## Version 0.7.37
|
||||||
|
|
||||||
|
- Fix misidentified WebView token as device model
|
||||||
|
- Increase UA_MAX_LENGTH to 500
|
||||||
|
- Add new browser: Alipay, Klarna, Smart Lenovo Browser, Vivo Browser
|
||||||
|
- Add new device: Ulefone
|
||||||
|
- Improve device detection: Realme, Xiaomi Redmi
|
||||||
|
- Rename browser: Avant, Baidu, Samsung Internet, Sogou Explorer, Sogou Mobile, WeChat
|
||||||
|
|
||||||
## Version 0.7.36 / 1.0.36
|
## Version 0.7.36 / 1.0.36
|
||||||
- Add new browser: Snapchat
|
- Add new browser: Snapchat
|
||||||
- Add new devices: Infinix, Tecno
|
- Add new devices: Infinix, Tecno
|
||||||
|
|||||||
16
LICENSE.md
16
LICENSE.md
@@ -1,4 +1,4 @@
|
|||||||
# UAPARSER.JS PRO BUSINESS LICENSE
|
# UAPARSER.JS PRO PERSONAL LICENSE
|
||||||
|
|
||||||
Version 1, October 2023
|
Version 1, October 2023
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ Copyright (C) 2023 Faisal Salman <f+ua-parser-js@faisalman.com>
|
|||||||
|
|
||||||
"We" are the team behind UAParser.js.
|
"We" are the team behind UAParser.js.
|
||||||
|
|
||||||
"You" are the individual/organization/company who is responsible for purchasing this license.
|
"You" are the individual who is responsible for purchasing this license.
|
||||||
|
|
||||||
"The Code" is UAParser.js.
|
"The Code" is UAParser.js.
|
||||||
|
|
||||||
@@ -24,17 +24,17 @@ We retains all title, intellectual property, and ownership rights to The Code.
|
|||||||
|
|
||||||
The Code is licensed, not sold, to You for use solely subject to the terms and conditions detailed here.
|
The Code is licensed, not sold, to You for use solely subject to the terms and conditions detailed here.
|
||||||
|
|
||||||
We grant You (and only You) a limited, non-exclusive, non-transferable, non-sublicensable, royalty-free right to use, copy, and modify The Code.
|
We grant you (and only you) a personal, limited, non-exclusive, non-transferable, non-sublicensable, royalty-free right to use, copy, and modify The Code.
|
||||||
|
|
||||||
This license is only valid for You as 1 (one) individual/organization/company and can not be transferred to other individual/organization/company.
|
This license is only valid for You as 1 (one) individual and can not be transferred to other individual or organization.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Rights
|
## Rights
|
||||||
|
|
||||||
You may use and modify The Code only in 1 (one) Project, if you use it in more than 1 (one) Project you have to purchase for another license.
|
You may use and modify The Code to create as many personal, hobby, educational, and other non-profit use as you want for yourself.
|
||||||
|
|
||||||
If You transfer a Project to a client, the use of The Code must be limited to the original functionality that You created for them. The Code must not be extracted, reproduced, or used in any other way. You must inform your client of this condition.
|
You may create any number of copies of The Code for yourself.
|
||||||
|
|
||||||
You have the right to get lifetime updates and a 1 (one) year support, starting from the time you make the purchase.
|
You have the right to get lifetime updates and a 1 (one) year support, starting from the time you make the purchase.
|
||||||
|
|
||||||
@@ -42,7 +42,9 @@ You have the right to get lifetime updates and a 1 (one) year support, starting
|
|||||||
|
|
||||||
## Restriction
|
## Restriction
|
||||||
|
|
||||||
You may not redistribute The Code, as-is or modified, except as a part of a Project that you made.
|
You may not use and modify The Code in such a way that may be used directly for commercial purpose.
|
||||||
|
|
||||||
|
You may not redistribute The Code, as-is or modified, except as a part of a Project that you made for yourself.
|
||||||
|
|
||||||
You may not deliver a Project that contains The Code as an open-source Project that might be used for commercial purpose to the general public, except with our written consent.
|
You may not deliver a Project that contains The Code as an open-source Project that might be used for commercial purpose to the general public, except with our written consent.
|
||||||
|
|
||||||
|
|||||||
22
PULL_REQUEST_TEMPLATE.md
Normal file
22
PULL_REQUEST_TEMPLATE.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Prerequisites
|
||||||
|
|
||||||
|
- [ ] I have read and follow the contributing guidelines
|
||||||
|
- [ ] I have read and accept the [Contributor License Agreement (CLA)](https://gist.github.com/faisalman/2ed16621ebb544157eba85a7f7381417) Document and I hereby sign the CLA
|
||||||
|
|
||||||
|
# Type of Change
|
||||||
|
|
||||||
|
Bug fix, feature, docs update, ...
|
||||||
|
|
||||||
|
# Description
|
||||||
|
|
||||||
|
Please include a summary of the change (current behavior vs new behavior), which issue is fixed (you can also link to an open issue here), and why this change is necessary.
|
||||||
|
|
||||||
|
# Test
|
||||||
|
|
||||||
|
Please describe the tests that you ran to verify your changes.
|
||||||
|
|
||||||
|
# Impact
|
||||||
|
|
||||||
|
Does this PR introduce a breaking change? What changes might users need to make due to this PR?
|
||||||
|
|
||||||
|
# Other Info
|
||||||
@@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
# UAParser.js
|
# UAParser.js
|
||||||
|
|
||||||
Thank you for purchasing UAParser.js PRO Business License, if you haven't please order here: https://store.faisalman.com
|
Thank you for purchasing UAParser.js PRO Personal License, if you haven't please oreder here: https://store.faisalman.com
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install @ua-parser-js/pro-business
|
npm install @ua-parser-js/pro-personal
|
||||||
```
|
```
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
@@ -18,6 +18,6 @@ https://docs.uaparser.js.org/v2
|
|||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
UAParser.js PRO Business
|
UAParser.js PRO Personal
|
||||||
|
|
||||||
Copyright (c) 2012-2023 Faisal Salman <<f@faisalman.com>>
|
Copyright (c) 2012-2023 Faisal Salman <<f@faisalman.com>>
|
||||||
6
dist/ua-parser.min.js
vendored
6
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/ua-parser.pack.js
vendored
6
dist/ua-parser.pack.js
vendored
File diff suppressed because one or more lines are too long
237
package-lock.json
generated
237
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@ua-parser-js/pro-business",
|
"name": "@ua-parser-js/pro-personal",
|
||||||
"version": "2.0.0-beta.1",
|
"version": "2.0.0-beta.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ua-parser-js/pro-business",
|
"name": "@ua-parser-js/pro-personal",
|
||||||
"version": "2.0.0-beta.1",
|
"version": "2.0.0-beta.2",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
"url": "https://github.com/sponsors/faisalman"
|
"url": "https://github.com/sponsors/faisalman"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "UAParser.js-PRO-Business",
|
"license": "UAParser.js-PRO-Personal",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/parser": "7.15.8",
|
"@babel/parser": "7.15.8",
|
||||||
"@babel/traverse": "7.15.4",
|
"@babel/traverse": "7.23.2",
|
||||||
"@jazzer.js/core": "^1.4.0",
|
"@jazzer.js/core": "^1.4.0",
|
||||||
"@playwright/test": "~1.32.2",
|
"@playwright/test": "~1.32.2",
|
||||||
"jshint": "~2.13.6",
|
"jshint": "~2.13.6",
|
||||||
@@ -52,12 +52,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
"version": "7.21.4",
|
"version": "7.22.13",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
|
||||||
"integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==",
|
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/highlight": "^7.18.6"
|
"@babel/highlight": "^7.22.13",
|
||||||
|
"chalk": "^2.4.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@@ -114,34 +115,13 @@
|
|||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/core/node_modules/@babel/traverse": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/code-frame": "^7.21.4",
|
|
||||||
"@babel/generator": "^7.21.4",
|
|
||||||
"@babel/helper-environment-visitor": "^7.18.9",
|
|
||||||
"@babel/helper-function-name": "^7.21.0",
|
|
||||||
"@babel/helper-hoist-variables": "^7.18.6",
|
|
||||||
"@babel/helper-split-export-declaration": "^7.18.6",
|
|
||||||
"@babel/parser": "^7.21.4",
|
|
||||||
"@babel/types": "^7.21.4",
|
|
||||||
"debug": "^4.1.0",
|
|
||||||
"globals": "^11.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@babel/generator": {
|
"node_modules/@babel/generator": {
|
||||||
"version": "7.21.4",
|
"version": "7.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
|
||||||
"integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==",
|
"integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/types": "^7.21.4",
|
"@babel/types": "^7.23.0",
|
||||||
"@jridgewell/gen-mapping": "^0.3.2",
|
"@jridgewell/gen-mapping": "^0.3.2",
|
||||||
"@jridgewell/trace-mapping": "^0.3.17",
|
"@jridgewell/trace-mapping": "^0.3.17",
|
||||||
"jsesc": "^2.5.1"
|
"jsesc": "^2.5.1"
|
||||||
@@ -170,34 +150,34 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-environment-visitor": {
|
"node_modules/@babel/helper-environment-visitor": {
|
||||||
"version": "7.18.9",
|
"version": "7.22.20",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
|
||||||
"integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==",
|
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-function-name": {
|
"node_modules/@babel/helper-function-name": {
|
||||||
"version": "7.21.0",
|
"version": "7.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
|
||||||
"integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==",
|
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/template": "^7.20.7",
|
"@babel/template": "^7.22.15",
|
||||||
"@babel/types": "^7.21.0"
|
"@babel/types": "^7.23.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-hoist-variables": {
|
"node_modules/@babel/helper-hoist-variables": {
|
||||||
"version": "7.18.6",
|
"version": "7.22.5",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
|
||||||
"integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
|
"integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/types": "^7.18.6"
|
"@babel/types": "^7.22.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@@ -234,39 +214,6 @@
|
|||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==",
|
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
|
||||||
"parser": "bin/babel-parser.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/code-frame": "^7.21.4",
|
|
||||||
"@babel/generator": "^7.21.4",
|
|
||||||
"@babel/helper-environment-visitor": "^7.18.9",
|
|
||||||
"@babel/helper-function-name": "^7.21.0",
|
|
||||||
"@babel/helper-hoist-variables": "^7.18.6",
|
|
||||||
"@babel/helper-split-export-declaration": "^7.18.6",
|
|
||||||
"@babel/parser": "^7.21.4",
|
|
||||||
"@babel/types": "^7.21.4",
|
|
||||||
"debug": "^4.1.0",
|
|
||||||
"globals": "^11.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@babel/helper-simple-access": {
|
"node_modules/@babel/helper-simple-access": {
|
||||||
"version": "7.20.2",
|
"version": "7.20.2",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
|
||||||
@@ -280,30 +227,30 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-split-export-declaration": {
|
"node_modules/@babel/helper-split-export-declaration": {
|
||||||
"version": "7.18.6",
|
"version": "7.22.6",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
|
||||||
"integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
|
"integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/types": "^7.18.6"
|
"@babel/types": "^7.22.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-string-parser": {
|
"node_modules/@babel/helper-string-parser": {
|
||||||
"version": "7.19.4",
|
"version": "7.22.5",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
|
||||||
"integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==",
|
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-validator-identifier": {
|
"node_modules/@babel/helper-validator-identifier": {
|
||||||
"version": "7.19.1",
|
"version": "7.22.20",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
|
||||||
"integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
|
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@@ -332,47 +279,14 @@
|
|||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helpers/node_modules/@babel/parser": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==",
|
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
|
||||||
"parser": "bin/babel-parser.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@babel/helpers/node_modules/@babel/traverse": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/code-frame": "^7.21.4",
|
|
||||||
"@babel/generator": "^7.21.4",
|
|
||||||
"@babel/helper-environment-visitor": "^7.18.9",
|
|
||||||
"@babel/helper-function-name": "^7.21.0",
|
|
||||||
"@babel/helper-hoist-variables": "^7.18.6",
|
|
||||||
"@babel/helper-split-export-declaration": "^7.18.6",
|
|
||||||
"@babel/parser": "^7.21.4",
|
|
||||||
"@babel/types": "^7.21.4",
|
|
||||||
"debug": "^4.1.0",
|
|
||||||
"globals": "^11.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@babel/highlight": {
|
"node_modules/@babel/highlight": {
|
||||||
"version": "7.18.6",
|
"version": "7.22.20",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
|
||||||
"integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
|
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-validator-identifier": "^7.18.6",
|
"@babel/helper-validator-identifier": "^7.22.20",
|
||||||
"chalk": "^2.0.0",
|
"chalk": "^2.4.2",
|
||||||
"js-tokens": "^4.0.0"
|
"js-tokens": "^4.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -392,23 +306,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/template": {
|
"node_modules/@babel/template": {
|
||||||
"version": "7.20.7",
|
"version": "7.22.15",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
|
||||||
"integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
|
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.18.6",
|
"@babel/code-frame": "^7.22.13",
|
||||||
"@babel/parser": "^7.20.7",
|
"@babel/parser": "^7.22.15",
|
||||||
"@babel/types": "^7.20.7"
|
"@babel/types": "^7.22.15"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/template/node_modules/@babel/parser": {
|
"node_modules/@babel/template/node_modules/@babel/parser": {
|
||||||
"version": "7.21.4",
|
"version": "7.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
|
||||||
"integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==",
|
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"parser": "bin/babel-parser.js"
|
"parser": "bin/babel-parser.js"
|
||||||
@@ -418,18 +332,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/traverse": {
|
"node_modules/@babel/traverse": {
|
||||||
"version": "7.15.4",
|
"version": "7.23.2",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
|
||||||
"integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==",
|
"integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.14.5",
|
"@babel/code-frame": "^7.22.13",
|
||||||
"@babel/generator": "^7.15.4",
|
"@babel/generator": "^7.23.0",
|
||||||
"@babel/helper-function-name": "^7.15.4",
|
"@babel/helper-environment-visitor": "^7.22.20",
|
||||||
"@babel/helper-hoist-variables": "^7.15.4",
|
"@babel/helper-function-name": "^7.23.0",
|
||||||
"@babel/helper-split-export-declaration": "^7.15.4",
|
"@babel/helper-hoist-variables": "^7.22.5",
|
||||||
"@babel/parser": "^7.15.4",
|
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||||
"@babel/types": "^7.15.4",
|
"@babel/parser": "^7.23.0",
|
||||||
|
"@babel/types": "^7.23.0",
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
"globals": "^11.1.0"
|
"globals": "^11.1.0"
|
||||||
},
|
},
|
||||||
@@ -437,14 +352,26 @@
|
|||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@babel/traverse/node_modules/@babel/parser": {
|
||||||
|
"version": "7.23.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
|
||||||
|
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"parser": "bin/babel-parser.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@babel/types": {
|
"node_modules/@babel/types": {
|
||||||
"version": "7.21.4",
|
"version": "7.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
|
||||||
"integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==",
|
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-string-parser": "^7.19.4",
|
"@babel/helper-string-parser": "^7.22.5",
|
||||||
"@babel/helper-validator-identifier": "^7.19.1",
|
"@babel/helper-validator-identifier": "^7.22.20",
|
||||||
"to-fast-properties": "^2.0.0"
|
"to-fast-properties": "^2.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1021,9 +948,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.3.6",
|
"version": "1.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
|
||||||
"integrity": "sha512-PEcdkk7JcdPiMDkvM4K6ZBRYq9keuVJsToxm2zQIM70Qqo2WHTdJZMXcG9X+RmRp2VPNUQC8W1RAGbgt6b1yMg==",
|
"integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.0",
|
"follow-redirects": "^1.15.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Package.describe({
|
Package.describe({
|
||||||
name: 'faisalman:ua-parser-js',
|
name: 'faisalman:ua-parser-js',
|
||||||
version: '2.0.0-beta.1',
|
version: '2.0.0-beta.2',
|
||||||
summary: 'Lightweight JavaScript-based user-agent string parser',
|
summary: 'Lightweight JavaScript-based user-agent string parser',
|
||||||
git: 'https://github.com/faisalman/ua-parser-js.git',
|
git: 'https://github.com/faisalman/ua-parser-js.git',
|
||||||
documentation: 'readme.md'
|
documentation: 'readme.md'
|
||||||
|
|||||||
23
package.json
Normal file → Executable file
23
package.json
Normal file → Executable file
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "UAParser.js PRO Business",
|
"title": "UAParser.js PRO Personal",
|
||||||
"name": "@ua-parser-js/pro-business",
|
"name": "@ua-parser-js/pro-personal",
|
||||||
"version": "2.0.0-beta.1",
|
"version": "2.0.0-beta.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": [
|
||||||
@@ -174,7 +174,8 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"require": "./src/main/ua-parser.js",
|
"require": "./src/main/ua-parser.js",
|
||||||
"import": "./src/main/ua-parser.mjs"
|
"import": "./src/main/ua-parser.mjs",
|
||||||
|
"types": "./src/main/ua-parser.d.ts"
|
||||||
},
|
},
|
||||||
"./enums": {
|
"./enums": {
|
||||||
"require": "./src/enums/ua-parser-enums.js",
|
"require": "./src/enums/ua-parser-enums.js",
|
||||||
@@ -182,7 +183,13 @@
|
|||||||
},
|
},
|
||||||
"./extensions": {
|
"./extensions": {
|
||||||
"require": "./src/extensions/ua-parser-extensions.js",
|
"require": "./src/extensions/ua-parser-extensions.js",
|
||||||
"import": "./src/extensions/ua-parser-extensions.mjs"
|
"import": "./src/extensions/ua-parser-extensions.mjs",
|
||||||
|
"types": "./src/extensions/ua-parser-extensions.d.ts"
|
||||||
|
},
|
||||||
|
"./helpers": {
|
||||||
|
"require": "./src/helpers/ua-parser-helpers.js",
|
||||||
|
"import": "./src/helpers/ua-parser-helpers.mjs",
|
||||||
|
"types": "./src/helpers/ua-parser-helpers.d.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
@@ -194,7 +201,7 @@
|
|||||||
"build+test": "npm run build && npm run test",
|
"build+test": "npm run build && npm run test",
|
||||||
"fuzz": "jazzer ./test/jazzer-fuzz-test.js --sync",
|
"fuzz": "jazzer ./test/jazzer-fuzz-test.js --sync",
|
||||||
"test": "./script/test-all.sh",
|
"test": "./script/test-all.sh",
|
||||||
"test:dts": "tsd --typings src/main/ua-parser.d.ts --files test/dts-test.ts",
|
"test:dts-lint": "tsd --typings src/main/ua-parser.d.ts --files test/dts-test.ts",
|
||||||
"test:eslint": "eslint src && eslint script",
|
"test:eslint": "eslint src && eslint script",
|
||||||
"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",
|
||||||
@@ -203,7 +210,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/parser": "7.15.8",
|
"@babel/parser": "7.15.8",
|
||||||
"@babel/traverse": "7.15.4",
|
"@babel/traverse": "7.23.2",
|
||||||
"@jazzer.js/core": "^1.4.0",
|
"@jazzer.js/core": "^1.4.0",
|
||||||
"@playwright/test": "~1.32.2",
|
"@playwright/test": "~1.32.2",
|
||||||
"jshint": "~2.13.6",
|
"jshint": "~2.13.6",
|
||||||
@@ -217,7 +224,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/faisalman/ua-parser-js.git"
|
"url": "https://github.com/faisalman/ua-parser-js.git"
|
||||||
},
|
},
|
||||||
"license": "UAParser.js-PRO-Business",
|
"license": "UAParser.js-PRO-Personal",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "*"
|
"node": "*"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,6 +46,12 @@ const modules = [
|
|||||||
dest : 'src/extensions/ua-parser-extensions.mjs',
|
dest : 'src/extensions/ua-parser-extensions.mjs',
|
||||||
title : 'ua-parser-js/extensions',
|
title : 'ua-parser-js/extensions',
|
||||||
replacements : []
|
replacements : []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src : 'src/helpers/ua-parser-helpers.js',
|
||||||
|
dest : 'src/helpers/ua-parser-helpers.mjs',
|
||||||
|
title : 'ua-parser-js/helpers',
|
||||||
|
replacements : []
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -29,4 +29,4 @@ npm run test:lockfile-lint || exit 1
|
|||||||
echo '
|
echo '
|
||||||
- lint d.ts files
|
- lint d.ts files
|
||||||
'
|
'
|
||||||
npm run test:dts || exit 1
|
npm run test:dts-lint || exit 1
|
||||||
@@ -1,35 +1,144 @@
|
|||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
/* Enums for UAParser.js v2.0.0-beta.1
|
/* Enums for UAParser.js v2.0.0-beta.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>
|
||||||
UAParser.js PRO Business License */
|
UAParser.js PRO Personal License */
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
/*jshint esversion: 6 */
|
/*jshint esversion: 6 */
|
||||||
|
|
||||||
const Browser = Object.freeze({
|
const Browser = Object.freeze({
|
||||||
|
_2345_EXPLORER: '2345Explorer',
|
||||||
|
_360: '360 Browser',
|
||||||
|
ALIPAY: 'Alipay',
|
||||||
|
AMAYA: 'Amaya',
|
||||||
ANDROID: 'Android Browser',
|
ANDROID: 'Android Browser',
|
||||||
|
ARORA: 'Arora',
|
||||||
|
AVANT: 'Avant',
|
||||||
|
AVAST: 'Avast Secure Browser',
|
||||||
|
AVG: 'AVG Secure Browser',
|
||||||
|
BAIDU: 'Baidu Browser',
|
||||||
|
BASILISK: 'Basilisk',
|
||||||
|
BLAZER: 'Blazer',
|
||||||
|
BOLT: 'Bolt',
|
||||||
|
BOWSER: 'Bowser',
|
||||||
BRAVE: 'Brave',
|
BRAVE: 'Brave',
|
||||||
|
CAMINO: 'Camino',
|
||||||
|
CHIMERA: 'Chimera',
|
||||||
CHROME: 'Chrome',
|
CHROME: 'Chrome',
|
||||||
|
CHROME_HEADLESS: 'Chrome Headless',
|
||||||
|
CHROME_MOBILE: 'Mobile Chrome',
|
||||||
|
CHROME_WEBVIEW: 'Chrome WebView',
|
||||||
CHROMIUM: 'Chromium',
|
CHROMIUM: 'Chromium',
|
||||||
|
COBALT: 'Cobalt',
|
||||||
|
COC_COC: 'Coc Coc',
|
||||||
|
COMODO_DRAGON: 'Comodo Dragon',
|
||||||
|
CONKEROR: 'Conkeror',
|
||||||
|
DILLO: 'Dillo',
|
||||||
DOLPHIN: 'Dolphin',
|
DOLPHIN: 'Dolphin',
|
||||||
|
DORIS: 'Doris',
|
||||||
DUCKDUCKGO: 'DuckDuckGo',
|
DUCKDUCKGO: 'DuckDuckGo',
|
||||||
EDGE: 'Edge',
|
EDGE: 'Edge',
|
||||||
|
EPIPHANY: 'Epiphany',
|
||||||
|
FACEBOOK: 'Facebook',
|
||||||
|
FALKON: 'Falkon',
|
||||||
|
FIREBIRD: 'Firebird',
|
||||||
FIREFOX: 'Firefox',
|
FIREFOX: 'Firefox',
|
||||||
FOCUS: 'Focus',
|
FIREFOX_FOCUS: 'Firefox Focus',
|
||||||
|
FIREFOX_MOBILE: 'Mobile Firefox',
|
||||||
|
FIREFOX_REALITY: 'Firefox Reality',
|
||||||
|
FENNEC: 'Fennec',
|
||||||
|
FLOCK: 'Flock',
|
||||||
|
FLOW: 'Flow',
|
||||||
|
GO: 'Go Browser',
|
||||||
|
GOOGLE_SEARCH: 'GSA',
|
||||||
|
HEYTAP: 'HeyTap',
|
||||||
|
HUAWEI: 'Huawei Browser',
|
||||||
|
ICAB: 'iCab',
|
||||||
|
ICE: 'ICE Browser',
|
||||||
|
ICEAPE: 'IceApe',
|
||||||
|
ICECAT: 'IceCat',
|
||||||
|
ICEDRAGON: 'IceDragon',
|
||||||
|
ICEWEASEL: 'IceWeasel',
|
||||||
IE: 'IE',
|
IE: 'IE',
|
||||||
|
INSTAGRAM: 'Instagram',
|
||||||
|
IRIDIUM: 'Iridium',
|
||||||
|
IRON: 'Iron',
|
||||||
|
JASMINE: 'Jasmine',
|
||||||
KONQUEROR: 'Konqueror',
|
KONQUEROR: 'Konqueror',
|
||||||
MOBILE_CHROME: 'Mobile Chrome',
|
KAKAO: 'KakaoTalk',
|
||||||
MOBILE_FIREFOX: 'Mobile Firefox',
|
KHTML: 'KHTML',
|
||||||
MOBILE_SAFARI: 'Mobile Safari',
|
K_MELEON: 'K-Meleon',
|
||||||
|
KLAR: 'Klar',
|
||||||
|
KLARNA: 'Klarna',
|
||||||
|
KINDLE: 'Kindle',
|
||||||
|
LENOVO: 'Smart Lenovo Browser',
|
||||||
|
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: 'Opera',
|
||||||
|
OPERA_COAST: 'Opera Coast',
|
||||||
|
OPERA_MINI: 'Opera Mini',
|
||||||
|
OPERA_MOBI: 'Opera Mobi',
|
||||||
|
OPERA_TABLET: 'Opera Tablet',
|
||||||
|
OPERA_TOUCH: 'Opera Touch',
|
||||||
|
OVI: 'OviBrowser',
|
||||||
PALEMOON: 'PaleMoon',
|
PALEMOON: 'PaleMoon',
|
||||||
|
PHANTOMJS: 'PhantomJS',
|
||||||
|
PHOENIX: 'Phoenix',
|
||||||
|
POLARIS: 'Polaris',
|
||||||
PUFFIN: 'Puffin',
|
PUFFIN: 'Puffin',
|
||||||
QQ: 'QQ Browser',
|
QQ: 'QQBrowser',
|
||||||
|
QQ_LITE: 'QQBrowserLite',
|
||||||
|
QUARK: 'Quark',
|
||||||
|
QUPZILLA: 'QupZilla',
|
||||||
|
REKONQ: 'rekonq',
|
||||||
|
ROCKMELT: 'Rockmelt',
|
||||||
SAFARI: 'Safari',
|
SAFARI: 'Safari',
|
||||||
|
SAFARI_MOBILE: 'Mobile Safari',
|
||||||
|
SAILFISH: 'Sailfish Browser',
|
||||||
SAMSUNG: 'Samsung Internet',
|
SAMSUNG: 'Samsung Internet',
|
||||||
UC: 'UC Browser',
|
SEAMONKEY: 'SeaMonkey',
|
||||||
|
SILK: 'Silk',
|
||||||
|
SKYFIRE: 'Skyfire',
|
||||||
|
SLEIPNIR: 'Sleipnir',
|
||||||
|
SLIMBROWSER: 'SlimBrowser',
|
||||||
|
SNAPCHAT: 'Snapchat',
|
||||||
|
SOGOU_EXPLORER: 'Sogou Explorer',
|
||||||
|
SOGOU_MOBILE: 'Sogou Mobile',
|
||||||
|
SWIFTFOX: 'Swiftfox',
|
||||||
|
TESLA: 'Tesla',
|
||||||
|
TIKTOK: 'TikTok',
|
||||||
|
TIZEN: 'Tizen Browser',
|
||||||
|
UC: 'UCBrowser',
|
||||||
|
UP: 'UP.Browser',
|
||||||
|
VIERA: 'Viera',
|
||||||
VIVALDI: 'Vivaldi',
|
VIVALDI: 'Vivaldi',
|
||||||
|
VIVO: 'Vivo Browser',
|
||||||
|
W3M: 'w3m',
|
||||||
|
WATERFOX: 'Waterfox',
|
||||||
|
WEBKIT: 'WebKit',
|
||||||
|
WECHAT: 'WeChat',
|
||||||
|
WEIBO: 'Weibo',
|
||||||
|
WHALE: 'Whale',
|
||||||
YANDEX: 'Yandex'
|
YANDEX: 'Yandex'
|
||||||
|
|
||||||
// TODO : test!
|
// TODO : test!
|
||||||
@@ -37,25 +146,27 @@ const Browser = Object.freeze({
|
|||||||
|
|
||||||
const CPU = Object.freeze({
|
const CPU = Object.freeze({
|
||||||
ARM : 'arm',
|
ARM : 'arm',
|
||||||
ARM64: 'arm64',
|
ARM_64: 'arm64',
|
||||||
ARMHF: 'armhf',
|
ARM_HF: 'armhf',
|
||||||
AVR: 'avr',
|
AVR: 'avr',
|
||||||
|
AVR_32: 'avr32',
|
||||||
IA64: 'ia64',
|
IA64: 'ia64',
|
||||||
IRIX: 'irix',
|
IRIX: 'irix',
|
||||||
IRIX64: 'irix64',
|
IRIX_64: 'irix64',
|
||||||
MIPS: 'mips',
|
MIPS: 'mips',
|
||||||
MIPS64: 'mips64',
|
MIPS_64: 'mips64',
|
||||||
MOTO_68K: '68k',
|
M68K: '68k',
|
||||||
|
PA_RISC: 'pa-risc',
|
||||||
PPC: 'ppc',
|
PPC: 'ppc',
|
||||||
SPARC: 'sparc',
|
SPARC: 'sparc',
|
||||||
SPARC64: 'sparc64',
|
SPARC_64: 'sparc64',
|
||||||
X86: 'ia32',
|
X86: 'ia32',
|
||||||
X86_64: 'amd64'
|
X86_64: 'amd64'
|
||||||
});
|
});
|
||||||
|
|
||||||
const Device = Object.freeze({
|
const Device = Object.freeze({
|
||||||
CONSOLE: 'console',
|
CONSOLE: 'console',
|
||||||
DEKSTOP: 'desktop',
|
DESKTOP: 'desktop',
|
||||||
EMBEDDED: 'embedded',
|
EMBEDDED: 'embedded',
|
||||||
MOBILE: 'mobile',
|
MOBILE: 'mobile',
|
||||||
SMARTTV: 'smarttv',
|
SMARTTV: 'smarttv',
|
||||||
@@ -110,6 +221,7 @@ const Vendor = Object.freeze({
|
|||||||
SIEMENS: 'Siemens',
|
SIEMENS: 'Siemens',
|
||||||
SONY: 'Sony',
|
SONY: 'Sony',
|
||||||
SPRINT: 'Sprint',
|
SPRINT: 'Sprint',
|
||||||
|
TECHNISAT: 'TechniSAT',
|
||||||
TECNO: 'Tecno',
|
TECNO: 'Tecno',
|
||||||
TESLA: 'Tesla',
|
TESLA: 'Tesla',
|
||||||
ULEFONE: 'Ulefone',
|
ULEFONE: 'Ulefone',
|
||||||
@@ -155,14 +267,15 @@ const OS = Object.freeze({
|
|||||||
BLACKBERRY: 'BlackBerry',
|
BLACKBERRY: 'BlackBerry',
|
||||||
CENTOS: 'CentOS',
|
CENTOS: 'CentOS',
|
||||||
CHROME_OS: 'Chrome OS',
|
CHROME_OS: 'Chrome OS',
|
||||||
|
CHROMECAST: 'Chromecast',
|
||||||
CONTIKI: 'Contiki',
|
CONTIKI: 'Contiki',
|
||||||
FEDORA: 'Fedora',
|
|
||||||
FIREFOX_OS: 'Firefox OS',
|
|
||||||
FREEBSD: 'FreeBSD',
|
|
||||||
DEBIAN: 'Debian',
|
DEBIAN: 'Debian',
|
||||||
DEEPIN: 'Deepin',
|
DEEPIN: 'Deepin',
|
||||||
DRAGONFLY: 'DragonFly',
|
DRAGONFLY: 'DragonFly',
|
||||||
ELEMENTARY_OS: 'elementary OS',
|
ELEMENTARY_OS: 'elementary OS',
|
||||||
|
FEDORA: 'Fedora',
|
||||||
|
FIREFOX_OS: 'Firefox OS',
|
||||||
|
FREEBSD: 'FreeBSD',
|
||||||
FUCHSIA: 'Fuchsia',
|
FUCHSIA: 'Fuchsia',
|
||||||
GENTOO: 'Gentoo',
|
GENTOO: 'Gentoo',
|
||||||
GHOSTBSD: 'GhostBSD',
|
GHOSTBSD: 'GhostBSD',
|
||||||
@@ -221,6 +334,7 @@ const OS = Object.freeze({
|
|||||||
WINDOWS: 'Windows',
|
WINDOWS: 'Windows',
|
||||||
WINDOWS_MOBILE: 'Windows Mobile',
|
WINDOWS_MOBILE: 'Windows Mobile',
|
||||||
WINDOWS_PHONE: 'Windows Phone',
|
WINDOWS_PHONE: 'Windows Phone',
|
||||||
|
XBOX: 'Xbox',
|
||||||
ZENWALK: 'Zenwalk'
|
ZENWALK: 'Zenwalk'
|
||||||
|
|
||||||
// TODO : test!
|
// TODO : test!
|
||||||
|
|||||||
@@ -3,37 +3,146 @@
|
|||||||
// Source: /src/enums/ua-parser-enums.js
|
// Source: /src/enums/ua-parser-enums.js
|
||||||
|
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
/* Enums for UAParser.js v2.0.0-beta.1
|
/* Enums for UAParser.js v2.0.0-beta.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>
|
||||||
UAParser.js PRO Business License */
|
UAParser.js PRO Personal License */
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
/*jshint esversion: 6 */
|
/*jshint esversion: 6 */
|
||||||
|
|
||||||
const Browser = Object.freeze({
|
const Browser = Object.freeze({
|
||||||
|
_2345_EXPLORER: '2345Explorer',
|
||||||
|
_360: '360 Browser',
|
||||||
|
ALIPAY: 'Alipay',
|
||||||
|
AMAYA: 'Amaya',
|
||||||
ANDROID: 'Android Browser',
|
ANDROID: 'Android Browser',
|
||||||
|
ARORA: 'Arora',
|
||||||
|
AVANT: 'Avant',
|
||||||
|
AVAST: 'Avast Secure Browser',
|
||||||
|
AVG: 'AVG Secure Browser',
|
||||||
|
BAIDU: 'Baidu Browser',
|
||||||
|
BASILISK: 'Basilisk',
|
||||||
|
BLAZER: 'Blazer',
|
||||||
|
BOLT: 'Bolt',
|
||||||
|
BOWSER: 'Bowser',
|
||||||
BRAVE: 'Brave',
|
BRAVE: 'Brave',
|
||||||
|
CAMINO: 'Camino',
|
||||||
|
CHIMERA: 'Chimera',
|
||||||
CHROME: 'Chrome',
|
CHROME: 'Chrome',
|
||||||
|
CHROME_HEADLESS: 'Chrome Headless',
|
||||||
|
CHROME_MOBILE: 'Mobile Chrome',
|
||||||
|
CHROME_WEBVIEW: 'Chrome WebView',
|
||||||
CHROMIUM: 'Chromium',
|
CHROMIUM: 'Chromium',
|
||||||
|
COBALT: 'Cobalt',
|
||||||
|
COC_COC: 'Coc Coc',
|
||||||
|
COMODO_DRAGON: 'Comodo Dragon',
|
||||||
|
CONKEROR: 'Conkeror',
|
||||||
|
DILLO: 'Dillo',
|
||||||
DOLPHIN: 'Dolphin',
|
DOLPHIN: 'Dolphin',
|
||||||
|
DORIS: 'Doris',
|
||||||
DUCKDUCKGO: 'DuckDuckGo',
|
DUCKDUCKGO: 'DuckDuckGo',
|
||||||
EDGE: 'Edge',
|
EDGE: 'Edge',
|
||||||
|
EPIPHANY: 'Epiphany',
|
||||||
|
FACEBOOK: 'Facebook',
|
||||||
|
FALKON: 'Falkon',
|
||||||
|
FIREBIRD: 'Firebird',
|
||||||
FIREFOX: 'Firefox',
|
FIREFOX: 'Firefox',
|
||||||
FOCUS: 'Focus',
|
FIREFOX_FOCUS: 'Firefox Focus',
|
||||||
|
FIREFOX_MOBILE: 'Mobile Firefox',
|
||||||
|
FIREFOX_REALITY: 'Firefox Reality',
|
||||||
|
FENNEC: 'Fennec',
|
||||||
|
FLOCK: 'Flock',
|
||||||
|
FLOW: 'Flow',
|
||||||
|
GO: 'Go Browser',
|
||||||
|
GOOGLE_SEARCH: 'GSA',
|
||||||
|
HEYTAP: 'HeyTap',
|
||||||
|
HUAWEI: 'Huawei Browser',
|
||||||
|
ICAB: 'iCab',
|
||||||
|
ICE: 'ICE Browser',
|
||||||
|
ICEAPE: 'IceApe',
|
||||||
|
ICECAT: 'IceCat',
|
||||||
|
ICEDRAGON: 'IceDragon',
|
||||||
|
ICEWEASEL: 'IceWeasel',
|
||||||
IE: 'IE',
|
IE: 'IE',
|
||||||
|
INSTAGRAM: 'Instagram',
|
||||||
|
IRIDIUM: 'Iridium',
|
||||||
|
IRON: 'Iron',
|
||||||
|
JASMINE: 'Jasmine',
|
||||||
KONQUEROR: 'Konqueror',
|
KONQUEROR: 'Konqueror',
|
||||||
MOBILE_CHROME: 'Mobile Chrome',
|
KAKAO: 'KakaoTalk',
|
||||||
MOBILE_FIREFOX: 'Mobile Firefox',
|
KHTML: 'KHTML',
|
||||||
MOBILE_SAFARI: 'Mobile Safari',
|
K_MELEON: 'K-Meleon',
|
||||||
|
KLAR: 'Klar',
|
||||||
|
KLARNA: 'Klarna',
|
||||||
|
KINDLE: 'Kindle',
|
||||||
|
LENOVO: 'Smart Lenovo Browser',
|
||||||
|
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: 'Opera',
|
||||||
|
OPERA_COAST: 'Opera Coast',
|
||||||
|
OPERA_MINI: 'Opera Mini',
|
||||||
|
OPERA_MOBI: 'Opera Mobi',
|
||||||
|
OPERA_TABLET: 'Opera Tablet',
|
||||||
|
OPERA_TOUCH: 'Opera Touch',
|
||||||
|
OVI: 'OviBrowser',
|
||||||
PALEMOON: 'PaleMoon',
|
PALEMOON: 'PaleMoon',
|
||||||
|
PHANTOMJS: 'PhantomJS',
|
||||||
|
PHOENIX: 'Phoenix',
|
||||||
|
POLARIS: 'Polaris',
|
||||||
PUFFIN: 'Puffin',
|
PUFFIN: 'Puffin',
|
||||||
QQ: 'QQ Browser',
|
QQ: 'QQBrowser',
|
||||||
|
QQ_LITE: 'QQBrowserLite',
|
||||||
|
QUARK: 'Quark',
|
||||||
|
QUPZILLA: 'QupZilla',
|
||||||
|
REKONQ: 'rekonq',
|
||||||
|
ROCKMELT: 'Rockmelt',
|
||||||
SAFARI: 'Safari',
|
SAFARI: 'Safari',
|
||||||
|
SAFARI_MOBILE: 'Mobile Safari',
|
||||||
|
SAILFISH: 'Sailfish Browser',
|
||||||
SAMSUNG: 'Samsung Internet',
|
SAMSUNG: 'Samsung Internet',
|
||||||
UC: 'UC Browser',
|
SEAMONKEY: 'SeaMonkey',
|
||||||
|
SILK: 'Silk',
|
||||||
|
SKYFIRE: 'Skyfire',
|
||||||
|
SLEIPNIR: 'Sleipnir',
|
||||||
|
SLIMBROWSER: 'SlimBrowser',
|
||||||
|
SNAPCHAT: 'Snapchat',
|
||||||
|
SOGOU_EXPLORER: 'Sogou Explorer',
|
||||||
|
SOGOU_MOBILE: 'Sogou Mobile',
|
||||||
|
SWIFTFOX: 'Swiftfox',
|
||||||
|
TESLA: 'Tesla',
|
||||||
|
TIKTOK: 'TikTok',
|
||||||
|
TIZEN: 'Tizen Browser',
|
||||||
|
UC: 'UCBrowser',
|
||||||
|
UP: 'UP.Browser',
|
||||||
|
VIERA: 'Viera',
|
||||||
VIVALDI: 'Vivaldi',
|
VIVALDI: 'Vivaldi',
|
||||||
|
VIVO: 'Vivo Browser',
|
||||||
|
W3M: 'w3m',
|
||||||
|
WATERFOX: 'Waterfox',
|
||||||
|
WEBKIT: 'WebKit',
|
||||||
|
WECHAT: 'WeChat',
|
||||||
|
WEIBO: 'Weibo',
|
||||||
|
WHALE: 'Whale',
|
||||||
YANDEX: 'Yandex'
|
YANDEX: 'Yandex'
|
||||||
|
|
||||||
// TODO : test!
|
// TODO : test!
|
||||||
@@ -41,25 +150,27 @@ const Browser = Object.freeze({
|
|||||||
|
|
||||||
const CPU = Object.freeze({
|
const CPU = Object.freeze({
|
||||||
ARM : 'arm',
|
ARM : 'arm',
|
||||||
ARM64: 'arm64',
|
ARM_64: 'arm64',
|
||||||
ARMHF: 'armhf',
|
ARM_HF: 'armhf',
|
||||||
AVR: 'avr',
|
AVR: 'avr',
|
||||||
|
AVR_32: 'avr32',
|
||||||
IA64: 'ia64',
|
IA64: 'ia64',
|
||||||
IRIX: 'irix',
|
IRIX: 'irix',
|
||||||
IRIX64: 'irix64',
|
IRIX_64: 'irix64',
|
||||||
MIPS: 'mips',
|
MIPS: 'mips',
|
||||||
MIPS64: 'mips64',
|
MIPS_64: 'mips64',
|
||||||
MOTO_68K: '68k',
|
M68K: '68k',
|
||||||
|
PA_RISC: 'pa-risc',
|
||||||
PPC: 'ppc',
|
PPC: 'ppc',
|
||||||
SPARC: 'sparc',
|
SPARC: 'sparc',
|
||||||
SPARC64: 'sparc64',
|
SPARC_64: 'sparc64',
|
||||||
X86: 'ia32',
|
X86: 'ia32',
|
||||||
X86_64: 'amd64'
|
X86_64: 'amd64'
|
||||||
});
|
});
|
||||||
|
|
||||||
const Device = Object.freeze({
|
const Device = Object.freeze({
|
||||||
CONSOLE: 'console',
|
CONSOLE: 'console',
|
||||||
DEKSTOP: 'desktop',
|
DESKTOP: 'desktop',
|
||||||
EMBEDDED: 'embedded',
|
EMBEDDED: 'embedded',
|
||||||
MOBILE: 'mobile',
|
MOBILE: 'mobile',
|
||||||
SMARTTV: 'smarttv',
|
SMARTTV: 'smarttv',
|
||||||
@@ -114,6 +225,7 @@ const Vendor = Object.freeze({
|
|||||||
SIEMENS: 'Siemens',
|
SIEMENS: 'Siemens',
|
||||||
SONY: 'Sony',
|
SONY: 'Sony',
|
||||||
SPRINT: 'Sprint',
|
SPRINT: 'Sprint',
|
||||||
|
TECHNISAT: 'TechniSAT',
|
||||||
TECNO: 'Tecno',
|
TECNO: 'Tecno',
|
||||||
TESLA: 'Tesla',
|
TESLA: 'Tesla',
|
||||||
ULEFONE: 'Ulefone',
|
ULEFONE: 'Ulefone',
|
||||||
@@ -159,14 +271,15 @@ const OS = Object.freeze({
|
|||||||
BLACKBERRY: 'BlackBerry',
|
BLACKBERRY: 'BlackBerry',
|
||||||
CENTOS: 'CentOS',
|
CENTOS: 'CentOS',
|
||||||
CHROME_OS: 'Chrome OS',
|
CHROME_OS: 'Chrome OS',
|
||||||
|
CHROMECAST: 'Chromecast',
|
||||||
CONTIKI: 'Contiki',
|
CONTIKI: 'Contiki',
|
||||||
FEDORA: 'Fedora',
|
|
||||||
FIREFOX_OS: 'Firefox OS',
|
|
||||||
FREEBSD: 'FreeBSD',
|
|
||||||
DEBIAN: 'Debian',
|
DEBIAN: 'Debian',
|
||||||
DEEPIN: 'Deepin',
|
DEEPIN: 'Deepin',
|
||||||
DRAGONFLY: 'DragonFly',
|
DRAGONFLY: 'DragonFly',
|
||||||
ELEMENTARY_OS: 'elementary OS',
|
ELEMENTARY_OS: 'elementary OS',
|
||||||
|
FEDORA: 'Fedora',
|
||||||
|
FIREFOX_OS: 'Firefox OS',
|
||||||
|
FREEBSD: 'FreeBSD',
|
||||||
FUCHSIA: 'Fuchsia',
|
FUCHSIA: 'Fuchsia',
|
||||||
GENTOO: 'Gentoo',
|
GENTOO: 'Gentoo',
|
||||||
GHOSTBSD: 'GhostBSD',
|
GHOSTBSD: 'GhostBSD',
|
||||||
@@ -225,6 +338,7 @@ const OS = Object.freeze({
|
|||||||
WINDOWS: 'Windows',
|
WINDOWS: 'Windows',
|
||||||
WINDOWS_MOBILE: 'Windows Mobile',
|
WINDOWS_MOBILE: 'Windows Mobile',
|
||||||
WINDOWS_PHONE: 'Windows Phone',
|
WINDOWS_PHONE: 'Windows Phone',
|
||||||
|
XBOX: 'Xbox',
|
||||||
ZENWALK: 'Zenwalk'
|
ZENWALK: 'Zenwalk'
|
||||||
|
|
||||||
// TODO : test!
|
// TODO : test!
|
||||||
|
|||||||
13
src/extensions/ua-parser-extensions.d.ts
vendored
Normal file
13
src/extensions/ua-parser-extensions.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// Type definitions for Helpers submodule of UAParser.js v2.0.0-beta.2
|
||||||
|
// Project: https://github.com/faisalman/ua-parser-js
|
||||||
|
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||||
|
|
||||||
|
import type { UAParserExt } from "../main/ua-parser";
|
||||||
|
|
||||||
|
export const Apps: UAParserExt;
|
||||||
|
export const Bots: UAParserExt;
|
||||||
|
export const CLIs: UAParserExt;
|
||||||
|
export const ExtraDevices: UAParserExt;
|
||||||
|
export const Emails: UAParserExt;
|
||||||
|
export const MediaPlayers: UAParserExt;
|
||||||
|
export const Modules: UAParserExt;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
/* Extensions for UAParser.js v2.0.0-beta.1
|
/* Extensions for UAParser.js v2.0.0-beta.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>
|
||||||
UAParser.js PRO Business License */
|
UAParser.js PRO Personal License */
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
/*jshint esversion: 6 */
|
/*jshint esversion: 6 */
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
// Source: /src/extensions/ua-parser-extensions.js
|
// Source: /src/extensions/ua-parser-extensions.js
|
||||||
|
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
/* Extensions for UAParser.js v2.0.0-beta.1
|
/* Extensions for UAParser.js v2.0.0-beta.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>
|
||||||
UAParser.js PRO Business License */
|
UAParser.js PRO Personal License */
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
/*jshint esversion: 6 */
|
/*jshint esversion: 6 */
|
||||||
|
|||||||
15
src/helpers/ua-parser-helpers.d.ts
vendored
Normal file
15
src/helpers/ua-parser-helpers.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// Type definitions for Helpers submodule of UAParser.js v2.0.0-beta.2
|
||||||
|
// Project: https://github.com/faisalman/ua-parser-js
|
||||||
|
// Definitions by: Faisal Salman <https://github.com/faisalman>
|
||||||
|
|
||||||
|
import { IResult } from "../main/ua-parser";
|
||||||
|
|
||||||
|
declare function isAppleSilicon(res: IResult): boolean;
|
||||||
|
declare function isChromiumBased(res: IResult): boolean;
|
||||||
|
declare function isFrozenUA(ua: string): boolean;
|
||||||
|
|
||||||
|
export {
|
||||||
|
isAppleSilicon,
|
||||||
|
isChromiumBased,
|
||||||
|
isFrozenUA
|
||||||
|
}
|
||||||
22
src/helpers/ua-parser-helpers.js
Normal file
22
src/helpers/ua-parser-helpers.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
///////////////////////////////////////////////
|
||||||
|
/* Helpers for UAParser.js v2.0.0-beta.2
|
||||||
|
https://github.com/faisalman/ua-parser-js
|
||||||
|
Author: Faisal Salman <f@faisalman.com>
|
||||||
|
AGPLv3 License */
|
||||||
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
|
/*jshint esversion: 6 */
|
||||||
|
|
||||||
|
const { CPU, OS, Engine } = require('../enums/ua-parser-enums');
|
||||||
|
|
||||||
|
const isAppleSilicon = (res) => res.os.is(OS.MACOS) && res.cpu.is(CPU.ARM);
|
||||||
|
|
||||||
|
const isChromiumBased = (res) => res.engine.is(Engine.BLINK);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
isAppleSilicon,
|
||||||
|
isChromiumBased,
|
||||||
|
isFrozenUA
|
||||||
|
}
|
||||||
26
src/helpers/ua-parser-helpers.mjs
Normal file
26
src/helpers/ua-parser-helpers.mjs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// Generated ESM version of ua-parser-js/helpers
|
||||||
|
// DO NOT EDIT THIS FILE!
|
||||||
|
// Source: /src/helpers/ua-parser-helpers.js
|
||||||
|
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
/* Helpers for UAParser.js v2.0.0-beta.2
|
||||||
|
https://github.com/faisalman/ua-parser-js
|
||||||
|
Author: Faisal Salman <f@faisalman.com>
|
||||||
|
AGPLv3 License */
|
||||||
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
|
/*jshint esversion: 6 */
|
||||||
|
|
||||||
|
import { CPU, OS, Engine } from '../enums/ua-parser-enums';
|
||||||
|
|
||||||
|
const isAppleSilicon = (res) => res.os.is(OS.MACOS) && res.cpu.is(CPU.ARM);
|
||||||
|
|
||||||
|
const isChromiumBased = (res) => res.engine.is(Engine.BLINK);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
export {
|
||||||
|
isAppleSilicon,
|
||||||
|
isChromiumBased,
|
||||||
|
isFrozenUA
|
||||||
|
}
|
||||||
12
src/main/ua-parser.d.ts
vendored
12
src/main/ua-parser.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
// Type definitions for UAParser.js v2.0.0-beta.1
|
// Type definitions for UAParser.js v2.0.0-beta.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>
|
||||||
|
|
||||||
@@ -47,10 +47,12 @@ declare namespace UAParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RegexMap = ((RegExp | string | (string | RegExp | Function)[])[])[];
|
type RegexMap = ((RegExp | string | (string | RegExp | Function)[])[])[];
|
||||||
|
type UAParserProps = 'browser' | 'cpu' | 'device' | 'engine' | 'os';
|
||||||
|
type UAParserExt = Partial<Record<UAParserProps, RegexMap>>;
|
||||||
|
|
||||||
export function UAParser(uastring?: string, extensions?: Record<string, RegexMap>, headers?: Record<string, string>): IResult;
|
export function UAParser(uastring?: string, extensions?: UAParserExt, headers?: Record<string, string>): IResult;
|
||||||
export function UAParser(uastring?: string, headers?: Record<string, string>): IResult;
|
export function UAParser(uastring?: string, headers?: Record<string, string>): IResult;
|
||||||
export function UAParser(extensions?: Record<string, RegexMap>, headers?: Record<string, string>): IResult;
|
export function UAParser(extensions?: UAParserExt, headers?: Record<string, string>): IResult;
|
||||||
export function UAParser(headers?: Record<string, string>): IResult;
|
export function UAParser(headers?: Record<string, string>): IResult;
|
||||||
|
|
||||||
export class UAParser {
|
export class UAParser {
|
||||||
@@ -84,9 +86,9 @@ declare namespace UAParser {
|
|||||||
};
|
};
|
||||||
static readonly VERSION: string;
|
static readonly VERSION: string;
|
||||||
|
|
||||||
constructor(uastring?: string, extensions?: Record<string, RegexMap>, headers?: Record<string, string>);
|
constructor(uastring?: string, extensions?: UAParserExt, headers?: Record<string, string>);
|
||||||
constructor(uastring?: string, headers?: Record<string, string>);
|
constructor(uastring?: string, headers?: Record<string, string>);
|
||||||
constructor(extensions?: Record<string, RegexMap>, headers?: Record<string, string>);
|
constructor(extensions?: UAParserExt, headers?: Record<string, string>);
|
||||||
constructor(headers?: Record<string, string>);
|
constructor(headers?: Record<string, string>);
|
||||||
|
|
||||||
getUA(): string;
|
getUA(): string;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
/* UAParser.js v2.0.0-beta.1
|
/* UAParser.js v2.0.0-beta.2
|
||||||
Copyright © 2012-2023 Faisal Salman <f@faisalman.com>
|
Copyright © 2012-2023 Faisal Salman <f@faisalman.com>
|
||||||
UAParser.js PRO Business License *//*
|
UAParser.js PRO Personal 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.
|
||||||
Demo : https://faisalman.github.io/ua-parser-js
|
Demo : https://faisalman.github.io/ua-parser-js
|
||||||
@@ -19,8 +19,7 @@
|
|||||||
// Constants
|
// Constants
|
||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
|
var LIBVERSION = '2.0.0-beta.2',
|
||||||
var LIBVERSION = '2.0.0-beta.1',
|
|
||||||
EMPTY = '',
|
EMPTY = '',
|
||||||
UNKNOWN = '?',
|
UNKNOWN = '?',
|
||||||
FUNC_TYPE = 'function',
|
FUNC_TYPE = 'function',
|
||||||
@@ -41,7 +40,7 @@
|
|||||||
WEARABLE = 'wearable',
|
WEARABLE = 'wearable',
|
||||||
EMBEDDED = 'embedded',
|
EMBEDDED = 'embedded',
|
||||||
USER_AGENT = 'user-agent',
|
USER_AGENT = 'user-agent',
|
||||||
UA_MAX_LENGTH = 350,
|
UA_MAX_LENGTH = 500,
|
||||||
BRANDS = 'brands',
|
BRANDS = 'brands',
|
||||||
FORMFACTOR = 'formFactor',
|
FORMFACTOR = 'formFactor',
|
||||||
FULLVERLIST = 'fullVersionList',
|
FULLVERLIST = 'fullVersionList',
|
||||||
@@ -70,6 +69,7 @@
|
|||||||
BLACKBERRY = 'BlackBerry',
|
BLACKBERRY = 'BlackBerry',
|
||||||
GOOGLE = 'Google',
|
GOOGLE = 'Google',
|
||||||
HUAWEI = 'Huawei',
|
HUAWEI = 'Huawei',
|
||||||
|
LENOVO = 'Lenovo',
|
||||||
LG = 'LG',
|
LG = 'LG',
|
||||||
MICROSOFT = 'Microsoft',
|
MICROSOFT = 'Microsoft',
|
||||||
MOTOROLA = 'Motorola',
|
MOTOROLA = 'Motorola',
|
||||||
@@ -85,9 +85,11 @@
|
|||||||
FIREFOX = 'Firefox',
|
FIREFOX = 'Firefox',
|
||||||
OPERA = 'Opera',
|
OPERA = 'Opera',
|
||||||
FACEBOOK = 'Facebook',
|
FACEBOOK = 'Facebook',
|
||||||
|
SOGOU = 'Sogou',
|
||||||
WINDOWS = 'Windows';
|
WINDOWS = 'Windows';
|
||||||
|
|
||||||
var NAVIGATOR = (typeof window !== UNDEF_TYPE && window.navigator) ?
|
var isWindow = typeof window !== UNDEF_TYPE,
|
||||||
|
NAVIGATOR = (isWindow && window.navigator) ?
|
||||||
window.navigator :
|
window.navigator :
|
||||||
undefined,
|
undefined,
|
||||||
NAVIGATOR_UADATA = (NAVIGATOR && NAVIGATOR.userAgentData) ?
|
NAVIGATOR_UADATA = (NAVIGATOR && NAVIGATOR.userAgentData) ?
|
||||||
@@ -119,13 +121,16 @@
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
return isString(str1) ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
||||||
},
|
},
|
||||||
isExtensions = function (obj) {
|
isExtensions = function (obj) {
|
||||||
for (var prop in obj) {
|
for (var prop in obj) {
|
||||||
return /^(browser|cpu|device|engine|os)$/.test(prop);
|
return /^(browser|cpu|device|engine|os)$/.test(prop);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isString = function (val) {
|
||||||
|
return typeof val === STR_TYPE;
|
||||||
|
},
|
||||||
itemListToArray = function (header) {
|
itemListToArray = function (header) {
|
||||||
if (!header) return undefined;
|
if (!header) return undefined;
|
||||||
var arr = [];
|
var arr = [];
|
||||||
@@ -135,16 +140,16 @@
|
|||||||
var token = trim(tokens[i]).split(';v=');
|
var token = trim(tokens[i]).split(';v=');
|
||||||
arr[i] = { brand : token[0], version : token[1] };
|
arr[i] = { brand : token[0], version : token[1] };
|
||||||
} else {
|
} else {
|
||||||
arr[i] = tokens[i];
|
arr[i] = trim(tokens[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
},
|
},
|
||||||
lowerize = function (str) {
|
lowerize = function (str) {
|
||||||
return typeof(str) === STR_TYPE ? str.toLowerCase() : str;
|
return isString(str) ? str.toLowerCase() : str;
|
||||||
},
|
},
|
||||||
majorize = function (version) {
|
majorize = function (version) {
|
||||||
return typeof(version) === STR_TYPE ? strip(/[^\d\.]/g, version).split('.')[0] : undefined;
|
return isString(version) ? strip(/[^\d\.]/g, version).split('.')[0] : undefined;
|
||||||
},
|
},
|
||||||
setProps = function (arr) {
|
setProps = function (arr) {
|
||||||
for (var i in arr) {
|
for (var i in arr) {
|
||||||
@@ -158,15 +163,15 @@
|
|||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
strip = function (pattern, str) {
|
strip = function (pattern, str) {
|
||||||
return str.replace(pattern, EMPTY);
|
return isString(str) ? str.replace(pattern, EMPTY) : str;
|
||||||
},
|
},
|
||||||
stripQuotes = function (val) {
|
stripQuotes = function (str) {
|
||||||
return typeof val === STR_TYPE ? strip(/\\?\"/g, val) : val;
|
return strip(/\\?\"/g, str);
|
||||||
},
|
},
|
||||||
trim = function (str, len) {
|
trim = function (str, len) {
|
||||||
if (typeof(str) === STR_TYPE) {
|
if (isString(str)) {
|
||||||
str = strip(/^\s\s*/, str);
|
str = strip(/^\s\s*/, str);
|
||||||
return typeof(len) === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
|
return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -295,15 +300,18 @@
|
|||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/opios[\/ ]+([\w\.]+)/i // Opera mini on iphone >= 8.0
|
/opios[\/ ]+([\w\.]+)/i // Opera mini on iphone >= 8.0
|
||||||
], [VERSION, [NAME, OPERA+' Mini']], [
|
], [VERSION, [NAME, OPERA+' Mini']], [
|
||||||
|
/\bop(?:rg)?x\/([\w\.]+)/i // Opera GX
|
||||||
|
], [VERSION, [NAME, OPERA+' GX']], [
|
||||||
/\bopr\/([\w\.]+)/i // Opera Webkit
|
/\bopr\/([\w\.]+)/i // Opera Webkit
|
||||||
], [VERSION, [NAME, OPERA]], [
|
], [VERSION, [NAME, OPERA]], [
|
||||||
|
|
||||||
// Mixed
|
// Mixed
|
||||||
|
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i // Baidu
|
||||||
|
], [VERSION, [NAME, 'Baidu']], [
|
||||||
/(kindle)\/([\w\.]+)/i, // Kindle
|
/(kindle)\/([\w\.]+)/i, // Kindle
|
||||||
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
|
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
|
||||||
// Trident based
|
// Trident based
|
||||||
/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
|
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
|
||||||
/(ba?idubrowser)[\/ ]?([\w\.]+)/i, // Baidu Browser
|
|
||||||
/(?: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
|
// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
|
||||||
@@ -315,8 +323,7 @@
|
|||||||
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i // UCBrowser
|
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i // UCBrowser
|
||||||
], [VERSION, [NAME, 'UCBrowser']], [
|
], [VERSION, [NAME, 'UCBrowser']], [
|
||||||
/microm.+\bqbcore\/([\w\.]+)/i, // WeChat Desktop for Windows Built-in Browser
|
/microm.+\bqbcore\/([\w\.]+)/i, // WeChat Desktop for Windows Built-in Browser
|
||||||
/\bqbcore\/([\w\.]+).+microm/i
|
/\bqbcore\/([\w\.]+).+microm/i,
|
||||||
], [VERSION, [NAME, 'WeChat(Win) Desktop']], [
|
|
||||||
/micromessenger\/([\w\.]+)/i // WeChat
|
/micromessenger\/([\w\.]+)/i // WeChat
|
||||||
], [VERSION, [NAME, 'WeChat']], [
|
], [VERSION, [NAME, 'WeChat']], [
|
||||||
/konqueror\/([\w\.]+)/i // Konqueror
|
/konqueror\/([\w\.]+)/i // Konqueror
|
||||||
@@ -325,6 +332,8 @@
|
|||||||
], [VERSION, [NAME, 'IE']], [
|
], [VERSION, [NAME, 'IE']], [
|
||||||
/ya(?:search)?browser\/([\w\.]+)/i // Yandex
|
/ya(?:search)?browser\/([\w\.]+)/i // Yandex
|
||||||
], [VERSION, [NAME, 'Yandex']], [
|
], [VERSION, [NAME, 'Yandex']], [
|
||||||
|
/slbrowser\/([\w\.]+)/i // Smart Lenovo Browser
|
||||||
|
], [VERSION, [NAME, 'Smart ' + LENOVO + SUFFIX_BROWSER]], [
|
||||||
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
|
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
|
||||||
], [[NAME, /(.+)/, '$1 Secure' + SUFFIX_BROWSER], VERSION], [
|
], [[NAME, /(.+)/, '$1 Secure' + SUFFIX_BROWSER], VERSION], [
|
||||||
/\bfocus\/([\w\.]+)/i // Firefox Focus
|
/\bfocus\/([\w\.]+)/i // Firefox Focus
|
||||||
@@ -343,15 +352,20 @@
|
|||||||
], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [
|
], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [
|
||||||
/\bqihu|(qi?ho?o?|360)browser/i // 360
|
/\bqihu|(qi?ho?o?|360)browser/i // 360
|
||||||
], [[NAME, '360' + SUFFIX_BROWSER]], [
|
], [[NAME, '360' + SUFFIX_BROWSER]], [
|
||||||
/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i
|
/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
|
||||||
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/Huawei Browser
|
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
|
||||||
|
/samsungbrowser\/([\w\.]+)/i // Samsung Internet
|
||||||
|
], [VERSION, [NAME, SAMSUNG + ' Internet']], [
|
||||||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
||||||
], [[NAME, /_/g, ' '], VERSION], [
|
], [[NAME, /_/g, ' '], VERSION], [
|
||||||
|
/metasr[\/ ]?([\d\.]+)/i // Sogou Explorer
|
||||||
|
], [VERSION, [NAME, SOGOU + ' Explorer']], [
|
||||||
|
/(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile
|
||||||
|
], [[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|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/Baidu App/2345 Browser
|
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/2345 Browser
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/(metasr)[\/ ]?([\w\.]+)/i, // SouGouBrowser
|
|
||||||
/(lbbrowser)/i, // LieBao Browser
|
/(lbbrowser)/i, // LieBao Browser
|
||||||
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
|
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
|
||||||
], [NAME], [
|
], [NAME], [
|
||||||
@@ -359,10 +373,12 @@
|
|||||||
// 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], [
|
||||||
|
/(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
|
||||||
/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
|
||||||
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i // Chromium/Instagram/Snapchat
|
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i // Chromium/Instagram/Snapchat
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
|
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
|
||||||
@@ -494,7 +510,7 @@
|
|||||||
/\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|\))/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)?)(?: bui|\))/i // Xiaomi Mi
|
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i // Xiaomi Mi
|
||||||
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
|
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
|
||||||
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, // Redmi Pad
|
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, // Redmi Pad
|
||||||
@@ -534,7 +550,7 @@
|
|||||||
// Lenovo
|
// Lenovo
|
||||||
/(ideatab[-\w ]+)/i,
|
/(ideatab[-\w ]+)/i,
|
||||||
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/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
|
||||||
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
||||||
@@ -708,7 +724,7 @@
|
|||||||
// MIXED (GENERIC)
|
// MIXED (GENERIC)
|
||||||
///////////////////
|
///////////////////
|
||||||
|
|
||||||
/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
|
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
|
||||||
], [MODEL, [TYPE, MOBILE]], [
|
], [MODEL, [TYPE, MOBILE]], [
|
||||||
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
|
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
|
||||||
], [MODEL, [TYPE, TABLET]], [
|
], [MODEL, [TYPE, TABLET]], [
|
||||||
@@ -745,12 +761,12 @@
|
|||||||
// Windows
|
// Windows
|
||||||
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
|
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/(windows) nt 6\.2; (arm)/i, // Windows RT
|
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i // Windows Phone
|
||||||
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, // Windows Phone
|
|
||||||
/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i
|
|
||||||
], [NAME, [VERSION, strMapper, windowsVersionMap]], [
|
], [NAME, [VERSION, strMapper, windowsVersionMap]], [
|
||||||
/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
/windows nt 6\.2; (arm)/i, // Windows RT
|
||||||
], [[NAME, WINDOWS], [VERSION, strMapper, windowsVersionMap]], [
|
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
||||||
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
||||||
|
], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [
|
||||||
|
|
||||||
// iOS/macOS
|
// iOS/macOS
|
||||||
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
||||||
@@ -1039,15 +1055,16 @@
|
|||||||
|
|
||||||
switch (this.itemType) {
|
switch (this.itemType) {
|
||||||
case UA_BROWSER:
|
case UA_BROWSER:
|
||||||
var brands = uaCH[FULLVERLIST] || uaCH[BRANDS];
|
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,
|
var brandName = strip(/(Google|Microsoft) /, brands[i].brand || brands[i]),
|
||||||
brandVersion = brands[i].version;
|
brandVersion = brands[i].version;
|
||||||
if (!/not.a.brand/i.test(brandName) && (i < 1 || /chromi/i.test(this.get(NAME)))) {
|
if (!/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && !/chromi/i.test(brandName)))) {
|
||||||
this.set(NAME, strip(GOOGLE+' ', brandName))
|
this.set(NAME, brandName)
|
||||||
.set(VERSION, brandVersion)
|
.set(VERSION, brandVersion)
|
||||||
.set(MAJOR, majorize(brandVersion));
|
.set(MAJOR, majorize(brandVersion));
|
||||||
|
prevName = brandName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1066,6 +1083,11 @@
|
|||||||
if (uaCH[MODEL]) {
|
if (uaCH[MODEL]) {
|
||||||
this.set(MODEL, uaCH[MODEL]);
|
this.set(MODEL, uaCH[MODEL]);
|
||||||
}
|
}
|
||||||
|
// Xbox-Specific Detection
|
||||||
|
if (uaCH[MODEL] == 'Xbox') {
|
||||||
|
this.set(TYPE, CONSOLE)
|
||||||
|
.set(VENDOR, MICROSOFT);
|
||||||
|
}
|
||||||
if (uaCH[FORMFACTOR]) {
|
if (uaCH[FORMFACTOR]) {
|
||||||
var ff;
|
var ff;
|
||||||
if (typeof uaCH[FORMFACTOR] !== 'string') {
|
if (typeof uaCH[FORMFACTOR] !== 'string') {
|
||||||
@@ -1087,6 +1109,11 @@
|
|||||||
this.set(NAME, osName)
|
this.set(NAME, osName)
|
||||||
.set(VERSION, osVersion);
|
.set(VERSION, osVersion);
|
||||||
}
|
}
|
||||||
|
// Xbox-Specific Detection
|
||||||
|
if (this.get(NAME) == WINDOWS && uaCH[MODEL] == 'Xbox') {
|
||||||
|
this.set(NAME, 'Xbox')
|
||||||
|
.set(VERSION, undefined);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case UA_RESULT:
|
case UA_RESULT:
|
||||||
var data = this.data;
|
var data = this.data;
|
||||||
@@ -1180,7 +1207,7 @@
|
|||||||
['getResult', createItemFunc(UA_RESULT)],
|
['getResult', createItemFunc(UA_RESULT)],
|
||||||
['getUA', function () { return userAgent; }],
|
['getUA', function () { return userAgent; }],
|
||||||
['setUA', function (ua) {
|
['setUA', function (ua) {
|
||||||
if (typeof ua === STR_TYPE)
|
if (isString(ua))
|
||||||
userAgent = ua.length > UA_MAX_LENGTH ? trim(ua, UA_MAX_LENGTH) : ua;
|
userAgent = ua.length > UA_MAX_LENGTH ? trim(ua, UA_MAX_LENGTH) : ua;
|
||||||
return this;
|
return this;
|
||||||
}]
|
}]
|
||||||
@@ -1201,7 +1228,7 @@
|
|||||||
//////////
|
//////////
|
||||||
|
|
||||||
// check js environment
|
// check js environment
|
||||||
if (typeof(exports) !== UNDEF_TYPE) {
|
if (typeof exports !== UNDEF_TYPE) {
|
||||||
// nodejs env
|
// nodejs env
|
||||||
if (typeof module !== UNDEF_TYPE && module.exports) {
|
if (typeof module !== UNDEF_TYPE && module.exports) {
|
||||||
exports = module.exports = UAParser;
|
exports = module.exports = UAParser;
|
||||||
@@ -1209,11 +1236,11 @@
|
|||||||
exports.UAParser = UAParser;
|
exports.UAParser = UAParser;
|
||||||
} else {
|
} else {
|
||||||
// requirejs env (optional)
|
// requirejs env (optional)
|
||||||
if (typeof(define) === FUNC_TYPE && define.amd) {
|
if (typeof define === FUNC_TYPE && define.amd) {
|
||||||
define(function () {
|
define(function () {
|
||||||
return UAParser;
|
return UAParser;
|
||||||
});
|
});
|
||||||
} else if (typeof window !== UNDEF_TYPE) {
|
} else if (isWindow) {
|
||||||
// browser env
|
// browser env
|
||||||
window.UAParser = UAParser;
|
window.UAParser = UAParser;
|
||||||
}
|
}
|
||||||
@@ -1224,7 +1251,7 @@
|
|||||||
// In AMD env the global scope should be kept clean, but jQuery is an exception.
|
// In AMD env the global scope should be kept clean, but jQuery is an exception.
|
||||||
// jQuery always exports to global scope, unless jQuery.noConflict(true) is used,
|
// jQuery always exports to global scope, unless jQuery.noConflict(true) is used,
|
||||||
// and we should catch that.
|
// and we should catch that.
|
||||||
var $ = typeof window !== UNDEF_TYPE && (window.jQuery || window.Zepto);
|
var $ = isWindow && (window.jQuery || window.Zepto);
|
||||||
if ($ && !$.ua) {
|
if ($ && !$.ua) {
|
||||||
var parser = new UAParser();
|
var parser = new UAParser();
|
||||||
$.ua = parser.getResult();
|
$.ua = parser.getResult();
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
// Source: /src/main/ua-parser.js
|
// Source: /src/main/ua-parser.js
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
/* UAParser.js v2.0.0-beta.1
|
/* UAParser.js v2.0.0-beta.2
|
||||||
Copyright © 2012-2023 Faisal Salman <f@faisalman.com>
|
Copyright © 2012-2023 Faisal Salman <f@faisalman.com>
|
||||||
UAParser.js PRO Business License *//*
|
UAParser.js PRO Personal 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.
|
||||||
Demo : https://faisalman.github.io/ua-parser-js
|
Demo : https://faisalman.github.io/ua-parser-js
|
||||||
@@ -21,8 +21,7 @@
|
|||||||
// Constants
|
// Constants
|
||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
|
var LIBVERSION = '2.0.0-beta.2',
|
||||||
var LIBVERSION = '2.0.0-beta.1',
|
|
||||||
EMPTY = '',
|
EMPTY = '',
|
||||||
UNKNOWN = '?',
|
UNKNOWN = '?',
|
||||||
FUNC_TYPE = 'function',
|
FUNC_TYPE = 'function',
|
||||||
@@ -43,7 +42,7 @@
|
|||||||
WEARABLE = 'wearable',
|
WEARABLE = 'wearable',
|
||||||
EMBEDDED = 'embedded',
|
EMBEDDED = 'embedded',
|
||||||
USER_AGENT = 'user-agent',
|
USER_AGENT = 'user-agent',
|
||||||
UA_MAX_LENGTH = 350,
|
UA_MAX_LENGTH = 500,
|
||||||
BRANDS = 'brands',
|
BRANDS = 'brands',
|
||||||
FORMFACTOR = 'formFactor',
|
FORMFACTOR = 'formFactor',
|
||||||
FULLVERLIST = 'fullVersionList',
|
FULLVERLIST = 'fullVersionList',
|
||||||
@@ -72,6 +71,7 @@
|
|||||||
BLACKBERRY = 'BlackBerry',
|
BLACKBERRY = 'BlackBerry',
|
||||||
GOOGLE = 'Google',
|
GOOGLE = 'Google',
|
||||||
HUAWEI = 'Huawei',
|
HUAWEI = 'Huawei',
|
||||||
|
LENOVO = 'Lenovo',
|
||||||
LG = 'LG',
|
LG = 'LG',
|
||||||
MICROSOFT = 'Microsoft',
|
MICROSOFT = 'Microsoft',
|
||||||
MOTOROLA = 'Motorola',
|
MOTOROLA = 'Motorola',
|
||||||
@@ -87,9 +87,11 @@
|
|||||||
FIREFOX = 'Firefox',
|
FIREFOX = 'Firefox',
|
||||||
OPERA = 'Opera',
|
OPERA = 'Opera',
|
||||||
FACEBOOK = 'Facebook',
|
FACEBOOK = 'Facebook',
|
||||||
|
SOGOU = 'Sogou',
|
||||||
WINDOWS = 'Windows';
|
WINDOWS = 'Windows';
|
||||||
|
|
||||||
var NAVIGATOR = (typeof window !== UNDEF_TYPE && window.navigator) ?
|
var isWindow = typeof window !== UNDEF_TYPE,
|
||||||
|
NAVIGATOR = (isWindow && window.navigator) ?
|
||||||
window.navigator :
|
window.navigator :
|
||||||
undefined,
|
undefined,
|
||||||
NAVIGATOR_UADATA = (NAVIGATOR && NAVIGATOR.userAgentData) ?
|
NAVIGATOR_UADATA = (NAVIGATOR && NAVIGATOR.userAgentData) ?
|
||||||
@@ -121,13 +123,16 @@
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
return isString(str1) ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
||||||
},
|
},
|
||||||
isExtensions = function (obj) {
|
isExtensions = function (obj) {
|
||||||
for (var prop in obj) {
|
for (var prop in obj) {
|
||||||
return /^(browser|cpu|device|engine|os)$/.test(prop);
|
return /^(browser|cpu|device|engine|os)$/.test(prop);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isString = function (val) {
|
||||||
|
return typeof val === STR_TYPE;
|
||||||
|
},
|
||||||
itemListToArray = function (header) {
|
itemListToArray = function (header) {
|
||||||
if (!header) return undefined;
|
if (!header) return undefined;
|
||||||
var arr = [];
|
var arr = [];
|
||||||
@@ -137,16 +142,16 @@
|
|||||||
var token = trim(tokens[i]).split(';v=');
|
var token = trim(tokens[i]).split(';v=');
|
||||||
arr[i] = { brand : token[0], version : token[1] };
|
arr[i] = { brand : token[0], version : token[1] };
|
||||||
} else {
|
} else {
|
||||||
arr[i] = tokens[i];
|
arr[i] = trim(tokens[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
},
|
},
|
||||||
lowerize = function (str) {
|
lowerize = function (str) {
|
||||||
return typeof(str) === STR_TYPE ? str.toLowerCase() : str;
|
return isString(str) ? str.toLowerCase() : str;
|
||||||
},
|
},
|
||||||
majorize = function (version) {
|
majorize = function (version) {
|
||||||
return typeof(version) === STR_TYPE ? strip(/[^\d\.]/g, version).split('.')[0] : undefined;
|
return isString(version) ? strip(/[^\d\.]/g, version).split('.')[0] : undefined;
|
||||||
},
|
},
|
||||||
setProps = function (arr) {
|
setProps = function (arr) {
|
||||||
for (var i in arr) {
|
for (var i in arr) {
|
||||||
@@ -160,15 +165,15 @@
|
|||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
strip = function (pattern, str) {
|
strip = function (pattern, str) {
|
||||||
return str.replace(pattern, EMPTY);
|
return isString(str) ? str.replace(pattern, EMPTY) : str;
|
||||||
},
|
},
|
||||||
stripQuotes = function (val) {
|
stripQuotes = function (str) {
|
||||||
return typeof val === STR_TYPE ? strip(/\\?\"/g, val) : val;
|
return strip(/\\?\"/g, str);
|
||||||
},
|
},
|
||||||
trim = function (str, len) {
|
trim = function (str, len) {
|
||||||
if (typeof(str) === STR_TYPE) {
|
if (isString(str)) {
|
||||||
str = strip(/^\s\s*/, str);
|
str = strip(/^\s\s*/, str);
|
||||||
return typeof(len) === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
|
return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -297,15 +302,18 @@
|
|||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/opios[\/ ]+([\w\.]+)/i // Opera mini on iphone >= 8.0
|
/opios[\/ ]+([\w\.]+)/i // Opera mini on iphone >= 8.0
|
||||||
], [VERSION, [NAME, OPERA+' Mini']], [
|
], [VERSION, [NAME, OPERA+' Mini']], [
|
||||||
|
/\bop(?:rg)?x\/([\w\.]+)/i // Opera GX
|
||||||
|
], [VERSION, [NAME, OPERA+' GX']], [
|
||||||
/\bopr\/([\w\.]+)/i // Opera Webkit
|
/\bopr\/([\w\.]+)/i // Opera Webkit
|
||||||
], [VERSION, [NAME, OPERA]], [
|
], [VERSION, [NAME, OPERA]], [
|
||||||
|
|
||||||
// Mixed
|
// Mixed
|
||||||
|
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i // Baidu
|
||||||
|
], [VERSION, [NAME, 'Baidu']], [
|
||||||
/(kindle)\/([\w\.]+)/i, // Kindle
|
/(kindle)\/([\w\.]+)/i, // Kindle
|
||||||
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
|
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
|
||||||
// Trident based
|
// Trident based
|
||||||
/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
|
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
|
||||||
/(ba?idubrowser)[\/ ]?([\w\.]+)/i, // Baidu Browser
|
|
||||||
/(?: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
|
// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
|
||||||
@@ -317,8 +325,7 @@
|
|||||||
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i // UCBrowser
|
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i // UCBrowser
|
||||||
], [VERSION, [NAME, 'UCBrowser']], [
|
], [VERSION, [NAME, 'UCBrowser']], [
|
||||||
/microm.+\bqbcore\/([\w\.]+)/i, // WeChat Desktop for Windows Built-in Browser
|
/microm.+\bqbcore\/([\w\.]+)/i, // WeChat Desktop for Windows Built-in Browser
|
||||||
/\bqbcore\/([\w\.]+).+microm/i
|
/\bqbcore\/([\w\.]+).+microm/i,
|
||||||
], [VERSION, [NAME, 'WeChat(Win) Desktop']], [
|
|
||||||
/micromessenger\/([\w\.]+)/i // WeChat
|
/micromessenger\/([\w\.]+)/i // WeChat
|
||||||
], [VERSION, [NAME, 'WeChat']], [
|
], [VERSION, [NAME, 'WeChat']], [
|
||||||
/konqueror\/([\w\.]+)/i // Konqueror
|
/konqueror\/([\w\.]+)/i // Konqueror
|
||||||
@@ -327,6 +334,8 @@
|
|||||||
], [VERSION, [NAME, 'IE']], [
|
], [VERSION, [NAME, 'IE']], [
|
||||||
/ya(?:search)?browser\/([\w\.]+)/i // Yandex
|
/ya(?:search)?browser\/([\w\.]+)/i // Yandex
|
||||||
], [VERSION, [NAME, 'Yandex']], [
|
], [VERSION, [NAME, 'Yandex']], [
|
||||||
|
/slbrowser\/([\w\.]+)/i // Smart Lenovo Browser
|
||||||
|
], [VERSION, [NAME, 'Smart ' + LENOVO + SUFFIX_BROWSER]], [
|
||||||
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
|
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
|
||||||
], [[NAME, /(.+)/, '$1 Secure' + SUFFIX_BROWSER], VERSION], [
|
], [[NAME, /(.+)/, '$1 Secure' + SUFFIX_BROWSER], VERSION], [
|
||||||
/\bfocus\/([\w\.]+)/i // Firefox Focus
|
/\bfocus\/([\w\.]+)/i // Firefox Focus
|
||||||
@@ -345,15 +354,20 @@
|
|||||||
], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [
|
], [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]], [
|
||||||
/\bqihu|(qi?ho?o?|360)browser/i // 360
|
/\bqihu|(qi?ho?o?|360)browser/i // 360
|
||||||
], [[NAME, '360' + SUFFIX_BROWSER]], [
|
], [[NAME, '360' + SUFFIX_BROWSER]], [
|
||||||
/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i
|
/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
|
||||||
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Samsung/Sailfish/Huawei Browser
|
], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
|
||||||
|
/samsungbrowser\/([\w\.]+)/i // Samsung Internet
|
||||||
|
], [VERSION, [NAME, SAMSUNG + ' Internet']], [
|
||||||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
||||||
], [[NAME, /_/g, ' '], VERSION], [
|
], [[NAME, /_/g, ' '], VERSION], [
|
||||||
|
/metasr[\/ ]?([\d\.]+)/i // Sogou Explorer
|
||||||
|
], [VERSION, [NAME, SOGOU + ' Explorer']], [
|
||||||
|
/(sogou)mo\w+\/([\d\.]+)/i // Sogou Mobile
|
||||||
|
], [[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|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/Baidu App/2345 Browser
|
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i // QQBrowser/2345 Browser
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/(metasr)[\/ ]?([\w\.]+)/i, // SouGouBrowser
|
|
||||||
/(lbbrowser)/i, // LieBao Browser
|
/(lbbrowser)/i, // LieBao Browser
|
||||||
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
|
/\[(linkedin)app\]/i // LinkedIn App for iOS & Android
|
||||||
], [NAME], [
|
], [NAME], [
|
||||||
@@ -361,10 +375,12 @@
|
|||||||
// 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], [
|
||||||
|
/(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
|
||||||
/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
|
||||||
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i // Chromium/Instagram/Snapchat
|
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i // Chromium/Instagram/Snapchat
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
|
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
|
||||||
@@ -496,7 +512,7 @@
|
|||||||
/\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|\))/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)?)(?: bui|\))/i // Xiaomi Mi
|
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i // Xiaomi Mi
|
||||||
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
|
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
|
||||||
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, // Redmi Pad
|
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, // Redmi Pad
|
||||||
@@ -536,7 +552,7 @@
|
|||||||
// Lenovo
|
// Lenovo
|
||||||
/(ideatab[-\w ]+)/i,
|
/(ideatab[-\w ]+)/i,
|
||||||
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/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
|
||||||
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
||||||
@@ -710,7 +726,7 @@
|
|||||||
// MIXED (GENERIC)
|
// MIXED (GENERIC)
|
||||||
///////////////////
|
///////////////////
|
||||||
|
|
||||||
/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
|
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
|
||||||
], [MODEL, [TYPE, MOBILE]], [
|
], [MODEL, [TYPE, MOBILE]], [
|
||||||
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
|
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
|
||||||
], [MODEL, [TYPE, TABLET]], [
|
], [MODEL, [TYPE, TABLET]], [
|
||||||
@@ -747,12 +763,12 @@
|
|||||||
// Windows
|
// Windows
|
||||||
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
|
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/(windows) nt 6\.2; (arm)/i, // Windows RT
|
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i // Windows Phone
|
||||||
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, // Windows Phone
|
|
||||||
/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i
|
|
||||||
], [NAME, [VERSION, strMapper, windowsVersionMap]], [
|
], [NAME, [VERSION, strMapper, windowsVersionMap]], [
|
||||||
/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
/windows nt 6\.2; (arm)/i, // Windows RT
|
||||||
], [[NAME, WINDOWS], [VERSION, strMapper, windowsVersionMap]], [
|
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
||||||
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
||||||
|
], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [
|
||||||
|
|
||||||
// iOS/macOS
|
// iOS/macOS
|
||||||
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
|
||||||
@@ -1041,15 +1057,16 @@
|
|||||||
|
|
||||||
switch (this.itemType) {
|
switch (this.itemType) {
|
||||||
case UA_BROWSER:
|
case UA_BROWSER:
|
||||||
var brands = uaCH[FULLVERLIST] || uaCH[BRANDS];
|
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,
|
var brandName = strip(/(Google|Microsoft) /, brands[i].brand || brands[i]),
|
||||||
brandVersion = brands[i].version;
|
brandVersion = brands[i].version;
|
||||||
if (!/not.a.brand/i.test(brandName) && (i < 1 || /chromi/i.test(this.get(NAME)))) {
|
if (!/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && !/chromi/i.test(brandName)))) {
|
||||||
this.set(NAME, strip(GOOGLE+' ', brandName))
|
this.set(NAME, brandName)
|
||||||
.set(VERSION, brandVersion)
|
.set(VERSION, brandVersion)
|
||||||
.set(MAJOR, majorize(brandVersion));
|
.set(MAJOR, majorize(brandVersion));
|
||||||
|
prevName = brandName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1068,6 +1085,11 @@
|
|||||||
if (uaCH[MODEL]) {
|
if (uaCH[MODEL]) {
|
||||||
this.set(MODEL, uaCH[MODEL]);
|
this.set(MODEL, uaCH[MODEL]);
|
||||||
}
|
}
|
||||||
|
// Xbox-Specific Detection
|
||||||
|
if (uaCH[MODEL] == 'Xbox') {
|
||||||
|
this.set(TYPE, CONSOLE)
|
||||||
|
.set(VENDOR, MICROSOFT);
|
||||||
|
}
|
||||||
if (uaCH[FORMFACTOR]) {
|
if (uaCH[FORMFACTOR]) {
|
||||||
var ff;
|
var ff;
|
||||||
if (typeof uaCH[FORMFACTOR] !== 'string') {
|
if (typeof uaCH[FORMFACTOR] !== 'string') {
|
||||||
@@ -1089,6 +1111,11 @@
|
|||||||
this.set(NAME, osName)
|
this.set(NAME, osName)
|
||||||
.set(VERSION, osVersion);
|
.set(VERSION, osVersion);
|
||||||
}
|
}
|
||||||
|
// Xbox-Specific Detection
|
||||||
|
if (this.get(NAME) == WINDOWS && uaCH[MODEL] == 'Xbox') {
|
||||||
|
this.set(NAME, 'Xbox')
|
||||||
|
.set(VERSION, undefined);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case UA_RESULT:
|
case UA_RESULT:
|
||||||
var data = this.data;
|
var data = this.data;
|
||||||
@@ -1182,7 +1209,7 @@
|
|||||||
['getResult', createItemFunc(UA_RESULT)],
|
['getResult', createItemFunc(UA_RESULT)],
|
||||||
['getUA', function () { return userAgent; }],
|
['getUA', function () { return userAgent; }],
|
||||||
['setUA', function (ua) {
|
['setUA', function (ua) {
|
||||||
if (typeof ua === STR_TYPE)
|
if (isString(ua))
|
||||||
userAgent = ua.length > UA_MAX_LENGTH ? trim(ua, UA_MAX_LENGTH) : ua;
|
userAgent = ua.length > UA_MAX_LENGTH ? trim(ua, UA_MAX_LENGTH) : ua;
|
||||||
return this;
|
return this;
|
||||||
}]
|
}]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { expectType } from 'tsd';
|
import { expectType } from 'tsd';
|
||||||
import { UAParser, IResult, IBrowser, ICPU, IEngine, IDevice, IOS } from "../src/main/ua-parser";
|
import { UAParser, IResult, IBrowser, ICPU, IEngine, IDevice, IOS } from "../src/main/ua-parser";
|
||||||
|
import { isAppleSilicon, isChromiumBased } from "../src/helpers/ua-parser-helpers";
|
||||||
|
|
||||||
const uastring = 'Mozilla/5.0 (X11; MyCustomOS; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0';
|
const uastring = 'Mozilla/5.0 (X11; MyCustomOS; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0';
|
||||||
const extensions = {
|
const extensions = {
|
||||||
@@ -40,3 +41,8 @@ expectType<IOS>(parser.getOS());
|
|||||||
expectType<IResult>(parser.getResult());
|
expectType<IResult>(parser.getResult());
|
||||||
expectType<string>(parser.getUA());
|
expectType<string>(parser.getUA());
|
||||||
expectType<UAParser>(parser.setUA(uastring));
|
expectType<UAParser>(parser.setUA(uastring));
|
||||||
|
|
||||||
|
const result = parser.getResult();
|
||||||
|
|
||||||
|
expectType<boolean>(isAppleSilicon(result));
|
||||||
|
expectType<boolean>(isChromiumBased(result));
|
||||||
26
test/mocha-test-helpers.js
Normal file
26
test/mocha-test-helpers.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
const assert = require('assert');
|
||||||
|
const UAParser = require('../src/main/ua-parser');
|
||||||
|
const { isAppleSilicon, isChromiumBased } = require('../src/helpers/ua-parser-helpers');
|
||||||
|
|
||||||
|
describe('isAppleSilicon', () => {
|
||||||
|
it('Can detect Apple Silicon device', () => {
|
||||||
|
|
||||||
|
// non-real ua
|
||||||
|
const macARM = 'Mozilla/5.0 (Macintosh; ARM; Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0';
|
||||||
|
const macIntel = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0';
|
||||||
|
|
||||||
|
assert.equal(isAppleSilicon(UAParser(macIntel)), false);
|
||||||
|
assert.equal(isAppleSilicon(UAParser(macARM)), true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('isChromiumBased', () => {
|
||||||
|
it('Can detect Chromium-based browser', () => {
|
||||||
|
|
||||||
|
const edge = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.2151.58';
|
||||||
|
const firefox = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0';
|
||||||
|
|
||||||
|
assert.equal(isChromiumBased(UAParser(edge)), true);
|
||||||
|
assert.equal(isChromiumBased(UAParser(firefox)), false);
|
||||||
|
});
|
||||||
|
});
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
|
|||||||
@@ -9,6 +9,26 @@
|
|||||||
"major" : "undefined"
|
"major" : "undefined"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Alipay",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; U; Android 10; zh-CN; V2034A Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 UWS/3.22.2.33 Mobile Safari/537.36 UCBS/3.22.2.33_211025173018 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:360|0|2.0) AliApp(AP/10.2.51.7100) AlipayClient/10.2.51.7100 Language/zh-Hans useStatusBar/true isConcaveScreen/true Region/CNAriver/1.0.0",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Alipay",
|
||||||
|
"version" : "10.2.51.7100",
|
||||||
|
"major" : "10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Alipay",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 10; VOG-AL00 Build/HUAWEIVOG-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/105.0.5195.148 MYWeb/0.2.103.0_20230131112530 UWS/3.22.2.9999 UCBS/3.22.2.9999_220000000000 Mobile Safari/537.36 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:360|0|3.0) AliApp(AP/10.3.50.9999) AlipayClient/10.3.50.9999 Language/en isConcaveScreen/true Region/CN ProductType/devAriver/1.0.0",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Alipay",
|
||||||
|
"version" : "10.3.50.9999",
|
||||||
|
"major" : "10"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Android Browser on Galaxy Nexus",
|
"desc" : "Android Browser on Galaxy Nexus",
|
||||||
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
||||||
@@ -64,7 +84,7 @@
|
|||||||
"ua" : "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925F Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.0 Chrome/38.0.2125.102 Mobile Safari/537.36",
|
"ua" : "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925F Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.0 Chrome/38.0.2125.102 Mobile Safari/537.36",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Samsung Browser",
|
"name" : "Samsung Internet",
|
||||||
"version" : "3.0",
|
"version" : "3.0",
|
||||||
"major" : "3"
|
"major" : "3"
|
||||||
}
|
}
|
||||||
@@ -94,7 +114,7 @@
|
|||||||
"ua" : "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB5; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
|
"ua" : "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB5; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Avant ",
|
"name" : "Avant",
|
||||||
"version" : "undefined",
|
"version" : "undefined",
|
||||||
"major" : "undefined"
|
"major" : "undefined"
|
||||||
}
|
}
|
||||||
@@ -124,11 +144,71 @@
|
|||||||
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; baidubrowser 1.x)",
|
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; baidubrowser 1.x)",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "baidubrowser",
|
"name" : "Baidu",
|
||||||
"version" : "1.x",
|
"version" : "1.x",
|
||||||
"major" : "1"
|
"major" : "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Baidu",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 9; Redmi Note 5 Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/110.0.5481.153 Mobile Safari/537.36 bdbrowser/6.4.0.4",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Baidu",
|
||||||
|
"version" : "6.4.0.4",
|
||||||
|
"major" : "6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Baidu",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.4.9999.1900 Safari/537.31 BDSpark/26.4",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Baidu",
|
||||||
|
"version" : "26.4",
|
||||||
|
"major" : "26"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Baidu",
|
||||||
|
"ua" : "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) BaiduHD/5.4.0.0 Mobile/10A406 Safari/8536.25",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Baidu",
|
||||||
|
"version" : "5.4.0.0",
|
||||||
|
"major" : "5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "BaiDu Browser",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 BIDUBrowser/8.7 Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Baidu",
|
||||||
|
"version" : "8.7",
|
||||||
|
"major" : "8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "baidu app on iOS",
|
||||||
|
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16C101 main%2F1.0 baiduboxapp/11.12.0.18 (Baidu; P2 12.1.2)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Baidu",
|
||||||
|
"version" : "11.12.0.18",
|
||||||
|
"major" : "11"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "baidu app on Android",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 8.1.0; BKK-AL10 Build/HONORBKK-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.11 baiduboxapp/11.11.0.0 (Baidu; P1 8.1.0)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Baidu",
|
||||||
|
"version" : "11.11.0.0",
|
||||||
|
"major" : "11"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Bolt",
|
"desc" : "Bolt",
|
||||||
"ua" : "Mozilla/5.0 (X11; 78; CentOS; US-en) AppleWebKit/527+ (KHTML, like Gecko) Bolt/0.862 Version/3.0 Safari/523.15",
|
"ua" : "Mozilla/5.0 (X11; 78; CentOS; US-en) AppleWebKit/527+ (KHTML, like Gecko) Bolt/0.862 Version/3.0 Safari/523.15",
|
||||||
@@ -429,6 +509,26 @@
|
|||||||
"major" : "undefined"
|
"major" : "undefined"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Klarna in-App Browser for iOS",
|
||||||
|
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Klarna/23.36.223",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Klarna",
|
||||||
|
"version" : "23.36.223",
|
||||||
|
"major" : "23"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Klarna in-App Browser for Android",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 12; moto g(60)s Build/S3RLS32.114-25-13; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 Klarna/23.36.215",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Klarna",
|
||||||
|
"version" : "23.36.215",
|
||||||
|
"major" : "23"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Instagram in-App Browser for iOS",
|
"desc" : "Instagram in-App Browser for iOS",
|
||||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Instagram 142.0.0.22.109 (iPhone12,5; iOS 14_1; en_US; en-US; scale=3.00; 1242x2688; 214888322) NW/1",
|
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Instagram 142.0.0.22.109 (iPhone12,5; iOS 14_1; en_US; en-US; scale=3.00; 1242x2688; 214888322) NW/1",
|
||||||
@@ -708,6 +808,26 @@
|
|||||||
"major" : "5"
|
"major" : "5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Smart Lenovo Browser",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 SLBrowser/8.0.0.10171 SLBChan/8",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Smart Lenovo Browser",
|
||||||
|
"version" : "8.0.0.10171",
|
||||||
|
"major" : "8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Smart Lenovo Browser",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 SLBrowser/9.0.0.9011 SLBChan/10",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Smart Lenovo Browser",
|
||||||
|
"version" : "9.0.0.9011",
|
||||||
|
"major" : "9"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "LINE on Android",
|
"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",
|
||||||
@@ -1018,6 +1138,26 @@
|
|||||||
"major" : "12"
|
"major" : "12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Opera GX on Android",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 10; Redmi Note 8 Pro Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5790.168 Mobile Safari/537.36 OPX/2",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Opera GX",
|
||||||
|
"version" : "2",
|
||||||
|
"major" : "2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Opera GX on Windows",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.50747 OPRGX/60.0.3255.50747",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Opera GX",
|
||||||
|
"version" : "60.0.3255.50747",
|
||||||
|
"major" : "60"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Opera Tablet",
|
"desc" : "Opera Tablet",
|
||||||
"ua" : "Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1",
|
"ua" : "Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1",
|
||||||
@@ -1129,15 +1269,55 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Samsung Browser",
|
"desc" : "Samsung Internet for Android",
|
||||||
"ua" : "Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG-SM-G925A Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36",
|
"ua" : "Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG-SM-G925A Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Samsung Browser",
|
"name" : "Samsung Internet",
|
||||||
"version" : "4.0",
|
"version" : "4.0",
|
||||||
"major" : "4"
|
"major" : "4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Internet for Tizen Mobile",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/1.0 Mobile Safari/537.3",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Samsung Internet",
|
||||||
|
"version" : "1.0",
|
||||||
|
"major" : "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Internet for Smart-TV",
|
||||||
|
"ua" : "Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Samsung Internet",
|
||||||
|
"version" : "1.0",
|
||||||
|
"major" : "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Internet for Gear VR",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925K Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile VR Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Samsung Internet",
|
||||||
|
"version" : "4.0",
|
||||||
|
"major" : "4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Internet in Redmi 8A",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 10; Redmi 8A) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/23.0 Chrome/115.0.0.0 Mobile Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Samsung Internet",
|
||||||
|
"version" : "23.0",
|
||||||
|
"major" : "23"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "SeaMonkey",
|
"desc" : "SeaMonkey",
|
||||||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b4pre) Gecko/20090405 SeaMonkey/2.0b1pre",
|
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b4pre) Gecko/20090405 SeaMonkey/2.0b1pre",
|
||||||
@@ -1348,6 +1528,16 @@
|
|||||||
"major" : "2"
|
"major" : "2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Vivo Browser",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 13; 23049RAD8C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/16.7.1.1",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Vivo Browser",
|
||||||
|
"version" : "16.7.1.1",
|
||||||
|
"major" : "16"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Viera",
|
"desc" : "Viera",
|
||||||
"ua" : "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)",
|
"ua" : "HbbTV/1.2.1 (;Panasonic;VIERA 2015;3.014;a001-003 4000-0000;)",
|
||||||
@@ -1578,32 +1768,12 @@
|
|||||||
"major" : "6"
|
"major" : "6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc" : "baidu app on iOS",
|
|
||||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16C101 main%2F1.0 baiduboxapp/11.12.0.18 (Baidu; P2 12.1.2)",
|
|
||||||
"expect" :
|
|
||||||
{
|
|
||||||
"name" : "baiduboxapp",
|
|
||||||
"version" : "11.12.0.18",
|
|
||||||
"major" : "11"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc" : "baidu app on Android",
|
|
||||||
"ua" : "Mozilla/5.0 (Linux; Android 8.1.0; BKK-AL10 Build/HONORBKK-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.11 baiduboxapp/11.11.0.0 (Baidu; P1 8.1.0)",
|
|
||||||
"expect" :
|
|
||||||
{
|
|
||||||
"name" : "baiduboxapp",
|
|
||||||
"version" : "11.11.0.0",
|
|
||||||
"major" : "11"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
||||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "WeChat(Win) Desktop",
|
"name" : "WeChat",
|
||||||
"version" : "3.43.901.400",
|
"version" : "3.43.901.400",
|
||||||
"major" : "3"
|
"major" : "3"
|
||||||
}
|
}
|
||||||
@@ -1613,7 +1783,7 @@
|
|||||||
"ua" : "mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/53.0.2785.116 safari/537.36 qbcore/4.0.1301.400 qqbrowser/9.0.2524.400 mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/81.0.4044.138 safari/537.36 nettype/wifi micromessenger/7.0.20.1781(0x6700143b) windowswechat",
|
"ua" : "mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/53.0.2785.116 safari/537.36 qbcore/4.0.1301.400 qqbrowser/9.0.2524.400 mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/81.0.4044.138 safari/537.36 nettype/wifi micromessenger/7.0.20.1781(0x6700143b) windowswechat",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "WeChat(Win) Desktop",
|
"name" : "WeChat",
|
||||||
"version" : "4.0.1301.400",
|
"version" : "4.0.1301.400",
|
||||||
"major" : "4"
|
"major" : "4"
|
||||||
}
|
}
|
||||||
@@ -1643,7 +1813,19 @@
|
|||||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.221 Safari/537.36 SE 2.X MetaSr 1.0",
|
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.221 Safari/537.36 SE 2.X MetaSr 1.0",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "MetaSr"
|
"name" : "Sogou Explorer",
|
||||||
|
"version" : "1.0",
|
||||||
|
"major" : "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Sogou Mobile Browser",
|
||||||
|
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 SogouMSE,SogouMobileBrowser/3.7.4",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Sogou Mobile",
|
||||||
|
"version" : "3.7.4",
|
||||||
|
"major" : "3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1654,16 +1836,6 @@
|
|||||||
"name" : "LBBROWSER"
|
"name" : "LBBROWSER"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc" : "BaiDu Browser",
|
|
||||||
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 BIDUBrowser/8.7 Safari/537.36",
|
|
||||||
"expect" :
|
|
||||||
{
|
|
||||||
"name" : "BIDUBrowser",
|
|
||||||
"version" : "8.7",
|
|
||||||
"major" : "8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"desc" : "2345 Browser",
|
"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",
|
"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",
|
||||||
|
|||||||
@@ -2843,6 +2843,15 @@
|
|||||||
"type": "mobile"
|
"type": "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc": "XiaoMi Redmi Note 12 Turbo",
|
||||||
|
"ua": "Mozilla/5.0 (Linux; Android 13; 23049RAD8C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 VivoBrowser/16.7.1.1",
|
||||||
|
"expect": {
|
||||||
|
"vendor": "Xiaomi",
|
||||||
|
"model": "23049RAD8C",
|
||||||
|
"type": "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc": "ZTE Blade A6",
|
"desc": "ZTE Blade A6",
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; ZTE BLADE A0620 Build/NMF26F; ru-ru) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Mobile Safari/537.36 Puffin/9.2.0.50586AP",
|
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; ZTE BLADE A0620 Build/NMF26F; ru-ru) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Mobile Safari/537.36 Puffin/9.2.0.50586AP",
|
||||||
|
|||||||
@@ -80,6 +80,24 @@
|
|||||||
"version" : "10"
|
"version" : "10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Windows",
|
||||||
|
"version" : "7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "WeChat Desktop for Windows Built-in Browser major version in 4",
|
||||||
|
"ua" : "mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/81.0.4044.138 safari/537.36 nettype/wifi micromessenger/7.0.20.1781(0x6700143b) windowswechat",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Windows",
|
||||||
|
"version" : "7"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Windows RT",
|
"desc" : "Windows RT",
|
||||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
|
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
|
||||||
|
|||||||
Reference in New Issue
Block a user