Compare commits

...

29 Commits

Author SHA1 Message Date
Faisal Salman
10775bd17c Increment build version to 0.7.11 2016-11-07 00:37:33 +07:00
Faisal Salman
c03a84a601 Add WeChat 2016-11-07 00:28:20 +07:00
Faisal Salman
eade7a9355 Merge pull request #167 from philippsimon/hbbtv
Get SmartTV device by HbbTV part
2016-11-07 00:15:10 +07:00
Faisal Salman
4e0aa0b88b Merge pull request #149 from dhcmrlchtdj/wechat
add support for WeChat
2016-11-07 00:11:25 +07:00
Faisal Salman
4e7c662b0b Merge pull request #173 from sueddeutsche/fix/samsung-device-detection
Add generic device detection for samsung smartphones
2016-11-07 00:02:02 +07:00
Faisal Salman
93993dc311 Merge pull request #181 from WebEngage/hp-10-tablet-device
Add device detection for HP 10 tablet
2016-11-06 23:52:34 +07:00
Faisal Salman
55e75dd1b3 Merge pull request #195 from firmfirm/master
Add HTML imports entry-point
2016-11-04 22:54:47 +07:00
Martynas
c71373b666 Add HTML imports entry-point 2016-11-03 19:50:51 +02:00
Faisal Salman
bf4c2e170e Fix #174: "Tablet PC" != tablet device 2016-10-29 00:39:20 +07:00
Faisal Salman
51b8089958 Merge pull request #191 from kennynaoh/master
Add CDNJS version badge in readme
2016-10-22 06:43:57 +07:00
naoh
550420d725 Add CDNJS version badge in readme
This will add the badge to show its version on CDNJS and also link to its page on CDNJS!
2016-10-18 17:10:36 +08:00
Faisal Salman
fbcfe248b8 Merge pull request #172 from fcamblor/patch-1
Fixed require sample in readme
2016-09-29 19:50:50 +07:00
Faisal Salman
2a5cd4d119 Merge pull request #179 from leipert/patch-1
rewrote license field to be SPDX compatible
2016-09-29 19:49:48 +07:00
Lithin
c3f7294a44 Add device detection for HP 10 tablet 2016-05-26 19:01:11 +05:30
Lukas Eipert
b254f93ec1 rewrote license field to be SPDX compatible
According to [NPM docs](https://docs.npmjs.com/files/package.json#license) the `license` field in package.json should be SPDX compatible.

[SPDX](https://spdx.org/licenses/) is a format which allows you to specify your licenses in an easy understandable, machine parseable way.

These changes reflect your license choice according to #1
2016-05-23 11:33:12 +02:00
Benjamin Urban
1020d10a30 Add generic device detection for samsung smartphones 2016-03-22 15:08:11 +01:00
Frédéric Camblor
5ba9fd50ed Fixed require sample in readme
Module name is `ua-parser-js`, not `ua-parser` (see [here](d929c3e508/src/ua-parser.js (L855)))
2016-03-17 18:03:33 +01:00
philippsimon
bb69ef2bd4 Get SmartTV device by HbbTV part 2016-02-26 18:53:43 +01:00
Faisal Salman
3a457f9bd9 Merge pull request #136 from malash/fix/util-extend
Rewrite util.extend to a clone version
2016-02-25 10:54:54 +07:00
Malash
d929c3e508 Merge branch 'master' into fix/util-extend
* master:
  Meteor fixes
  fix it for opera mini 8 above on iphone
  Add name to UA-Parser
  Fix image #150
  Increment build version: 0.7.10
  Check for tablet first
  Fix #153 mistaken Search phrase for Arch OS
  Seems to fix the issue for specific UA found in #159
  UAParser is exposed globally to the window object. It can be used directly.
  Fix detection of Firefox on iOS.
  Added hasOwnProperty check
  Generalize the check for an unidentifiable mobile or tablet to correctly categorize unidentifiable Android smartphones as "mobile".
  travis update: node_js stable, cache node_modules, sudo false
  Detect Nexus 6 as Motorola only.
  Add Playstation 4 support.
  Added Nexus 6 detection
  Added DEVICE regular expressions for "Samsung galaxy S6" and "Samsung Galaxy S6 Edge" devices + test cases
  Adding PhantomJS (http://phantomjs.org/)
  Add Sleipnir
2016-02-22 15:15:09 +08:00
Faisal Salman
1ec2119288 Merge pull request #160 from gryphon/master
Add name to UA-Parser RequireJS module
2016-02-21 22:46:56 +07:00
Faisal Salman
8e46a85549 Merge pull request #162 from cesarve77/patch-1
Meteor fixes
2016-01-07 09:11:13 +07:00
Faisal Salman
1f92d6148c Merge pull request #161 from yupmin/opera-mini-8-above-iphone
fix it for opera mini 8 above on iphone
2016-01-07 09:10:02 +07:00
CESAR RAMOS
5d57850074 Meteor fixes 2016-01-03 21:23:20 -04:30
Yun Young-jin
8e81811dea fix it for opera mini 8 above on iphone
https://dev.opera.com/blog/opera-mini-8-for-ios/
2015-12-30 12:00:33 +09:00
Grigory Dmitrenko
99a80e88fb Add name to UA-Parser 2015-12-23 14:10:37 +03:00
Faisal Salman
cbba2f5728 Fix image #150 2015-12-12 18:26:40 +07:00
niris
2e5dff95c8 add support for wechat 2015-11-03 16:05:37 +08:00
Malash
792dc0246a Rewrite util.extend to a clone version 2015-10-10 15:53:17 +08:00
12 changed files with 250 additions and 121 deletions

View File

@@ -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>"
], ],

View File

@@ -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
View File

@@ -0,0 +1 @@
<script src="./ua-parser.min.js"></script>

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,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");
}); });

View File

@@ -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": "*"
}, },

View File

@@ -4,6 +4,7 @@ Lightweight JavaScript-based User-Agent string parser. Supports browser & node.j
[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master)](https://travis-ci.org/faisalman/ua-parser-js) [![Build Status](https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)
[![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub) [![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)
[![CDNJS](https://img.shields.io/cdnjs/v/UAParser.js.svg)](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.
![It's over 9000](https://pbs.twimg.com/media/A9LpEG6CIAA5VrT.jpg) ![It's over 9000](https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/over9000.jpg)
## 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

View File

@@ -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 {

View File

@@ -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",

View File

@@ -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"
}
} }
] ]

View File

@@ -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",