mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-20 09:06:42 +03:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e72371c34d | ||
|
|
233d3bae22 | ||
|
|
5230745280 | ||
|
|
cc11bc6a2c | ||
|
|
bd6dee4a08 | ||
|
|
43169ce1da | ||
|
|
b0059eff5b | ||
|
|
ec0d7c037a |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.21",
|
"version": "0.7.22",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Faisal Salman <f@faisalman.com>"
|
"Faisal Salman <f@faisalman.com>"
|
||||||
],
|
],
|
||||||
|
|||||||
4
dist/ua-parser.min.js
vendored
4
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/ua-parser.pack.js
vendored
4
dist/ua-parser.pack.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
Package.describe({
|
Package.describe({
|
||||||
name: 'faisalman:ua-parser-js',
|
name: 'faisalman:ua-parser-js',
|
||||||
version: '0.7.21',
|
version: '0.7.22',
|
||||||
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'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "UAParser.js",
|
"title": "UAParser.js",
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.21",
|
"version": "0.7.22",
|
||||||
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
|
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
|
||||||
"description": "Lightweight JavaScript-based user-agent string parser",
|
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ WebOS, Windows [Phone/Mobile], Zenwalk, ...
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script type="text/javascript" src="ua-parser.min.js"></script>
|
<script src="ua-parser.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
|
|
||||||
var parser = new UAParser();
|
var parser = new UAParser();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* UAParser.js v0.7.21
|
* UAParser.js v0.7.22
|
||||||
* Lightweight JavaScript-based User-Agent string parser
|
* Lightweight JavaScript-based User-Agent string parser
|
||||||
* https://github.com/faisalman/ua-parser-js
|
* https://github.com/faisalman/ua-parser-js
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
|
|
||||||
var LIBVERSION = '0.7.21',
|
var LIBVERSION = '0.7.22',
|
||||||
EMPTY = '',
|
EMPTY = '',
|
||||||
UNKNOWN = '?',
|
UNKNOWN = '?',
|
||||||
FUNC_TYPE = 'function',
|
FUNC_TYPE = 'function',
|
||||||
@@ -490,7 +490,7 @@
|
|||||||
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [
|
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [
|
||||||
|
|
||||||
/d\/huawei([\w\s-]+)[;\)]/i,
|
/d\/huawei([\w\s-]+)[;\)]/i,
|
||||||
/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i // Huawei
|
/(nexus\s6p|vog-l29|ane-lx1|eml-l29|ele-l29)/i // Huawei
|
||||||
], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [
|
], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/android.+(bah2?-a?[lw]\d{2})/i // Huawei MediaPad
|
/android.+(bah2?-a?[lw]\d{2})/i // Huawei MediaPad
|
||||||
@@ -585,9 +585,9 @@
|
|||||||
/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i, // Xiaomi Hongmi
|
/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i, // Xiaomi Hongmi
|
||||||
/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,
|
/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,
|
||||||
// Xiaomi Mi
|
// Xiaomi Mi
|
||||||
/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i // Redmi Phones
|
/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]?[\w\s]+))\s+build/i // Redmi Phones
|
||||||
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [
|
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [
|
||||||
/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i // Mi Pad tablets
|
/android.+(mi[\s\-_]*(?:pad)(?:[\s_]?[\w\s]+))\s+build/i // Mi Pad tablets
|
||||||
],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [
|
],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [
|
||||||
/android.+;\s(m[1-5]\snote)\sbuild/i // Meizu
|
/android.+;\s(m[1-5]\snote)\sbuild/i // Meizu
|
||||||
], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [
|
], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [
|
||||||
|
|||||||
@@ -1096,5 +1096,14 @@
|
|||||||
"model": "EML-L29",
|
"model": "EML-L29",
|
||||||
"type": "mobile"
|
"type": "mobile"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc": "Huawei P30",
|
||||||
|
"ua": "Mozilla/5.0 (Linux; Android 9; ELE-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Mobile Safari/537.36",
|
||||||
|
"expect": {
|
||||||
|
"vendor": "Huawei",
|
||||||
|
"model": "ELE-L29",
|
||||||
|
"type": "mobile"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user