mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-18 07:40:35 +03:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10775bd17c | ||
|
|
c03a84a601 | ||
|
|
eade7a9355 | ||
|
|
4e0aa0b88b | ||
|
|
4e7c662b0b | ||
|
|
93993dc311 | ||
|
|
55e75dd1b3 | ||
|
|
c71373b666 | ||
|
|
bf4c2e170e | ||
|
|
51b8089958 | ||
|
|
550420d725 | ||
|
|
fbcfe248b8 | ||
|
|
2a5cd4d119 | ||
|
|
c3f7294a44 | ||
|
|
b254f93ec1 | ||
|
|
1020d10a30 | ||
|
|
5ba9fd50ed | ||
|
|
bb69ef2bd4 | ||
|
|
3a457f9bd9 | ||
|
|
d929c3e508 | ||
|
|
1ec2119288 | ||
|
|
8e46a85549 | ||
|
|
1f92d6148c | ||
|
|
5d57850074 | ||
|
|
8e81811dea | ||
|
|
99a80e88fb | ||
|
|
cbba2f5728 | ||
|
|
2e5dff95c8 | ||
|
|
792dc0246a |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Faisal Salman <fyzlman@gmail.com>"
|
"Faisal Salman <fyzlman@gmail.com>"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"description": "Lightweight JavaScript-based user-agent string parser",
|
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"user-agent",
|
"user-agent",
|
||||||
|
|||||||
1
dist/ua-parser.html
vendored
Normal file
1
dist/ua-parser.html
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<script src="./ua-parser.min.js"></script>
|
||||||
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
@@ -1,11 +1,12 @@
|
|||||||
Package.describe({
|
Package.describe({
|
||||||
name: 'faisalman:ua-parser-js',
|
name: 'faisalman:ua-parser-js',
|
||||||
version: '0.7.10',
|
version: '0.7.11',
|
||||||
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'
|
||||||
});
|
});
|
||||||
|
|
||||||
Package.on_use(function (api) {
|
Package.onUse(function (api) {
|
||||||
api.addFiles("src/ua-parser.js");
|
api.addFiles("src/ua-parser.js");
|
||||||
|
api.export("UAParser");
|
||||||
});
|
});
|
||||||
|
|||||||
13
package.json
13
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "UAParser.js",
|
"title": "UAParser.js",
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
|
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
|
||||||
"description": "Lightweight JavaScript-based user-agent string parser",
|
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -70,16 +70,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/faisalman/ua-parser-js.git"
|
"url": "https://github.com/faisalman/ua-parser-js.git"
|
||||||
},
|
},
|
||||||
"licenses": [
|
"license": "(GPL-2.0 OR MIT)",
|
||||||
{
|
|
||||||
"type": "GPLv2",
|
|
||||||
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "MIT",
|
|
||||||
"url": "http://www.opensource.org/licenses/mit-license.php"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "*"
|
"node": "*"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Lightweight JavaScript-based User-Agent string parser. Supports browser & node.j
|
|||||||
|
|
||||||
[](https://travis-ci.org/faisalman/ua-parser-js)
|
[](https://travis-ci.org/faisalman/ua-parser-js)
|
||||||
[](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)
|
[](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)
|
||||||
|
[](https://cdnjs.com/libraries/UAParser.js)
|
||||||
|
|
||||||
* Author : Faisal Salman <<fyzlman@gmail.com>>
|
* Author : Faisal Salman <<fyzlman@gmail.com>>
|
||||||
* Demo : http://faisalman.github.io/ua-parser-js
|
* Demo : http://faisalman.github.io/ua-parser-js
|
||||||
@@ -13,7 +14,7 @@ Lightweight JavaScript-based User-Agent string parser. Supports browser & node.j
|
|||||||
|
|
||||||
Extract detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model purely from user-agent string with relatively lightweight footprint (~11KB minified / ~4KB gzipped). Written in vanilla js, which means it doesn't depends on any other library.
|
Extract detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model purely from user-agent string with relatively lightweight footprint (~11KB minified / ~4KB gzipped). Written in vanilla js, which means it doesn't depends on any other library.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ Iceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links,
|
|||||||
Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari,
|
Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari,
|
||||||
Mosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet],
|
Mosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet],
|
||||||
PhantomJS, Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser,
|
PhantomJS, Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser,
|
||||||
Swiftfox, Tizen, UCBrowser, Vivaldi, w3m, Yandex
|
Swiftfox, Tizen, UCBrowser, Vivaldi, w3m, WeChat, Yandex
|
||||||
|
|
||||||
# 'browser.version' determined dynamically
|
# 'browser.version' determined dynamically
|
||||||
```
|
```
|
||||||
@@ -191,7 +192,7 @@ console.log('Server running at http://127.0.0.1:1337/');
|
|||||||
### Using requirejs
|
### Using requirejs
|
||||||
|
|
||||||
```js
|
```js
|
||||||
require(['ua-parser'], function(UAParser) {
|
require(['ua-parser-js'], function(UAParser) {
|
||||||
var parser = new UAParser();
|
var parser = new UAParser();
|
||||||
console.log(parser.getResult());
|
console.log(parser.getResult());
|
||||||
});
|
});
|
||||||
@@ -268,7 +269,7 @@ Then submit a pull request to https://github.com/faisalman/ua-parser-js under `d
|
|||||||
|
|
||||||
Dual licensed under GPLv2 & MIT
|
Dual licensed under GPLv2 & MIT
|
||||||
|
|
||||||
Copyright © 2012-2015 Faisal Salman <<fyzlman@gmail.com>>
|
Copyright © 2012-2016 Faisal Salman <<fyzlman@gmail.com>>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* UAParser.js v0.7.10
|
* UAParser.js v0.7.11
|
||||||
* 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
|
||||||
*
|
*
|
||||||
* Copyright © 2012-2015 Faisal Salman <fyzlman@gmail.com>
|
* Copyright © 2012-2016 Faisal Salman <fyzlman@gmail.com>
|
||||||
* Dual licensed under GPLv2 & MIT
|
* Dual licensed under GPLv2 & MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
|
|
||||||
var LIBVERSION = '0.7.10',
|
var LIBVERSION = '0.7.11',
|
||||||
EMPTY = '',
|
EMPTY = '',
|
||||||
UNKNOWN = '?',
|
UNKNOWN = '?',
|
||||||
FUNC_TYPE = 'function',
|
FUNC_TYPE = 'function',
|
||||||
@@ -45,12 +45,15 @@
|
|||||||
|
|
||||||
var util = {
|
var util = {
|
||||||
extend : function (regexes, extensions) {
|
extend : function (regexes, extensions) {
|
||||||
for (var i in extensions) {
|
var margedRegexes = {};
|
||||||
if ("browser cpu device engine os".indexOf(i) !== -1 && extensions[i].length % 2 === 0) {
|
for (var i in regexes) {
|
||||||
regexes[i] = extensions[i].concat(regexes[i]);
|
if (extensions[i] && extensions[i].length % 2 === 0) {
|
||||||
|
margedRegexes[i] = extensions[i].concat(regexes[i]);
|
||||||
|
} else {
|
||||||
|
margedRegexes[i] = regexes[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return regexes;
|
return margedRegexes;
|
||||||
},
|
},
|
||||||
has : function (str1, str2) {
|
has : function (str1, str2) {
|
||||||
if (typeof str1 === "string") {
|
if (typeof str1 === "string") {
|
||||||
@@ -64,6 +67,9 @@
|
|||||||
},
|
},
|
||||||
major : function (version) {
|
major : function (version) {
|
||||||
return typeof(version) === STR_TYPE ? version.split(".")[0] : undefined;
|
return typeof(version) === STR_TYPE ? version.split(".")[0] : undefined;
|
||||||
|
},
|
||||||
|
trim : function (str) {
|
||||||
|
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -233,9 +239,11 @@
|
|||||||
/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet
|
/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet
|
||||||
/(opera).+version\/([\w\.]+)/i, // Opera > 9.80
|
/(opera).+version\/([\w\.]+)/i, // Opera > 9.80
|
||||||
/(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80
|
/(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80
|
||||||
|
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
|
|
||||||
|
/(OPiOS)[\/\s]+([\w\.]+)/i // Opera mini on iphone >= 8.0
|
||||||
|
], [[NAME, 'Opera Mini'], VERSION], [
|
||||||
|
|
||||||
/\s(opr)\/([\w\.]+)/i // Opera Webkit
|
/\s(opr)\/([\w\.]+)/i // Opera Webkit
|
||||||
], [[NAME, 'Opera'], VERSION], [
|
], [[NAME, 'Opera'], VERSION], [
|
||||||
|
|
||||||
@@ -267,10 +275,13 @@
|
|||||||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
||||||
], [[NAME, /_/g, ' '], VERSION], [
|
], [[NAME, /_/g, ' '], VERSION], [
|
||||||
|
|
||||||
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,
|
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia
|
||||||
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
], [NAME, VERSION], [
|
||||||
/(qqbrowser)[\/\s]?([\w\.]+)/i
|
|
||||||
// QQBrowser
|
/(MicroMessenger)\/([\w\.]+)/i // WeChat
|
||||||
|
], [[NAME, 'WeChat'], VERSION], [
|
||||||
|
|
||||||
|
/(qqbrowser)[\/\s]?([\w\.]+)/i // QQBrowser
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
|
|
||||||
/(uc\s?browser)[\/\s]?([\w\.]+)/i,
|
/(uc\s?browser)[\/\s]?([\w\.]+)/i,
|
||||||
@@ -469,6 +480,9 @@
|
|||||||
|
|
||||||
device : [[
|
device : [[
|
||||||
|
|
||||||
|
/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i // HbbTV devices
|
||||||
|
], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [
|
||||||
|
|
||||||
/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i // iPad/PlayBook
|
/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i // iPad/PlayBook
|
||||||
], [MODEL, VENDOR, [TYPE, TABLET]], [
|
], [MODEL, VENDOR, [TYPE, TABLET]], [
|
||||||
|
|
||||||
@@ -480,6 +494,7 @@
|
|||||||
|
|
||||||
/(archos)\s(gamepad2?)/i, // Archos
|
/(archos)\s(gamepad2?)/i, // Archos
|
||||||
/(hp).+(touchpad)/i, // HP TouchPad
|
/(hp).+(touchpad)/i, // HP TouchPad
|
||||||
|
/(hp).+(tablet)/i, // HP Tablet
|
||||||
/(kindle)\/([\w\.]+)/i, // Kindle
|
/(kindle)\/([\w\.]+)/i, // Kindle
|
||||||
/\s(nook)[\w\s]+build\/(\w+)/i, // Nook
|
/\s(nook)[\w\s]+build\/(\w+)/i, // Nook
|
||||||
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak
|
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak
|
||||||
@@ -555,12 +570,12 @@
|
|||||||
/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,
|
/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,
|
||||||
/((SM-T\w+))/i
|
/((SM-T\w+))/i
|
||||||
], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung
|
], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung
|
||||||
/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-n900))/i,
|
/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,
|
||||||
/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,
|
/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,
|
||||||
/sec-((sgh\w+))/i
|
/sec-((sgh\w+))/i
|
||||||
], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [
|
], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [
|
||||||
/(samsung);smarttv/i
|
/hbbtv.+maple;(\d+)/i
|
||||||
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
|
], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [
|
||||||
|
|
||||||
/\(dtv[\);].+(aquos)/i // Sharp
|
/\(dtv[\);].+(aquos)/i // Sharp
|
||||||
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [
|
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [
|
||||||
@@ -599,8 +614,8 @@
|
|||||||
/android.+(mi[\s\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i // Xiaomi Mi
|
/android.+(mi[\s\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i // Xiaomi Mi
|
||||||
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [
|
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/\s(tablet)[;\/\s]/i, // Unidentifiable Tablet
|
/\s(tablet)[;\/]/i, // Unidentifiable Tablet
|
||||||
/\s(mobile)[;\/\s]/i // Unidentifiable Mobile
|
/\s(mobile)[;\/]/i // Unidentifiable Mobile
|
||||||
], [[TYPE, util.lowerize], VENDOR, MODEL]
|
], [[TYPE, util.lowerize], VENDOR, MODEL]
|
||||||
|
|
||||||
/*//////////////////////////
|
/*//////////////////////////
|
||||||
@@ -799,7 +814,6 @@
|
|||||||
ua = uastring;
|
ua = uastring;
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
this.setUA(ua);
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -848,7 +862,7 @@
|
|||||||
} 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("ua-parser-js", [], function () {
|
||||||
return UAParser;
|
return UAParser;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -529,6 +529,16 @@
|
|||||||
"major" : "5"
|
"major" : "5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Opera Mini 8 above on iPhone",
|
||||||
|
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) OPiOS/12.1.1.98980 Mobile/13C75 Safari/9537.53",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Opera Mini",
|
||||||
|
"version" : "12.1.1.98980",
|
||||||
|
"major" : "12"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"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",
|
||||||
@@ -699,6 +709,26 @@
|
|||||||
"major" : "7"
|
"major" : "7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc": "WeChat on iOS",
|
||||||
|
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12H321 MicroMessenger/6.3.6 NetType/WIFI Language/zh_CN",
|
||||||
|
"expect":
|
||||||
|
{
|
||||||
|
"name": "WeChat",
|
||||||
|
"version": "6.3.6",
|
||||||
|
"major": "6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc": "WeChat on Android",
|
||||||
|
"ua": "Mozilla/5.0 (Linux; U; Android 5.1; zh-cn; Lenovo K50-t5 Build/LMY47D) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 MQQBrowser/5.4 TBS/025478 Mobile Safari/533.1 MicroMessenger/6.3.5.50_r1573191.640 NetType/WIFI Language/zh_CN",
|
||||||
|
"expect":
|
||||||
|
{
|
||||||
|
"name": "WeChat",
|
||||||
|
"version": "6.3.5.50_r1573191.640",
|
||||||
|
"major": "6"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Vivaldi",
|
"desc" : "Vivaldi",
|
||||||
"ua" : "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.89 Vivaldi/1.0.83.38 Safari/537.36",
|
"ua" : "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.89 Vivaldi/1.0.83.38 Safari/537.36",
|
||||||
|
|||||||
@@ -99,6 +99,16 @@
|
|||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Philips SmartTV",
|
||||||
|
"ua" : "Opera/9.80 HbbTV/1.1.1 (; Philips; ; ; ; ) NETTV/4.0.2; en) Version/11.60",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Philips",
|
||||||
|
"model" : "",
|
||||||
|
"type" : "smarttv"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Kindle Fire HD",
|
"desc" : "Kindle Fire HD",
|
||||||
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true",
|
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true",
|
||||||
@@ -139,6 +149,36 @@
|
|||||||
"type" : "tablet"
|
"type" : "tablet"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung SmartTV2011",
|
||||||
|
"ua" : "HbbTV/1.1.1 (;;;;;) Maple;2011",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SmartTV2011",
|
||||||
|
"type" : "smarttv"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung SmartTV2012",
|
||||||
|
"ua" : "HbbTV/1.1.1 (;Samsung;SmartTV2012;;;) WebKit",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SmartTV2012",
|
||||||
|
"type" : "smarttv"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung SmartTV2014",
|
||||||
|
"ua" : "HbbTV/1.1.1 (;Samsung;SmartTV2014;T-NT14UDEUC-1060.4;;) WebKit",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SmartTV2014",
|
||||||
|
"type" : "smarttv"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Sony C5303 (Xperia SP)",
|
"desc" : "Sony C5303 (Xperia SP)",
|
||||||
"ua" : "Mozilla/5.0 (Linux; Android 4.3; C5303 Build/12.1.A.1.205) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Mobile Safari/537.36",
|
"ua" : "Mozilla/5.0 (Linux; Android 4.3; C5303 Build/12.1.A.1.205) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Mobile Safari/537.36",
|
||||||
@@ -268,5 +308,56 @@
|
|||||||
"model" : "Galaxy Nexus",
|
"model" : "Galaxy Nexus",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Galaxy S5",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 5.0; SM-G900F Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.78 Mobile Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SM-G900F",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Galaxy S6",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 4.4.2; SM-G920I Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SM-G920I",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Galaxy S6 Edge",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 4.4.2; SM-G925I Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SM-G925I",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Galaxy Note 5 Chrome",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; SM-N920C Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.91 Mobile Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SM-N920C",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
"desc" : "Samsung Galaxy Note 5 Samsung Browser",
|
||||||
|
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-N920C Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "SM-N920C",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "UAParser.js",
|
"title": "UAParser.js",
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"description": "Lightweight JavaScript-based user-agent string parser",
|
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"user-agent",
|
"user-agent",
|
||||||
|
|||||||
Reference in New Issue
Block a user