Compare commits

...

8 Commits

Author SHA1 Message Date
Faisal Salman
e72371c34d bump version to 0.7.22 2020-09-12 16:06:20 +07:00
Faisal Salman
233d3bae22 Fix potential ReDoS vulnerability 2020-09-12 15:47:15 +07:00
Faisal Salman
5230745280 Merge pull request #424 from patrick-nurt/detect-huawei-p30
Detect Huawei P30
2020-05-19 01:00:34 +07:00
patrick-nurt
cc11bc6a2c Update device-test.json 2020-05-17 08:20:27 +04:00
patrick-nurt
bd6dee4a08 Update ua-parser.js 2020-05-17 08:17:30 +04:00
Faisal Salman
43169ce1da Merge pull request #405 from tkrotoff/remove-script-type
No need for type="text/javascript"
2020-01-05 21:18:39 +07:00
Tanguy Krotoff
b0059eff5b No need for type="text/javascript" 2020-01-05 12:46:10 +01:00
Tanguy Krotoff
ec0d7c037a Tabs => spaces 2020-01-05 12:45:40 +01:00
8 changed files with 25 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "ua-parser-js",
"version": "0.7.21",
"version": "0.7.22",
"authors": [
"Faisal Salman <f@faisalman.com>"
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'faisalman:ua-parser-js',
version: '0.7.21',
version: '0.7.22',
summary: 'Lightweight JavaScript-based user-agent string parser',
git: 'https://github.com/faisalman/ua-parser-js.git',
documentation: 'readme.md'

View File

@@ -1,7 +1,7 @@
{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.21",
"version": "0.7.22",
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [

View File

@@ -113,10 +113,10 @@ WebOS, Windows [Phone/Mobile], Zenwalk, ...
<!doctype html>
<html>
<head>
<script type="text/javascript" src="ua-parser.min.js"></script>
<script type="text/javascript">
<script src="ua-parser.min.js"></script>
<script>
var parser = new UAParser();
var parser = new UAParser();
// by default it takes ua string from current browser's window.navigator.userAgent
console.log(parser.getResult());

View File

@@ -1,5 +1,5 @@
/*!
* UAParser.js v0.7.21
* UAParser.js v0.7.22
* Lightweight JavaScript-based User-Agent string parser
* https://github.com/faisalman/ua-parser-js
*
@@ -16,7 +16,7 @@
/////////////
var LIBVERSION = '0.7.21',
var LIBVERSION = '0.7.22',
EMPTY = '',
UNKNOWN = '?',
FUNC_TYPE = 'function',
@@ -490,7 +490,7 @@
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [
/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]], [
/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.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,
// 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]], [
/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]], [
/android.+;\s(m[1-5]\snote)\sbuild/i // Meizu
], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [

View File

@@ -1096,5 +1096,14 @@
"model": "EML-L29",
"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"
}
}
]