Compare commits

..

61 Commits

Author SHA1 Message Date
Faisal Salman
01ae611dfa Build dist package 2016-11-14 10:14:01 +07:00
Faisal Salman
2de1f2a75d Remove ComponentJS support 2016-11-14 10:12:49 +07:00
Faisal Salman
975cbdc89e Bumping version: 0.7.11 -> 0.7.12 2016-11-14 10:02:07 +07:00
Faisal Salman
507714c3c7 Move logo to right 2016-11-14 00:42:43 +07:00
Faisal Salman
2b4a20d162 Edit readme 2016-11-14 00:33:56 +07:00
Faisal Salman
34848e8ec2 Fix #187 #171 #92 Require.js 2016-11-11 18:40:26 +07:00
Faisal Salman
97b52b2cfd Test unit for extension 2016-11-11 13:58:15 +07:00
Faisal Salman
9f0419607b Fix #127 galaxy note 2016-11-11 10:40:32 +07:00
Faisal Salman
b13c891d7f Fix #190 haiku 2016-11-11 09:26:59 +07:00
Faisal Salman
7f9919f896 Fix #185 Huawei Nexus 6P 2016-11-10 09:41:16 +07:00
Faisal Salman
9fe7561d78 Fix #96 Moto X 2016-11-10 09:30:04 +07:00
Faisal Salman
b99840d074 Fix #158 xiaomi mi note 2016-11-10 09:24:00 +07:00
Faisal Salman
61b0f1c054 Fix #87 oneplus one 2016-11-10 09:16:17 +07:00
Faisal Salman
58880fda7f Fix #43 #68 xperia sp & asus padfone 2016-11-10 09:11:23 +07:00
Faisal Salman
73735e1ca8 Fix #37 #38 test case for nexus 7 & ipod 2016-11-10 08:57:15 +07:00
Faisal Salman
0f0ea13fab Fix #99 Wrong Windows version 2016-11-10 00:45:48 +07:00
Faisal Salman
1fb82fb6ff Smart-TV ordering 2016-11-10 00:43:20 +07:00
Faisal Salman
88f2f4e24c Fix #32 browser recognized as version 2016-11-10 00:21:28 +07:00
Faisal Salman
1a4dab5829 Edit readme: guide to contribute 2016-11-09 23:41:57 +07:00
Faisal Salman
2467a458e3 Fix #22 #33 #34 #129 Distinguish stock Android Browser from Chrome 2016-11-09 22:37:21 +07:00
Faisal Salman
aadabcce29 Fix #188 Separate Chrome WebView from Chrome 2016-11-09 19:32:20 +07:00
Faisal Salman
d0b7c5892f Samsung smarttv misidentified as mobile 2016-11-09 19:27:41 +07:00
Faisal Salman
d3f959ee28 Split mediaplayer test cases, edit readme 2016-11-09 18:09:11 +07:00
Faisal Salman
d1a33d7d85 Test case for #174 2016-11-08 12:55:56 +07:00
Faisal Salman
3dae55a3c8 Fix #197 microsoft lumia 2016-11-08 12:55:19 +07:00
Faisal Salman
87b88246a2 Merge branch 'master' of github.com:faisalman/ua-parser-js 2016-11-07 21:34:16 +07:00
Faisal Salman
a56c990ec3 Fix #188 distinguish webview from chrome 2016-11-07 21:34:05 +07:00
Faisal Salman
458f3c3cd2 Merge pull request #196 from leventebalogh/patch-1
Fix: don't define the RequireJs module with name
2016-11-07 20:27:24 +07:00
Levente Balogh
f28f87c412 Fix: don't define the RequireJs module with name
If we define it with name it becomes less portable and breaks code that used version `0.7.10`.
This is not correct according to **semver**, as this is a `patch` only which should not break APIs.

I think defining the module with a name should be a responsibility of build tools / optimisation tools.
2016-11-07 10:34:08 +01:00
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
0d42b3a752 Merge pull request #163 from jobrapido/develop
Optimized Android browser regex patterns
2016-02-21 22:47:04 +07: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
Andrea Vaghi
4344c43d04 run build 2016-01-28 11:05:27 +01:00
Andrea Vaghi
909d6fc26d Optimized pattern for Android browser, moved them before the Chrome pattern to avoid errors in the some of the newest browsers 2016-01-28 11:01:05 +01: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
16 changed files with 1146 additions and 1466 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "ua-parser-js", "name": "ua-parser-js",
"version": "0.7.10", "version": "0.7.12",
"authors": [ "authors": [
"Faisal Salman <fyzlman@gmail.com>" "Faisal Salman <fyzlman@gmail.com>"
], ],
@@ -13,31 +13,5 @@
"test", "test",
"tests" "tests"
], ],
"contributors": [
"Faisal Salman <fyzlman@gmail.com>",
"Benjamin Bertrand <bertrand.design@gmail.com>",
"Carl C Von Lewin <carlchristianlewin@gmail.com>",
"Christopher De Cairos <chris.decairos@gmail.com>",
"Davit Barbakadze <jayarjo@gmail.com>",
"Dmitry Tyschenko <dtyschenko@gmail.com>",
"Douglas Li <doug@knotch.it>",
"Dumitru Uzun <duzun@mail.ru>",
"Erik Hesselink <hesselink@gmail.com>",
"Fabian Becker <halfdan@xnorfz.de>",
"Hendrik Helwich <h.helwich@iplabs.de>",
"Jackpoll <jackpoll123456@gmail.com>",
"Jake Mc <startswithaj@users.noreply.github.com>",
"John Tantalo <john.tantalo@gmail.com>",
"John Yanarella <jmy@codecatalyst.com>",
"Jon Buckley <jon@jbuckley.ca>",
"Kendall Buchanan <kendall@kendagriff.com>",
"Lee Treveil <leetreveil@gmail.com>",
"Leonardo <leofiore@libero.it>",
"Max Maurer <maxemanuel.maurer@gmail.com>",
"Michael Hess <mhess@connectify.me>",
"OtakuSiD <otakusid@gmail.com>",
"Ross Noble <rosshnoble@gmail.com>",
"Sandro Sonntag <sandro.sonntag@adorsys.de>"
],
"dependencies": {} "dependencies": {}
} }

View File

@@ -1,24 +0,0 @@
{
"name": "ua-parser-js",
"version": "0.7.10",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [
"user-agent",
"parser",
"browser",
"engine",
"os",
"device",
"cpu"
],
"scripts": [
"src/ua-parser.js"
],
"main": "src/ua-parser.js",
"license": "MIT",
"development": {
"jshint/jshint": "*",
"visionmedia/mocha": "*",
"mishoo/uglifyjs2": "*"
}
}

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.12',
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.12",
"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": [
@@ -63,6 +63,7 @@
"devDependencies": { "devDependencies": {
"jshint": "~1.1.0", "jshint": "~1.1.0",
"mocha": "~1.8.0", "mocha": "~1.8.0",
"requirejs": "^2.3.2",
"uglify-js": "~1.3.4", "uglify-js": "~1.3.4",
"verup": "^1.3.x" "verup": "^1.3.x"
}, },
@@ -70,16 +71,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

@@ -1,21 +1,20 @@
# UAParser.js # UAParser.js
Lightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as jQuery/Zepto plugin, Component/Bower/Meteor package, & RequireJS/AMD module <img align="right" src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/logo.png"> A not-so-lightweight-anymore JavaScript-based User-Agent string parser. Can be used either in browser (client-side) or in node.js (server-side) environment. Also available as jQuery/Zepto plugin, Bower/Meteor package, & RequireJS/AMD module. This library aims to identify detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model, entirely from user-agent string with a relatively small footprint (~11KB when minified / ~4KB gzipped). Written in vanilla JavaScript, which means it doesn't require any other library and can be used independently.
[![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)
[![NPM](https://img.shields.io/npm/v/ua-parser-js.svg)](https://www.npmjs.com/package/ua-parser-js)
[![Bower](https://img.shields.io/bower/v/ua-parser-js.svg)](https://bower.io/)
[![CDNJS](https://img.shields.io/cdnjs/v/UAParser.js.svg)](https://cdnjs.com/libraries/UAParser.js)
[![Gratipay](https://img.shields.io/gratipay/team/UAParser.js.svg)](https://gratipay.com/UAParser.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)
* 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
* Source : https://github.com/faisalman/ua-parser-js * Source : https://github.com/faisalman/ua-parser-js
## Features
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
![It's over 9000](https://pbs.twimg.com/media/A9LpEG6CIAA5VrT.jpg)
## Methods
* `getBrowser()` * `getBrowser()`
* returns `{ name: '', version: '' }` * returns `{ name: '', version: '' }`
@@ -29,7 +28,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
``` ```
@@ -94,7 +93,8 @@ ppc, sparc, sparc64
* `setUA(uastring)` * `setUA(uastring)`
* set & parse UA string * set & parse UA string
## Example
# Example
```html ```html
<!doctype html> <!doctype html>
@@ -167,7 +167,7 @@ ppc, sparc, sparc64
</html> </html>
``` ```
### Using node.js ## Using node.js
```sh ```sh
$ npm install ua-parser-js $ npm install ua-parser-js
@@ -188,34 +188,35 @@ http.createServer(function (req, res) {
console.log('Server running at http://127.0.0.1:1337/'); console.log('Server running at http://127.0.0.1:1337/');
``` ```
### Using requirejs ## Using requirejs
```js ```js
require(['ua-parser'], function(UAParser) { requirejs.config({
baseUrl : 'js/lib', // path to your script directory
paths : {
'ua-parser-js' : 'ua-parser.min'
}
});
requirejs(['ua-parser-js'], function(UAParser) {
var parser = new UAParser(); var parser = new UAParser();
console.log(parser.getResult()); console.log(parser.getResult());
}); });
``` ```
### Using component ## Using bower
```sh
$ component install faisalman/ua-parser-js
```
### Using bower
```sh ```sh
$ bower install ua-parser-js $ bower install ua-parser-js
``` ```
### Using meteor ## Using meteor
```sh ```sh
$ meteor add faisalman:ua-parser-js $ meteor add faisalman:ua-parser-js
``` ```
### Using jQuery/Zepto ($.ua) ## Using jQuery/Zepto ($.ua)
Although written in vanilla js (which means it doesn't depends on jQuery), this library will automatically detect if jQuery/Zepto is present and create `$.ua` object based on browser's user-agent (although in case you need, `window.UAParser` constructor is still present). To get/set user-agent you can use: `$.ua.get()` / `$.ua.set(uastring)`. Although written in vanilla js (which means it doesn't depends on jQuery), this library will automatically detect if jQuery/Zepto is present and create `$.ua` object based on browser's user-agent (although in case you need, `window.UAParser` constructor is still present). To get/set user-agent you can use: `$.ua.get()` / `$.ua.set(uastring)`.
@@ -238,7 +239,7 @@ console.log($.ua.device); // {vendor: "Motorola", model: "Xoom", type:
console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4 console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4
``` ```
### Extending regex patterns ## Extending regex patterns
* `UAParser(uastring[, extensions])` * `UAParser(uastring[, extensions])`
@@ -246,29 +247,44 @@ Pass your own regexes to extend the limited matching rules.
```js ```js
// Example: // Example:
var uaString = 'ownbrowser/1.3'; var uaString = 'MyOwnBrowser/1.3';
var ownBrowser = [[/(ownbrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]]; var myOwnRegex = [[/(myownbrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]];
var parser = new UAParser(uaString, {browser: ownBrowser}); var parser = new UAParser(uaString, { browser: myOwnRegex });
console.log(parser.getBrowser()); // {name: "ownbrowser", version: "1.3"} console.log(parser.getBrowser()); // {name: "MyOwnBrowser", version: "1.3"}
``` ```
## Development
Verify, test, & minify script # Development
## Contribute
* Fork and clone this repository
* Make some changes as required
* Write a unit test to showcase your feature
* Run the test suites to make sure the changes you made didn't break anything
```sh ```sh
$ npm run test $ npm run test
```
* Commit and push to your own repository
* Submit a pull request to this repository under `develop` branch
* Profit?
## Build
Build a minified & packed script
```sh
$ npm run build $ npm run build
``` ```
Then submit a pull request to https://github.com/faisalman/ua-parser-js under `develop` branch.
# License
## License
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.12
* 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.12',
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") {
@@ -63,7 +66,10 @@
return str.toLowerCase(); return str.toLowerCase();
}, },
major : function (version) { major : function (version) {
return typeof(version) === STR_TYPE ? version.split(".")[0] : undefined; return typeof(version) === STR_TYPE ? version.replace(/[^\d\.]/g,'').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,6 +275,19 @@
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon /(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
], [[NAME, /_/g, ' '], VERSION], [ ], [[NAME, /_/g, ' '], VERSION], [
/(micromessenger)\/([\w\.]+)/i // WeChat
], [[NAME, 'WeChat'], VERSION], [
/xiaomi\/miuibrowser\/([\w\.]+)/i // MIUI Browser
], [VERSION, [NAME, 'MIUI Browser']], [
/\swv\).+(chrome)\/([\w\.]+)/i // Chrome WebView
], [[NAME, /(.+)/, '$1 WebView'], VERSION], [
/android.+samsungbrowser\/([\w\.]+)/i,
/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i // Android Browser
], [VERSION, [NAME, 'Android Browser']], [
/(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
/(qqbrowser)[\/\s]?([\w\.]+)/i /(qqbrowser)[\/\s]?([\w\.]+)/i
@@ -275,7 +296,7 @@
/(uc\s?browser)[\/\s]?([\w\.]+)/i, /(uc\s?browser)[\/\s]?([\w\.]+)/i,
/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i, /ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,
/JUC.+(ucweb)[\/\s]?([\w\.]+)/i /juc.+(ucweb)[\/\s]?([\w\.]+)/i
// UCBrowser // UCBrowser
], [[NAME, 'UCBrowser'], VERSION], [ ], [[NAME, 'UCBrowser'], VERSION], [
@@ -285,13 +306,7 @@
/((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS /((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
], [[NAME, 'Chrome'], VERSION], [ ], [[NAME, 'Chrome'], VERSION], [
/XiaoMi\/MiuiBrowser\/([\w\.]+)/i // MIUI Browser /;fbav\/([\w\.]+);/i // Facebook App for iOS
], [VERSION, [NAME, 'MIUI Browser']], [
/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i // Android Browser
], [VERSION, [NAME, 'Android Browser']], [
/FBAV\/([\w\.]+);/i // Facebook App for iOS
], [VERSION, [NAME, 'Facebook']], [ ], [VERSION, [NAME, 'Facebook']], [
/fxios\/([\w\.-]+)/i // Firefox for iOS /fxios\/([\w\.-]+)/i // Firefox for iOS
@@ -480,6 +495,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
@@ -504,7 +520,7 @@
/\(bb10;\s(\w+)/i // BlackBerry 10 /\(bb10;\s(\w+)/i // BlackBerry 10
], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [
// Asus Tablets // Asus Tablets
/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i /android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i
], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [
/(sony)\s(tablet\s[ps])\sbuild\//i, // Sony /(sony)\s(tablet\s[ps])\sbuild\//i, // Sony
@@ -534,10 +550,16 @@
/(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i /(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i
// Alcatel/GeeksPhone/Huawei/Lenovo/Nexian/Panasonic/Sony // Alcatel/GeeksPhone/Huawei/Lenovo/Nexian/Panasonic/Sony
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [ ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [
/(nexus\s9)/i // HTC Nexus 9 /(nexus\s9)/i // HTC Nexus 9
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [
/(nexus\s6p)/i // Huawei Nexus 6P
], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [
/(microsoft);\s(lumia[\s\w]+)/i // Microsoft Lumia
], [VENDOR, MODEL, [TYPE, MOBILE]], [
/[\s\(;](xbox(?:\sone)?)[\s\);]/i // Microsoft Xbox /[\s\(;](xbox(?:\sone)?)[\s\);]/i // Microsoft Xbox
], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [ ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [
/(kin\.[onetw]{3})/i // Microsoft Kin /(kin\.[onetw]{3})/i // Microsoft Kin
@@ -547,23 +569,30 @@
/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i, /\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,
/mot[\s-]?(\w+)*/i, /mot[\s-]?(\w+)*/i,
/(XT\d{3,4}) build\//i, /(XT\d{3,4}) build\//i,
/(nexus\s[6])/i /(nexus\s6)/i
], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [
/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i /android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i
], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [ ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [
/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i, /hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i // HbbTV devices
/((SM-T\w+))/i ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [
], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung
/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-n900))/i, /hbbtv.+maple;(\d+)/i
/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i, ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [
/sec-((sgh\w+))/i
], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [
/(samsung);smarttv/i
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/\(dtv[\);].+(aquos)/i // Sharp /\(dtv[\);].+(aquos)/i // Sharp
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [ ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [
/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,
/((SM-T\w+))/i
], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung
/smart-tv.+(samsung)/i
], [VENDOR, [TYPE, SMARTTV], MODEL], [
/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,
/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,
/sec-((sgh\w+))/i
], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [
/sie-(\w+)*/i // Siemens /sie-(\w+)*/i // Siemens
], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [ ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [
@@ -594,13 +623,16 @@
/android.+;\s(glass)\s\d/i // Google Glass /android.+;\s(glass)\s\d/i // Google Glass
], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [ ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [
/android.+(\w+)\s+build\/hm\1/i, // Xiaomi Hongmi 'numeric' models /android.+(\w+)\s+build\/hm\1/i, // Xiaomi Hongmi 'numeric' models
/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\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i // Xiaomi Mi /android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\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 /android.+a000(1)\s+build/i // OnePlus
/\s(mobile)[;\/\s]/i // Unidentifiable Mobile ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [
/\s(tablet)[;\/]/i, // Unidentifiable Tablet
/\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile
], [[TYPE, util.lowerize], VENDOR, MODEL] ], [[TYPE, util.lowerize], VENDOR, MODEL]
/*////////////////////////// /*//////////////////////////
@@ -656,7 +688,7 @@
], [VENDOR, MODEL, [TYPE, MOBILE]], [ ], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(i-STYLE2.1)/i // i-mobile i-STYLE 2.1 /(i-STYLE2.1)/i // i-mobile i-STYLE 2.1
], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [ ], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [
/(mobiistar touch LAI 512)/i // mobiistar touch LAI 512 /(mobiistar touch LAI 512)/i // mobiistar touch LAI 512
], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [ ], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [
@@ -687,7 +719,8 @@
/microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes) /microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes)
], [NAME, VERSION], [ ], [NAME, VERSION], [
/(windows)\snt\s6\.2;\s(arm)/i, // Windows RT /(windows)\snt\s6\.2;\s(arm)/i, // Windows RT
/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i /(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s]+\w)*/i, // Windows Phone
/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i
], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [ ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [
/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i
], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [ ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [
@@ -714,7 +747,7 @@
// GNU/Linux based // GNU/Linux based
/(mint)[\/\s\(]?(\w+)*/i, // Mint /(mint)[\/\s\(]?(\w+)*/i, // Mint
/(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux /(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux
/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i, /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]+)*/i,
// Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware
// Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus
/(hurd|linux)\s?([\w\.]+)*/i, // Hurd/Linux /(hurd|linux)\s?([\w\.]+)*/i, // Hurd/Linux
@@ -732,6 +765,9 @@
/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly /\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly
], [NAME, VERSION],[ ], [NAME, VERSION],[
/(haiku)\s(\w+)/i // Haiku
], [NAME, VERSION],[
/(ip[honead]+)(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i // iOS /(ip[honead]+)(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i // iOS
], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [ ], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [
@@ -741,7 +777,6 @@
// Other // Other
/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i, // Solaris /((?:open)?solaris)[\/\s-]?([\w\.]+)*/i, // Solaris
/(haiku)\s(\w+)/i, // Haiku
/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, // AIX /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, // AIX
/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i, /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,
// Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS
@@ -799,7 +834,6 @@
ua = uastring; ua = uastring;
return this; return this;
}; };
this.setUA(ua);
return this; return this;
}; };
@@ -858,7 +892,7 @@
} }
// jQuery/Zepto specific (optional) // jQuery/Zepto specific (optional)
// Note: // Note:
// 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.

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,28 @@
[ [
{
"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",
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Android Browser on Galaxy S3",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.4; en-us; SAMSUNG GT-I9300I Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36",
"expect" :
{
"name" : "Android Browser",
"version" : "1.5",
"major" : "1"
}
},
{ {
"desc" : "Android Browser on HTC Flyer (P510E)", "desc" : "Android Browser on HTC Flyer (P510E)",
"ua" : "Mozilla/5.0 (Linux; U; Android 3.2.1; ru-ru; HTC Flyer P510e Build/HTK75C) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", "ua" : "Mozilla/5.0 (Linux; U; Android 3.2.1; ru-ru; HTC Flyer P510e Build/HTK75C) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13",
"expect" : "expect" :
{ {
"name" : "Android Browser", "name" : "Android Browser",
"version" : "4.0", "version" : "4.0",
@@ -12,17 +32,37 @@
{ {
"desc" : "Android Browser on Huawei Honor Glory II (U9508)", "desc" : "Android Browser on Huawei Honor Glory II (U9508)",
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.4; ru-by; HUAWEI U9508 Build/HuaweiU9508) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ACHEETAHI/2100050044", "ua" : "Mozilla/5.0 (Linux; U; Android 4.0.4; ru-by; HUAWEI U9508 Build/HuaweiU9508) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ACHEETAHI/2100050044",
"expect" : "expect" :
{ {
"name" : "Android Browser", "name" : "Android Browser",
"version" : "4.0", "version" : "4.0",
"major" : "4" "major" : "4"
} }
}, },
{
"desc" : "Android Browser on Huawei P8 (H891L)",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.4; HUAWEI H891L Build/HuaweiH891L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36",
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Android Browser on Samsung S6 (SM-G925F)",
"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" :
{
"name" : "Android Browser",
"version" : "3.0",
"major" : "3"
}
},
{ {
"desc" : "Arora", "desc" : "Arora",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-CH) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2", "ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-CH) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2",
"expect" : "expect" :
{ {
"name" : "Arora", "name" : "Arora",
"version" : "0.2", "version" : "0.2",
@@ -32,7 +72,7 @@
{ {
"desc" : "Avant", "desc" : "Avant",
"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",
@@ -42,7 +82,7 @@
{ {
"desc" : "Baidu", "desc" : "Baidu",
"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" : "baidu", "name" : "baidu",
"version" : "1.x", "version" : "1.x",
@@ -52,7 +92,7 @@
{ {
"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",
"expect" : "expect" :
{ {
"name" : "Bolt", "name" : "Bolt",
"version" : "0.862", "version" : "0.862",
@@ -62,7 +102,7 @@
{ {
"desc" : "Camino", "desc" : "Camino",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.0.19) Gecko/2011091218 Camino/2.0.9 (like Firefox/3.0.19)", "ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.0.19) Gecko/2011091218 Camino/2.0.9 (like Firefox/3.0.19)",
"expect" : "expect" :
{ {
"name" : "Camino", "name" : "Camino",
"version" : "2.0.9", "version" : "2.0.9",
@@ -72,7 +112,7 @@
{ {
"desc" : "Chimera", "desc" : "Chimera",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; pl-PL; rv:1.0.1) Gecko/20021111 Chimera/0.6", "ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; pl-PL; rv:1.0.1) Gecko/20021111 Chimera/0.6",
"expect" : "expect" :
{ {
"name" : "Chimera", "name" : "Chimera",
"version" : "0.6", "version" : "0.6",
@@ -82,17 +122,27 @@
{ {
"desc" : "Chrome", "desc" : "Chrome",
"ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6", "ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6",
"expect" : "expect" :
{ {
"name" : "Chrome", "name" : "Chrome",
"version" : "20.0.1090.0", "version" : "20.0.1090.0",
"major" : "20" "major" : "20"
} }
}, },
{
"desc" : "Chrome WebView",
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Mobile Safari/537.36",
"expect" :
{
"name" : "Chrome WebView",
"version" : "43.0.2357.65",
"major" : "43"
}
},
{ {
"desc" : "Chrome on iOS", "desc" : "Chrome on iOS",
"ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3", "ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3",
"expect" : "expect" :
{ {
"name" : "Chrome", "name" : "Chrome",
"version" : "19.0.1084.60", "version" : "19.0.1084.60",
@@ -102,7 +152,7 @@
{ {
"desc" : "Chromium", "desc" : "Chromium",
"ua" : "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.7 (KHTML, like Gecko) Ubuntu/11.10 Chromium/16.0.912.21 Chrome/16.0.912.21 Safari/535.7", "ua" : "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.7 (KHTML, like Gecko) Ubuntu/11.10 Chromium/16.0.912.21 Chrome/16.0.912.21 Safari/535.7",
"expect" : "expect" :
{ {
"name" : "Chromium", "name" : "Chromium",
"version" : "16.0.912.21", "version" : "16.0.912.21",
@@ -112,7 +162,7 @@
{ {
"desc" : "Chrome on Android", "desc" : "Chrome on Android",
"ua" : "Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7", "ua" : "Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7",
"expect" : "expect" :
{ {
"name" : "Chrome", "name" : "Chrome",
"version" : "16.0.912.75", "version" : "16.0.912.75",
@@ -122,7 +172,7 @@
{ {
"desc" : "Dillo", "desc" : "Dillo",
"ua" : "Dillo/2.2", "ua" : "Dillo/2.2",
"expect" : "expect" :
{ {
"name" : "Dillo", "name" : "Dillo",
"version" : "2.2", "version" : "2.2",
@@ -132,7 +182,7 @@
{ {
"desc" : "Dolphin", "desc" : "Dolphin",
"ua" : "Mozilla/5.0 (SCH-F859/F859DG12;U;NUCLEUS/2.1;Profile/MIDP-2.1 Configuration/CLDC-1.1;480*800;CTC/2.0) Dolfin/2.0", "ua" : "Mozilla/5.0 (SCH-F859/F859DG12;U;NUCLEUS/2.1;Profile/MIDP-2.1 Configuration/CLDC-1.1;480*800;CTC/2.0) Dolfin/2.0",
"expect" : "expect" :
{ {
"name" : "Dolphin", "name" : "Dolphin",
"version" : "2.0", "version" : "2.0",
@@ -142,7 +192,7 @@
{ {
"desc" : "Doris", "desc" : "Doris",
"ua" : "Doris/1.15 [en] (Symbian)", "ua" : "Doris/1.15 [en] (Symbian)",
"expect" : "expect" :
{ {
"name" : "Doris", "name" : "Doris",
"version" : "1.15", "version" : "1.15",
@@ -152,17 +202,27 @@
{ {
"desc" : "Epiphany", "desc" : "Epiphany",
"ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6", "ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6",
"expect" : "expect" :
{ {
"name" : "Epiphany", "name" : "Epiphany",
"version" : "1.2.6", "version" : "1.2.6",
"major" : "1" "major" : "1"
} }
}, },
{
"desc" : "Facebook in-App Browser",
"ua" : "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]",
"expect" :
{
"name" : "Chrome WebView",
"version" : "43.0.2357.121",
"major" : "43"
}
},
{ {
"desc" : "Firebird", "desc" : "Firebird",
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 Firebird/0.7", "ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 Firebird/0.7",
"expect" : "expect" :
{ {
"name" : "Firebird", "name" : "Firebird",
"version" : "0.7", "version" : "0.7",
@@ -172,7 +232,7 @@
{ {
"desc" : "Firefox", "desc" : "Firefox",
"ua" : "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2", "ua" : "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2",
"expect" : "expect" :
{ {
"name" : "Firefox", "name" : "Firefox",
"version" : "15.0a2", "version" : "15.0a2",
@@ -182,7 +242,7 @@
{ {
"desc" : "Fennec", "desc" : "Fennec",
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1", "ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
"expect" : "expect" :
{ {
"name" : "Fennec", "name" : "Fennec",
"version" : "1.0a1", "version" : "1.0a1",
@@ -192,7 +252,7 @@
{ {
"desc" : "Flock", "desc" : "Flock",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008100716 Firefox/3.0.3 Flock/2.0", "ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008100716 Firefox/3.0.3 Flock/2.0",
"expect" : "expect" :
{ {
"name" : "Flock", "name" : "Flock",
"version" : "2.0", "version" : "2.0",
@@ -202,7 +262,7 @@
{ {
"desc" : "GoBrowser", "desc" : "GoBrowser",
"ua" : "Nokia5700XpressMusic/GoBrowser/1.6.91", "ua" : "Nokia5700XpressMusic/GoBrowser/1.6.91",
"expect" : "expect" :
{ {
"name" : "GoBrowser", "name" : "GoBrowser",
"version" : "1.6.91", "version" : "1.6.91",
@@ -212,7 +272,7 @@
{ {
"desc" : "IceApe", "desc" : "IceApe",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.19) Gecko/20110817 Iceape/2.0.14", "ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.19) Gecko/20110817 Iceape/2.0.14",
"expect" : "expect" :
{ {
"name" : "Iceape", "name" : "Iceape",
"version" : "2.0.14", "version" : "2.0.14",
@@ -222,7 +282,7 @@
{ {
"desc" : "IceCat", "desc" : "IceCat",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092921 IceCat/3.0.3-g1", "ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092921 IceCat/3.0.3-g1",
"expect" : "expect" :
{ {
"name" : "IceCat", "name" : "IceCat",
"version" : "3.0.3-g1", "version" : "3.0.3-g1",
@@ -232,7 +292,7 @@
{ {
"desc" : "Iceweasel", "desc" : "Iceweasel",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3)", "ua" : "Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3)",
"expect" : "expect" :
{ {
"name" : "Iceweasel", "name" : "Iceweasel",
"version" : "3.0.6", "version" : "3.0.6",
@@ -242,7 +302,7 @@
{ {
"desc" : "iCab", "desc" : "iCab",
"ua" : "iCab/2.9.5 (Macintosh; U; PPC; Mac OS X)", "ua" : "iCab/2.9.5 (Macintosh; U; PPC; Mac OS X)",
"expect" : "expect" :
{ {
"name" : "iCab", "name" : "iCab",
"version" : "2.9.5", "version" : "2.9.5",
@@ -252,7 +312,7 @@
{ {
"desc" : "IEMobile", "desc" : "IEMobile",
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11) 320x240; VZW; Motorola-Q9c; Windows Mobile 6.1 Standard", "ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11) 320x240; VZW; Motorola-Q9c; Windows Mobile 6.1 Standard",
"expect" : "expect" :
{ {
"name" : "IEMobile", "name" : "IEMobile",
"version" : "7.11", "version" : "7.11",
@@ -262,7 +322,7 @@
{ {
"desc" : "IE 11 with IE token", "desc" : "IE 11 with IE token",
"ua" : "Mozilla/5.0 (IE 11.0; Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko", "ua" : "Mozilla/5.0 (IE 11.0; Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko",
"expect" : "expect" :
{ {
"name" : "IE", "name" : "IE",
"version" : "11.0", "version" : "11.0",
@@ -272,7 +332,7 @@
{ {
"desc" : "IE 11 without IE token", "desc" : "IE 11 without IE token",
"ua" : "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko", "ua" : "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko",
"expect" : "expect" :
{ {
"name" : "IE", "name" : "IE",
"version" : "11.0", "version" : "11.0",
@@ -282,7 +342,7 @@
{ {
"desc" : "K-Meleon", "desc" : "K-Meleon",
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2", "ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2",
"expect" : "expect" :
{ {
"name" : "K-Meleon", "name" : "K-Meleon",
"version" : "0.8.2", "version" : "0.8.2",
@@ -292,17 +352,17 @@
{ {
"desc" : "Kindle Browser", "desc" : "Kindle Browser",
"ua" : "Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)", "ua" : "Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)",
"expect" : "expect" :
{ {
"name" : "Kindle", "name" : "Kindle",
"version" : "2.5", "version" : "2.5",
"major" : "2" "major" : "2"
} }
}, },
{ {
"desc" : "Konqueror", "desc" : "Konqueror",
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu)", "ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu)",
"expect" : "expect" :
{ {
"name" : "Konqueror", "name" : "Konqueror",
"version" : "3.5", "version" : "3.5",
@@ -312,7 +372,7 @@
{ {
"desc" : "Lunascape", "desc" : "Lunascape",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090804 Firefox/3.5.2 Lunascape/5.1.4.5", "ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090804 Firefox/3.5.2 Lunascape/5.1.4.5",
"expect" : "expect" :
{ {
"name" : "Lunascape", "name" : "Lunascape",
"version" : "5.1.4.5", "version" : "5.1.4.5",
@@ -322,7 +382,7 @@
{ {
"desc" : "Lynx", "desc" : "Lynx",
"ua" : "Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b", "ua" : "Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b",
"expect" : "expect" :
{ {
"name" : "Lynx", "name" : "Lynx",
"version" : "2.8.5dev.16", "version" : "2.8.5dev.16",
@@ -332,7 +392,7 @@
{ {
"desc" : "Maemo Browser", "desc" : "Maemo Browser",
"ua" : "Mozilla/5.0 (X11; U; Linux armv7l; ru-RU; rv:1.9.2.3pre) Gecko/20100723 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900", "ua" : "Mozilla/5.0 (X11; U; Linux armv7l; ru-RU; rv:1.9.2.3pre) Gecko/20100723 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900",
"expect" : "expect" :
{ {
"name" : "Maemo Browser", "name" : "Maemo Browser",
"version" : "1.7.4.8", "version" : "1.7.4.8",
@@ -342,7 +402,7 @@
{ {
"desc" : "Maxthon", "desc" : "Maxthon",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)", "ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)",
"expect" : "expect" :
{ {
"name" : "Maxthon", "name" : "Maxthon",
"version" : "undefined", "version" : "undefined",
@@ -352,7 +412,7 @@
{ {
"desc" : "Midori", "desc" : "Midori",
"ua" : "Midori/0.2.2 (X11; Linux i686; U; en-us) WebKit/531.2+", "ua" : "Midori/0.2.2 (X11; Linux i686; U; en-us) WebKit/531.2+",
"expect" : "expect" :
{ {
"name" : "Midori", "name" : "Midori",
"version" : "0.2.2", "version" : "0.2.2",
@@ -362,7 +422,7 @@
{ {
"desc" : "Minimo", "desc" : "Minimo",
"ua" : "Mozilla/5.0 (X11; U; Linux armv6l; rv 1.8.1.5pre) Gecko/20070619 Minimo/0.020", "ua" : "Mozilla/5.0 (X11; U; Linux armv6l; rv 1.8.1.5pre) Gecko/20070619 Minimo/0.020",
"expect" : "expect" :
{ {
"name" : "Minimo", "name" : "Minimo",
"version" : "0.020", "version" : "0.020",
@@ -372,7 +432,7 @@
{ {
"desc" : "MIUI Browser on Xiaomi Hongmi WCDMA (HM2013023)", "desc" : "MIUI Browser on Xiaomi Hongmi WCDMA (HM2013023)",
"ua" : "Mozilla/5.0 (Linux; U; Android 4.2.2; ru-ru; 2013023 Build/HM2013023) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 XiaoMi/MiuiBrowser/1.0", "ua" : "Mozilla/5.0 (Linux; U; Android 4.2.2; ru-ru; 2013023 Build/HM2013023) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 XiaoMi/MiuiBrowser/1.0",
"expect" : "expect" :
{ {
"name" : "MIUI Browser", "name" : "MIUI Browser",
"version" : "1.0", "version" : "1.0",
@@ -382,7 +442,7 @@
{ {
"desc" : "Mobile Safari", "desc" : "Mobile Safari",
"ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7", "ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7",
"expect" : "expect" :
{ {
"name" : "Mobile Safari", "name" : "Mobile Safari",
"version" : "4.0.5", "version" : "4.0.5",
@@ -392,7 +452,7 @@
{ {
"desc" : "Mosaic", "desc" : "Mosaic",
"ua" : "NCSA_Mosaic/2.6 (X11; SunOS 4.1.3 sun4m)", "ua" : "NCSA_Mosaic/2.6 (X11; SunOS 4.1.3 sun4m)",
"expect" : "expect" :
{ {
"name" : "Mosaic", "name" : "Mosaic",
"version" : "2.6", "version" : "2.6",
@@ -402,7 +462,7 @@
{ {
"desc" : "Mozilla", "desc" : "Mozilla",
"ua" : "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20070606", "ua" : "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20070606",
"expect" : "expect" :
{ {
"name" : "Mozilla", "name" : "Mozilla",
"version" : "5.0", "version" : "5.0",
@@ -412,7 +472,7 @@
{ {
"desc" : "MSIE", "desc" : "MSIE",
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)", "ua" : "Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)",
"expect" : "expect" :
{ {
"name" : "IE", "name" : "IE",
"version" : "5.0b1", "version" : "5.0b1",
@@ -422,7 +482,7 @@
{ {
"desc" : "NetFront", "desc" : "NetFront",
"ua" : "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0", "ua" : "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0",
"expect" : "expect" :
{ {
"name" : "NetFront", "name" : "NetFront",
"version" : "3.0", "version" : "3.0",
@@ -432,7 +492,7 @@
{ {
"desc" : "Netscape on Windows ME", "desc" : "Netscape on Windows ME",
"ua" : "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8.1.8pre) Gecko/20071015 Firefox/2.0.0.7 Navigator/9.0", "ua" : "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8.1.8pre) Gecko/20071015 Firefox/2.0.0.7 Navigator/9.0",
"expect" : "expect" :
{ {
"name" : "Netscape", "name" : "Netscape",
"version" : "9.0", "version" : "9.0",
@@ -442,7 +502,7 @@
{ {
"desc" : "Netscape on Windows 2000", "desc" : "Netscape on Windows 2000",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1", "ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1",
"expect" : "expect" :
{ {
"name" : "Netscape", "name" : "Netscape",
"version" : "8.0.1", "version" : "8.0.1",
@@ -452,7 +512,7 @@
{ {
"desc" : "Nokia Browser", "desc" : "Nokia Browser",
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaN8-00/025.007; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba", "ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaN8-00/025.007; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba",
"expect" : "expect" :
{ {
"name" : "NokiaBrowser", "name" : "NokiaBrowser",
"version" : "7.3.1.37", "version" : "7.3.1.37",
@@ -462,7 +522,7 @@
{ {
"desc" : "OmniWeb", "desc" : "OmniWeb",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.48", "ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.48",
"expect" : "expect" :
{ {
"name" : "OmniWeb", "name" : "OmniWeb",
"version" : "558.48", "version" : "558.48",
@@ -472,7 +532,7 @@
{ {
"desc" : "Opera > 9.80", "desc" : "Opera > 9.80",
"ua" : "Opera/9.80 (X11; Linux x86_64; U; Linux Mint; en) Presto/2.2.15 Version/10.10", "ua" : "Opera/9.80 (X11; Linux x86_64; U; Linux Mint; en) Presto/2.2.15 Version/10.10",
"expect" : "expect" :
{ {
"name" : "Opera", "name" : "Opera",
"version" : "10.10", "version" : "10.10",
@@ -482,7 +542,7 @@
{ {
"desc" : "Opera < 9.80 on Windows", "desc" : "Opera < 9.80 on Windows",
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.01 [en]", "ua" : "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.01 [en]",
"expect" : "expect" :
{ {
"name" : "Opera", "name" : "Opera",
"version" : "6.01", "version" : "6.01",
@@ -492,7 +552,7 @@
{ {
"desc" : "Opera < 9.80 on OSX", "desc" : "Opera < 9.80 on OSX",
"ua" : "Opera/8.5 (Macintosh; PPC Mac OS X; U; en)", "ua" : "Opera/8.5 (Macintosh; PPC Mac OS X; U; en)",
"expect" : "expect" :
{ {
"name" : "Opera", "name" : "Opera",
"version" : "8.5", "version" : "8.5",
@@ -502,7 +562,7 @@
{ {
"desc" : "Opera Mobile", "desc" : "Opera Mobile",
"ua" : "Opera/9.80 (Android 2.3.5; Linux; Opera Mobi/ADR-1111101157; U; de) Presto/2.9.201 Version/11.50", "ua" : "Opera/9.80 (Android 2.3.5; Linux; Opera Mobi/ADR-1111101157; U; de) Presto/2.9.201 Version/11.50",
"expect" : "expect" :
{ {
"name" : "Opera Mobi", "name" : "Opera Mobi",
"version" : "11.50", "version" : "11.50",
@@ -512,7 +572,7 @@
{ {
"desc" : "Opera Webkit", "desc" : "Opera Webkit",
"ua" : "Mozilla/5.0 AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.123 Mobile Safari/537.22 OPR/14.0.1025.52315", "ua" : "Mozilla/5.0 AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.123 Mobile Safari/537.22 OPR/14.0.1025.52315",
"expect" : "expect" :
{ {
"name" : "Opera", "name" : "Opera",
"version" : "14.0.1025.52315", "version" : "14.0.1025.52315",
@@ -522,17 +582,27 @@
{ {
"desc" : "Opera Mini", "desc" : "Opera Mini",
"ua" : "Opera/9.80 (J2ME/MIDP; Opera Mini/5.1.21214/19.916; U; en) Presto/2.5.25", "ua" : "Opera/9.80 (J2ME/MIDP; Opera Mini/5.1.21214/19.916; U; en) Presto/2.5.25",
"expect" : "expect" :
{ {
"name" : "Opera Mini", "name" : "Opera Mini",
"version" : "5.1.21214", "version" : "5.1.21214",
"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",
"expect" : "expect" :
{ {
"name" : "Opera Tablet", "name" : "Opera Tablet",
"version" : "11.1", "version" : "11.1",
@@ -552,7 +622,7 @@
{ {
"desc" : "Phoenix", "desc" : "Phoenix",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4", "ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4",
"expect" : "expect" :
{ {
"name" : "Phoenix", "name" : "Phoenix",
"version" : "0.4", "version" : "0.4",
@@ -562,7 +632,7 @@
{ {
"desc" : "Polaris", "desc" : "Polaris",
"ua" : "LG-LX600 Polaris/6.0 MMP/2.0 Profile/MIDP-2.1 Configuration/CLDC-1.1", "ua" : "LG-LX600 Polaris/6.0 MMP/2.0 Profile/MIDP-2.1 Configuration/CLDC-1.1",
"expect" : "expect" :
{ {
"name" : "Polaris", "name" : "Polaris",
"version" : "6.0", "version" : "6.0",
@@ -572,7 +642,7 @@
{ {
"desc" : "RockMelt", "desc" : "RockMelt",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) RockMelt/0.8.36.78 Chrome/7.0.517.44 Safari/534.7", "ua" : "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) RockMelt/0.8.36.78 Chrome/7.0.517.44 Safari/534.7",
"expect" : "expect" :
{ {
"name" : "RockMelt", "name" : "RockMelt",
"version" : "0.8.36.78", "version" : "0.8.36.78",
@@ -582,7 +652,7 @@
{ {
"desc" : "Safari", "desc" : "Safari",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8", "ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8",
"expect" : "expect" :
{ {
"name" : "Safari", "name" : "Safari",
"version" : "5.0.1", "version" : "5.0.1",
@@ -592,7 +662,7 @@
{ {
"desc" : "Safari < 3.0", "desc" : "Safari < 3.0",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3", "ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3",
"expect" : "expect" :
{ {
"name" : "Safari", "name" : "Safari",
"version" : "2.0.4", "version" : "2.0.4",
@@ -602,7 +672,7 @@
{ {
"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",
"expect" : "expect" :
{ {
"name" : "SeaMonkey", "name" : "SeaMonkey",
"version" : "2.0b1pre", "version" : "2.0b1pre",
@@ -612,7 +682,7 @@
{ {
"desc" : "Silk Browser", "desc" : "Silk Browser",
"ua" : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84)", "ua" : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84)",
"expect" : "expect" :
{ {
"name" : "Silk", "name" : "Silk",
"version" : "1.1.0-84", "version" : "1.1.0-84",
@@ -622,7 +692,7 @@
{ {
"desc" : "Skyfire", "desc" : "Skyfire",
"ua" : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17 Skyfire/2.0", "ua" : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17 Skyfire/2.0",
"expect" : "expect" :
{ {
"name" : "Skyfire", "name" : "Skyfire",
"version" : "2.0", "version" : "2.0",
@@ -632,7 +702,7 @@
{ {
"desc" : "SlimBrowser", "desc" : "SlimBrowser",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SlimBrowser)", "ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SlimBrowser)",
"expect" : "expect" :
{ {
"name" : "Slim", "name" : "Slim",
"version" : "undefined", "version" : "undefined",
@@ -642,7 +712,7 @@
{ {
"desc" : "Swiftfox", "desc" : "Swiftfox",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)", "ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)",
"expect" : "expect" :
{ {
"name" : "Swiftfox", "name" : "Swiftfox",
"version" : "undefined", "version" : "undefined",
@@ -652,7 +722,7 @@
{ {
"desc" : "Tizen Browser", "desc" : "Tizen Browser",
"ua" : "Mozilla/5.0 (Linux; U; Tizen/1.0 like Android; en-us; AppleWebKit/534.46 (KHTML, like Gecko) Tizen Browser/1.0 Mobile", "ua" : "Mozilla/5.0 (Linux; U; Tizen/1.0 like Android; en-us; AppleWebKit/534.46 (KHTML, like Gecko) Tizen Browser/1.0 Mobile",
"expect" : "expect" :
{ {
"name" : "Tizen Browser", "name" : "Tizen Browser",
"version" : "1.0", "version" : "1.0",
@@ -662,7 +732,7 @@
{ {
"desc" : "UC Browser on Samsung", "desc" : "UC Browser on Samsung",
"ua" : "Mozilla/5.0 (Java; U; Pt-br; samsung-gt-s5620) UCBrowser8.2.1.144/69/352/UCWEB Mobile UNTRUSTED/1.0", "ua" : "Mozilla/5.0 (Java; U; Pt-br; samsung-gt-s5620) UCBrowser8.2.1.144/69/352/UCWEB Mobile UNTRUSTED/1.0",
"expect" : "expect" :
{ {
"name" : "UCBrowser", "name" : "UCBrowser",
"version" : "8.2.1.144", "version" : "8.2.1.144",
@@ -672,7 +742,7 @@
{ {
"desc" : "UC Browser on Nokia", "desc" : "UC Browser on Nokia",
"ua" : "Mozilla/5.0 (S60V3; U; en-in; NokiaN73)/UC Browser8.4.0.159/28/351/UCWEB Mobile", "ua" : "Mozilla/5.0 (S60V3; U; en-in; NokiaN73)/UC Browser8.4.0.159/28/351/UCWEB Mobile",
"expect" : "expect" :
{ {
"name" : "UCBrowser", "name" : "UCBrowser",
"version" : "8.4.0.159", "version" : "8.4.0.159",
@@ -682,7 +752,7 @@
{ {
"desc" : "UC Browser J2ME", "desc" : "UC Browser J2ME",
"ua" : "UCWEB/2.0 (MIDP-2.0; U; zh-CN; HTC EVO 3D X515m) U2/1.0.0 UCBrowser/10.4.0.558 U2/1.0.0 Mobile", "ua" : "UCWEB/2.0 (MIDP-2.0; U; zh-CN; HTC EVO 3D X515m) U2/1.0.0 UCBrowser/10.4.0.558 U2/1.0.0 Mobile",
"expect" : "expect" :
{ {
"name" : "UCBrowser", "name" : "UCBrowser",
"version" : "10.4.0.558", "version" : "10.4.0.558",
@@ -692,17 +762,37 @@
{ {
"desc" : "UC Browser J2ME 2", "desc" : "UC Browser J2ME 2",
"ua" : "JUC (Linux; U; 2.3.5; zh-cn; GT-I9100; 480*800) UCWEB7.9.0.94/139/800", "ua" : "JUC (Linux; U; 2.3.5; zh-cn; GT-I9100; 480*800) UCWEB7.9.0.94/139/800",
"expect" : "expect" :
{ {
"name" : "UCBrowser", "name" : "UCBrowser",
"version" : "7.9.0.94", "version" : "7.9.0.94",
"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",
"expect" : "expect" :
{ {
"name" : "Vivaldi", "name" : "Vivaldi",
"version" : "1.0.83.38", "version" : "1.0.83.38",
@@ -712,7 +802,7 @@
{ {
"desc" : "Yandex", "desc" : "Yandex",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5402 Safari/536.5", "ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5402 Safari/536.5",
"expect" : "expect" :
{ {
"name" : "Yandex", "name" : "Yandex",
"version" : "1.0.1084.5402", "version" : "1.0.1084.5402",
@@ -722,7 +812,7 @@
{ {
"desc" : "Microsoft Edge", "desc" : "Microsoft Edge",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0", "ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0",
"expect" : "expect" :
{ {
"name" : "Edge", "name" : "Edge",
"version" : "12.0", "version" : "12.0",

View File

@@ -1,4 +1,34 @@
[ [
{
"desc" : "Asus Nexus 7",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 7 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36",
"expect" :
{
"vendor" : "Asus",
"model" : "Nexus 7",
"type" : "tablet"
}
},
{
"desc" : "Asus Padfone",
"ua" : "Mozilla/5.0 (Linux; Android 4.1.1; PadFone 2 Build/JRO03L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.117 Safari/537.36",
"expect" :
{
"vendor" : "Asus",
"model" : "PadFone",
"type" : "tablet"
}
},
{
"desc" : "Desktop (IE11 with Tablet string)",
"ua" : "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; GWX:MANAGED; rv:11.0) like Gecko",
"expect" :
{
"vendor" : "undefined",
"model" : "undefined",
"type" : "undefined"
}
},
{ {
"desc" : "HTC Evo Shift 4G", "desc" : "HTC Evo Shift 4G",
"ua" : "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0", "ua" : "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0",
@@ -19,6 +49,26 @@
"type" : "tablet" "type" : "tablet"
} }
}, },
{
"desc" : "Huawei Nexus 6P",
"ua" : "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 6P Build/MTC19V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537",
"expect" :
{
"vendor" : "Huawei",
"model" : "Nexus 6P",
"type" : "mobile"
}
},
{
"desc" : "iPod",
"ua" : "Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53",
"expect" :
{
"vendor" : "Apple",
"model" : "iPod touch",
"type" : "mobile"
}
},
{ {
"desc" : "LG Nexus 4", "desc" : "LG Nexus 4",
"ua" : "Mozilla/5.0 (Linux; Android 4.2.1; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19", "ua" : "Mozilla/5.0 (Linux; Android 4.2.1; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19",
@@ -39,6 +89,26 @@
"type" : "mobile" "type" : "mobile"
} }
}, },
{
"desc" : "Microsoft Lumia 950",
"ua" : "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586",
"expect" :
{
"vendor" : "Microsoft",
"model" : "Lumia 950",
"type" : "mobile"
}
},
{
"desc" : "Motorola Moto X",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.4; XT1097 Build/KXE21.187-38) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36",
"expect" :
{
"vendor" : "Motorola",
"model" : "XT1097",
"type" : "mobile"
}
},
{ {
"desc" : "Motorola Nexus 6", "desc" : "Motorola Nexus 6",
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.20 Mobile Safari/537.36", "ua" : "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.20 Mobile Safari/537.36",
@@ -99,6 +169,26 @@
"type" : "mobile" "type" : "mobile"
} }
}, },
{
"desc" : "OnePlus One",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.4; A0001 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36",
"expect" :
{
"vendor" : "OnePlus",
"model" : "1",
"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",
@@ -109,6 +199,16 @@
"type" : "tablet" "type" : "tablet"
} }
}, },
{
"desc" : "Samsung Galaxy Note 8",
"ua" : "Mozilla/5.0 (Linux; Android 4.2.2; GT-N5100 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.141 Safari/537.36",
"expect" :
{
"vendor" : "Samsung",
"model" : "GT-N5100",
"type" : "tablet"
}
},
{ {
"desc" : "Samsung SM-T231", "desc" : "Samsung SM-T231",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.2; SM-T231 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36", "ua" : "Mozilla/5.0 (Linux; Android 4.4.2; SM-T231 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",
@@ -139,6 +239,46 @@
"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" : "Samsung SmartTV",
"ua" : "Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1",
"expect" :
{
"vendor" : "Samsung",
"model" : "undefined",
"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",
@@ -179,6 +319,16 @@
"type" : "mobile" "type" : "mobile"
} }
}, },
{
"desc" : "Sony Xperia SP",
"ua" : "Mozilla/5.0 (Linux; Android 4.3; C5302 Build/12.1.A.1.201) AppleWebkit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36",
"expect" :
{
"vendor" : "Sony",
"model" : "Xperia Phone",
"type" : "mobile"
}
},
{ {
"desc" : "Sony SGP521 (Xperia Z2 Tablet)", "desc" : "Sony SGP521 (Xperia Z2 Tablet)",
"ua" : "Mozilla/5.0 (Linux; Android 4.4; SGP521 Build/17.1.A.0.432) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36", "ua" : "Mozilla/5.0 (Linux; Android 4.4; SGP521 Build/17.1.A.0.432) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36",
@@ -239,6 +389,16 @@
"type" : "mobile" "type" : "mobile"
} }
}, },
{
"desc" : "Xiaomi Mi Note",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.4; MI NOTE LTE Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36",
"expect" :
{
"vendor" : "Xiaomi",
"model" : "MI NOTE LTE",
"type" : "mobile"
}
},
{ {
"desc" : "Xiaomi Mi One Plus", "desc" : "Xiaomi Mi One Plus",
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; MI-ONE Plus Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "ua" : "Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; MI-ONE Plus Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
@@ -268,5 +428,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"
}
} }
] ]

582
test/mediaplayer-test.json Normal file
View File

@@ -0,0 +1,582 @@
[
{
"desc" : "Coremedia",
"ua" : "Apple Mac OS X v10.6.4 CoreMedia v1.0.0.10F2108",
"expect" :
{
"name" : "CoreMedia",
"version" : "1.0.0.10F2108",
"major" : "1"
}
},
{
"desc" : "AppleCoreMedia",
"ua" : "AppleCoreMedia/1.0.0.10A403 (iPad; U; CPU OS 6_0 like Mac OS X; it_it)",
"expect" :
{
"name" : "AppleCoreMedia",
"version" : "1.0.0.10A403",
"major" : "1"
}
},
{
"desc" : "AppleTv",
"ua" : "AppleTV/3.0.2 (Macintosh; Intel Mac OS X 10.4.7) AppleWebKit/528.18",
"expect" :
{
"name" : "WebKit",
"version" : "528.18",
"major" : "528"
}
},
{
"desc" : "Aqualung",
"ua" : "Aqualung/R-1114",
"expect" :
{
"name" : "Aqualung",
"version" : "R-1114",
"major" : "undefined"
}
},
{
"desc" : "Ares",
"ua" : "Ares 2.2.4.3048",
"expect" :
{
"name" : "Ares",
"version" : "2.2.4.3048",
"major" : "2"
}
},
{
"desc" : "Audacious",
"ua" : "Audacious/3.2.2 neon/0.29.3",
"expect" :
{
"name" : "Audacious",
"version" : "3.2.2",
"major" : "3"
}
},
{
"desc" : "AudiMusicStream",
"ua" : "AudiMusicStream/3020.130826151911",
"expect" :
{
"name" : "AudiMusicStream",
"version" : "3020.130826151911",
"major" : "3020"
}
},
{
"desc" : "BASS",
"ua" : "BASS/2.4",
"expect" :
{
"name" : "BASS",
"version" : "2.4",
"major" : "2"
}
},
{
"desc" : "BSPlayer",
"ua" : "BSPlayer/2",
"expect" :
{
"name" : "BSPlayer",
"version" : "2",
"major" : "2"
}
},
{
"desc" : "Core",
"ua" : "CORE/6.506.4.1",
"expect" :
{
"name" : "CORE",
"version" : "6.506.4.1",
"major" : "6"
}
},
{
"desc" : "Clementine",
"ua" : "Clementine 1.1",
"expect" :
{
"name" : "Clementine",
"version" : "1.1",
"major" : "1"
}
},
{
"desc" : "Dalvik",
"ua" : "Dalvik/1.2.0 (Linux; U; Android 2.2.1; GT-S5830L Build/FROYO)",
"expect" :
{
"name" : "Dalvik",
"version" : "1.2.0",
"major" : "1"
}
},
{
"desc" : "NexPlayer",
"ua" : "E97510d/ Player/NexPlayer 4.0",
"expect" :
{
"name" : "NexPlayer",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "FLRP",
"ua" : "FLRP/2.5 CFNetwork/609.1.4 Darwin/13.0.0",
"expect" :
{
"name" : "Flip Player",
"version" : "2.5",
"major" : "2"
}
},
{
"desc" : "FStream",
"ua" : "FStream",
"expect" :
{
"name" : "FStream",
"version" : "undefined",
"major" : "undefined"
}
},
{
"desc" : "GStreamer",
"ua" : "GStreamer souphttpsrc (compatible; LG NetCast.TV-2012) libsoup/2.34.2",
"expect" :
{
"name" : "GStreamer",
"version" : "2.34.2",
"major" : "2"
}
},
{
"desc" : "GnomeMplayer",
"ua" : "GnomeMplayer/1.0.2",
"expect" :
{
"name" : "GnomeMplayer",
"version" : "1.0.2",
"major" : "1"
}
},
{
"desc" : "HTC Streaming Player",
"ua" : "HTC Streaming Player htc_asia_wwe / 1.0 / endeavoru / 4.1.1",
"expect" :
{
"name" : "HTC Streaming Player",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "HTC One S",
"ua" : "HTC_One_S/3.16.111.10",
"expect" :
{
"name" : "HTC One S",
"version" : "3.16.111.10",
"major" : "3"
}
},
{
"desc" : "Java",
"ua" : "Java/1.4.1_04",
"expect" :
{
"name" : "Java",
"version" : "1.4.1_04",
"major" : "1"
}
},
{
"desc" : "LG Player",
"ua" : "LG Player 1.0; Android",
"expect" :
{
"name" : "LG Player",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "NexPlayer",
"ua" : "LG-P700/V10k-DEC-12-2012 Player/NexPlayer 4.0 for Android",
"expect" :
{
"name" : "NexPlayer",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "LG Player",
"ua" : "LGE400/V10b Player/LG Player 1.0",
"expect" :
{
"name" : "LG Player",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "Lavf",
"ua" : "Lavf52.111.0",
"expect" :
{
"name" : "Lavf",
"version" : "52.111.0",
"major" : "52"
}
},
{
"desc" : "Lyssna",
"ua" : "Lyssna/46 CFNetwork/609.1.4 Darwin/13.0.0",
"expect" :
{
"name" : "Lyssna",
"version" : "46",
"major" : "46"
}
},
{
"desc" : "MPlayer",
"ua" : "MPlayer 1.1-4.2.1",
"expect" :
{
"name" : "MPlayer",
"version" : "1.1-4.2.1",
"major" : ""
}
},
{
"desc" : "MPlayer SVN",
"ua" : "MPlayer SVN-r33713-4.6.1",
"expect" :
{
"name" : "MPlayer",
"version" : "r33713-4.6.1",
"major" : "undefined"
}
},
{
"desc" : "MPlayer ubuntu",
"ua" : "MPlayer svn r34540 (Ubuntu), built with gcc-4.6",
"expect" :
{
"name" : "MPlayer",
"version" : "r34540",
"major" : "undefined"
}
},
{
"desc" : "MoC",
"ua" : "Music On Console/2.5.0-beta1",
"expect" :
{
"name" : "Music On Console",
"version" : "2.5.0-beta1",
"major" : "2"
}
},
{
"desc" : "MPD",
"ua" : "Music Player Daemon 0.17.4",
"expect" :
{
"name" : "Music Player Daemon",
"version" : "0.17.4",
"major" : "0"
}
},
{
"desc" : "NSPlayer",
"ua" : "NSPlayer/11.0.5358.4827 WMFSDK/11.0",
"expect" :
{
"name" : "NSPlayer",
"version" : "11.0.5358.4827",
"major" : "11"
}
},
{
"desc" : "Nero Home",
"ua" : "Nero Home/1.5.3.0 (compatible; Nero AG; Nero Home 1.5.3.0)",
"expect" :
{
"name" : "Nero Home",
"version" : "1.5.3.0",
"major" : "1"
}
},
{
"desc" : "NexPlayer",
"ua" : "NexPlayer 4.0 for Android( stagefright alternative )",
"expect" :
{
"name" : "NexPlayer",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Nokia3xx",
"ua" : "Nokia303/14.87 CLDC-1.1",
"expect" :
{
"name" : "Nokia303",
"version" : "14.87",
"major" : "14"
}
},
{
"desc" : "MPlayer SVN Sherpya",
"ua" : "MPlayer Sherpya-SVN-r33124-4.2.5",
"expect" :
{
"name" : "MPlayer",
"version" : "r33124-4.2.5",
"major" : "undefined"
}
},
{
"desc" : "Philips Songbird",
"ua" : "NotMoz/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.3) Gecko/20101207 Philips-Songbird/5.4.1980 Songbird/1.9.4 (20110302030555)",
"expect" :
{
"name" : "Songbird",
"version" : "1.9.4",
"major" : "1"
}
},
{
"desc" : "Ossproxy",
"ua" : "OSSProxy 1.3.336.320 (Build 336.320 Win32 en-us)(Aug 16 2013 17:38:43)",
"expect" :
{
"name" : "OSSProxy",
"version" : "1.3.336.320",
"major" : "1"
}
},
{
"desc" : "Winamp3",
"ua" : "Nullsoft Winamp3 version 3.0 (compatible)",
"expect" :
{
"name" : "Winamp",
"version" : "3.0",
"major" : "3"
}
},
{
"desc" : "PSP",
"ua" : "PSP-InternetRadioPlayer/1.00",
"expect" :
{
"name" : "PSP-InternetRadioPlayer",
"version" : "1.00",
"major" : "1"
}
},
{
"desc" : "urllib",
"ua" : "Python-urllib/2.7",
"expect" :
{
"name" : "Python-urllib",
"version" : "2.7",
"major" : "2"
}
},
{
"desc" : "QuickTime",
"ua" : "QuickTime/7.5.6 (qtver=7.5.6;cpu=IA32;os=Mac 10.5.8)",
"expect" :
{
"name" : "QuickTime",
"version" : "7.5.6",
"major" : "7"
}
},
{
"desc" : "RMA",
"ua" : "RMA/1.0 (compatible; RealMedia)",
"expect" :
{
"name" : "RMA",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "RadioApp",
"ua" : "RadioApp/1.0 CFNetwork/609.1.4 Darwin/11.4.2",
"expect" :
{
"name" : "RadioApp",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "RadioClientApplication",
"ua" : "RadioClientApplication/20 CFNetwork/609.1.4 Darwin/13.0.0",
"expect" :
{
"name" : "RadioClientApplication",
"version" : "20",
"major" : "undefined"
}
},
{
"desc" : "stagefright",
"ua" : "Samsung GT-I9070 stagefright/1.1 (Linux;Android 2.3.6)",
"expect" :
{
"name" : "stagefright",
"version" : "1.1",
"major" : "1"
}
},
{
"desc" : "Soundtap",
"ua" : "Soundtap/1.2.4 CFNetwork/672.0.2 Darwin/14.0.0",
"expect" :
{
"name" : "Soundtap",
"version" : "1.2.4",
"major" : "1"
}
},
{
"desc" : "Streamium",
"ua" : "Streamium/1.0",
"expect" :
{
"name" : "Streamium",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "Totem",
"ua" : "Totem/3.0.1",
"expect" :
{
"name" : "Totem",
"version" : "3.0.1",
"major" : "3"
}
},
{
"desc" : "VLC",
"ua" : "VLC media player - version 0.8.6c Janus - (c) 1996-2007 the VideoLAN team",
"expect" :
{
"name" : "VLC",
"version" : "0.8.6c",
"major" : "0"
}
},
{
"desc" : "VLC",
"ua" : "VLC/2.0.0 LibVLC/2.0.0",
"expect" :
{
"name" : "VLC",
"version" : "2.0.0",
"major" : "2"
}
},
{
"desc" : "Videos",
"ua" : "Videos/3.8.2",
"expect" :
{
"name" : "Video",
"version" : "3.8.2",
"major" : "3"
}
},
{
"desc" : "Wget",
"ua" : "Wget/1.12 (darwin10.7.0)",
"expect" :
{
"name" : "Wget",
"version" : "1.12",
"major" : "1"
}
},
{
"desc" : "Winamp",
"ua" : "Winamp 2.81",
"expect" :
{
"name" : "Winamp",
"version" : "2.81",
"major" : "2"
}
},
{
"desc" : "Winamp",
"ua" : "WinampMPEG/2.00",
"expect" :
{
"name" : "Winamp",
"version" : "2.00",
"major" : "2"
}
},
{
"desc" : "Windows Media Player",
"ua" : "Windows-Media-Player/10.00.00.4019",
"expect" :
{
"name" : "Windows Media Player",
"version" : "10.00.00.4019",
"major" : "10"
}
},
{
"desc" : "XBMC",
"ua" : "XBMC/12.0 Git:20130127-fb595f2 (Windows NT 6.1;WOW64;Win64;x64; http://www.xbmc.org)",
"expect" :
{
"name" : "XBMC",
"version" : "12.0",
"major" : "12"
}
},
{
"desc" : "rad.io",
"ua" : "rad.io 1.18.1 rv:593 (iPhone 4S; iPhone OS 7.0.4; it_IT)",
"expect" :
{
"name" : "rad.io",
"version" : "1.18.1",
"major" : "1"
}
},
{
"desc" : "BE-Test",
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)",
"expect" :
{
"name" : "BE Test",
"version" : "1.0",
"major" : "1"
}
}
]

View File

@@ -107,6 +107,15 @@
"version" : "6.1" "version" : "6.1"
} }
}, },
{
"desc" : "Windows Phone",
"ua" : "Opera/9.80 (Windows Phone; Opera Mini/7.6.8/35.7518; U; ru) Presto/2.8.119 Version/11.10",
"expect" :
{
"name" : "Windows Phone",
"version" : "undefined"
}
},
{ {
"desc" : "Windows Phone OS", "desc" : "Windows Phone OS",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; DELL; Venue Pro)", "ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; DELL; Venue Pro)",
@@ -145,11 +154,11 @@
}, },
{ {
"desc" : "Tizen", "desc" : "Tizen",
"ua" : "", "ua" : "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.3 Mobile Safari/537.3",
"expect" : "expect" :
{ {
"name" : "", "name" : "Tizen",
"version" : "" "version" : "2.3"
} }
}, },
{ {
@@ -280,11 +289,20 @@
}, },
{ {
"desc" : "Ubuntu", "desc" : "Ubuntu",
"ua" : "", "ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Ubuntu/12.04 (3.4.1-0ubuntu1) Epiphany/3.4.1",
"expect" : "expect" :
{ {
"name" : "", "name" : "Ubuntu",
"version" : "" "version" : "12.04"
}
},
{
"desc" : "Ubuntu",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/31.0.1650.63 Chrome/31.0.1650.63 Safari/537.36",
"expect" :
{
"name" : "Ubuntu",
"version" : "undefined"
} }
}, },
{ {
@@ -496,11 +514,11 @@
}, },
{ {
"desc" : "Haiku", "desc" : "Haiku",
"ua" : "", "ua" : "Mozilla/5.0 (Macintosh; Intel Haiku R1 x86) AppleWebKit/602.1.1 (KHTML, like Gecko) WebPositive/1.2 Version/8.0 Safari/602.1.1",
"expect" : "expect" :
{ {
"name" : "", "name" : "Haiku",
"version" : "" "version" : "R1"
} }
}, },
{ {

View File

@@ -1,4 +1,5 @@
var assert = require('assert'); var assert = require('assert');
var requirejs = require('requirejs');
var UAParser = require('./../src/ua-parser'); var UAParser = require('./../src/ua-parser');
var browsers = require('./browser-test.json'); var browsers = require('./browser-test.json');
var cpus = require('./cpu-test.json'); var cpus = require('./cpu-test.json');
@@ -43,15 +44,6 @@ describe('UAParser()', function () {
assert.deepEqual(UAParser(ua), new UAParser().setUA(ua).getResult()); assert.deepEqual(UAParser(ua), new UAParser().setUA(ua).getResult());
}); });
describe('Injected Browser', function () {
var uaString = 'ownbrowser/1.3';
var ownBrowser = [[/(ownbrowser)\/((\d+)?[\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION, UAParser.BROWSER.MAJOR]];
var parser = new UAParser(uaString, {browser: ownBrowser});
assert.equal(parser.getBrowser().name, 'ownbrowser');
assert.equal(parser.getBrowser().major, '1');
assert.equal(parser.getBrowser().version, '1.3');
});
for (var i in methods) { for (var i in methods) {
describe(methods[i]['title'], function () { describe(methods[i]['title'], function () {
for (var j in methods[i]['list']) { for (var j in methods[i]['list']) {
@@ -72,3 +64,28 @@ for (var i in methods) {
} }
}); });
} }
describe('Extending Regex', function () {
var uaString = 'Mozilla/5.0 MyOwnBrowser/1.3';
var myOwnBrowser = [[/(myownbrowser)\/((\d+)?[\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION, UAParser.BROWSER.MAJOR]];
var parser = new UAParser(uaString, {browser: myOwnBrowser});
assert.equal(parser.getBrowser().name, 'MyOwnBrowser');
assert.equal(parser.getBrowser().version, '1.3');
assert.equal(parser.getBrowser().major, '1');
});
describe('Using Require.js', function () {
it('should loaded automatically', function(done) {
requirejs.config({
baseUrl : 'dist',
paths : {
'ua-parser-js' : 'ua-parser.min'
}
});
requirejs(['ua-parser-js'], function(ua) {
var parser = new ua('Dillo/1.0');
assert.deepEqual(parser.getBrowser().name, 'Dillo');
done();
});
});
});

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.12",
"description": "Lightweight JavaScript-based user-agent string parser", "description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [ "keywords": [
"user-agent", "user-agent",