Compare commits

...

81 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
Faisal Salman
fd39be3336 Increment build version: 0.7.10 2015-12-12 17:44:29 +07:00
Faisal Salman
a1293f804e merge develop 2015-12-12 17:40:57 +07:00
Faisal Salman
cf5c1f9e01 Check for tablet first 2015-12-12 17:34:00 +07:00
Faisal Salman
5d3835ad00 Merge pull request #154 from szchenghuang/meteor-export
UAParser is exposed globally to the window object. It can be used directly.
2015-12-12 15:43:09 +07:00
Faisal Salman
09bf4ecf7f Fix #153 mistaken Search phrase for Arch OS 2015-12-12 15:23:11 +07:00
Faisal Salman
43b0ee79d6 Seems to fix the issue for specific UA found in #159 2015-12-12 14:43:16 +07:00
Faisal Salman
9518833e83 Add PhantomJS fix #157 2015-12-12 14:28:39 +07:00
Faisal Salman
1e58e884ef Add PhantomJS support fix #157 2015-12-12 13:39:45 +07:00
szchenghuang
e230cc1920 UAParser is exposed globally to the window object. It can be used directly. 2015-11-20 15:30:28 +08:00
Faisal Salman
bbd3f14cfb Merge pull request #151 from 0x7f/firefox-ios
Fix detection of Firefox on iOS.
2015-11-19 21:38:06 +07:00
Faisal Salman
a66d9b238a Merge pull request #145 from lquinn/general-android-mobile
Treat all Android smartphones as mobile
2015-11-18 23:00:18 +07:00
Maximilian Haupt
ae5bfb3893 Fix detection of Firefox on iOS.
Firefox on iOS' ua string is also matched by the "Safari < 3.0" regular
expression, unfortunately. Reorder the regular expressions so that the
one for FxiOS matches first.
2015-11-13 12:09:32 +01:00
niris
2e5dff95c8 add support for wechat 2015-11-03 16:05:37 +08:00
Faisal Salman
e944fededb Merge pull request #148 from shanebo/master
Added hasOwnProperty check in result object for in
2015-11-02 09:39:34 +07:00
Shane Thacker
23160c9fb3 Added hasOwnProperty check
This ensures that the result output is clean of extended type methods
2015-11-01 12:34:54 -06:00
Liam Quinn
01ba36c94d Generalize the check for an unidentifiable mobile or tablet to correctly
categorize unidentifiable Android smartphones as "mobile".
2015-10-29 10:24:44 -04:00
Faisal Salman
99c15dee95 Merge pull request #144 from duzun/master
travis update: node_js stable, cache node_modules, sudo false
2015-10-28 06:25:55 +07:00
Dumitru Uzun
e8bec7e611 travis update: node_js stable, cache node_modules, sudo false 2015-10-22 09:30:52 +03:00
Faisal Salman
f670224d8e Merge pull request #140 from 0x7f/playstation4
Add Playstation 4 support.
2015-10-17 05:31:21 +07:00
Faisal Salman
116b5c695d Merge pull request #141 from 0x7f/fix-nexus-6
Detect Nexus 6 as Motorola only.
2015-10-17 05:31:00 +07:00
Maximilian Haupt
0aafba67fa Detect Nexus 6 as Motorola only.
The commit 3964971c3 added Nexus 6 to LG and Motorola, but it should be
Motorola only, as stated in the according commit message anyways.
2015-10-16 15:01:57 +00:00
Maximilian Haupt
ab6a56d931 Add Playstation 4 support. 2015-10-16 14:14:56 +00:00
Faisal Salman
3bff4cf037 Merge pull request #133 from URXtech/nexus-6
Added Nexus 6 detection
2015-10-13 22:02:42 +07:00
Malash
792dc0246a Rewrite util.extend to a clone version 2015-10-10 15:53:17 +08:00
Aamir Poonawalla
3964971c38 Added Nexus 6 detection
Correctly identifies a Nexus 6 device as being a Motorola mobile device.
2015-09-21 13:34:56 -07:00
Faisal Salman
3382b75cad Merge pull request #131 from pieterhendrickx/develop
Added DEVICE regular expressions for "Samsung galaxy S6" and "Samsung…
2015-08-20 20:59:59 +07:00
Pieter Hendrickx
a19c6be712 Added DEVICE regular expressions for "Samsung galaxy S6" and "Samsung Galaxy S6 Edge" devices + test cases 2015-08-20 09:00:16 +02:00
Faisal Salman
20ea67ed1d Merge pull request #130 from malash/ucbrowser
fix support for UCBrowser
2015-08-05 23:36:30 +07:00
Malash
172d63a28f fix support for UCBrowser 2015-08-05 19:47:48 +08:00
Faisal Salman
992e829643 Verup 0.7.9 2015-07-19 04:00:01 +07:00
Faisal Salman
e9e5467add Readme: flattr button, nodejs example, drop browser.major 2015-07-19 03:49:39 +07:00
Faisal Salman
d3a2e1750b Merge branch 'master' of github.com:faisalman/ua-parser-js 2015-07-19 02:22:22 +07:00
Faisal Salman
29d75c994e Merge pull request #124 from longsleep/iridium-detection
Added detection for Iridium Browser.
2015-07-19 02:23:38 +07:00
Faisal Salman
7e23d53e4b Merge branch 'master' of github.com:faisalman/ua-parser-js 2015-07-19 02:03:50 +07:00
Simon Eisenmann
892476f544 Added detection for Iridium Browser. 2015-07-17 16:10:59 +02:00
Faisal Salman
a165e152de Merge pull request #119 from roberttod/patch-1
Reference window as global if available
2015-07-04 01:39:19 +07:00
Faisal Salman
ab64c21a80 Merge pull request #120 from demis-palma/patch-4
palm os regexp fixed
2015-07-04 01:39:14 +07:00
Faisal Salman
5da2305369 Merge pull request #121 from duzun/verup
verup.js installed over NPM -> devDependencies
2015-07-04 01:39:10 +07:00
Faisal Salman
8e169098b5 Merge pull request #122 from divdavem/phantomjs
Adding PhantomJS (http://phantomjs.org/)
2015-07-04 01:39:06 +07:00
ddivernois
aa1bf53337 Adding PhantomJS (http://phantomjs.org/) 2015-07-01 11:23:56 +02:00
Dumitru Uzun
1b957cad1a verup.js installed over NPM -> devDependencies 2015-06-19 01:50:06 +03:00
Demis Palma
8d9cd21331 palm os regexp fixed
The regexp won't work as expected because the meta-character \o doesn't make sense.
Replaced with \s which indicates "whitespace character"
2015-06-18 23:32:15 +01:00
Robert Tod
f117f600ba Reference window as global if available
This change will use `window` by default if it exists so that `browserify` and `Webpack` builds do not need to do something like

```javascript
var parser = new UAParser(window.navigator.userAgent)
```

https://github.com/faisalman/ua-parser-js/issues/84
2015-06-10 17:35:16 +01:00
Faisal Salman
22e17fb004 Add Sleipnir 2015-05-11 23:44:34 +07:00
Faisal Salman
978ee5a4da Add Firefox for iOS 2015-05-11 23:33:57 +07:00
Faisal Salman
a3e4fbe5bb Merge pull request #116 from nikrolls/patch-1
Added Edge and EdgeHTML to documentation
2015-05-10 12:14:13 +07:00
Faisal Salman
9dacf37e4a Merge pull request #112 from duzun/master
Updated verup to v1.2.0 and moved its config to package.json
2015-05-10 12:13:46 +07:00
Nik Rolls
4d99bc0777 Added Edge and EdgeHTML to documentation 2015-05-10 15:33:36 +12:00
Faisal Salman
f558e657bb Merge pull request #113 from nikrolls/correct-ms-edge-detection
Microsoft Edge is not IE12
2015-05-08 20:15:13 +07:00
Nik Rolls
4203f8144f Microsoft Edge is not IE12 2015-05-08 18:02:05 +12:00
Faisal Salman
21a525f442 Add layout engine: EdgeHTML 2015-05-07 04:59:01 +07:00
Faisal Salman
3abf465aec changing build flow 2015-05-07 04:21:43 +07:00
Dumitru Uzun
56c90d2134 updated verup script 2015-05-05 20:39:23 +03:00
Dumitru Uzun
dc6bae6aae Updated verup to v1.2.0 and moved its config to package.json 2015-04-30 17:58:30 +03:00
17 changed files with 456 additions and 327 deletions

View File

@@ -1,5 +1,13 @@
language: node_js
node_js:
- "0.10"
- stable
- "0.10"
notifications:
email: false
cache:
directories:
- node_modules
sudo: false

View File

@@ -1,6 +1,6 @@
{
"name": "ua-parser-js",
"version": "0.7.7",
"version": "0.7.11",
"authors": [
"Faisal Salman <fyzlman@gmail.com>"
],

View File

@@ -1,37 +0,0 @@
#!/bin/bash
# dependencies
JSHINT_DIR="node_modules/jshint/bin/jshint"
MOCHA_DIR="node_modules/mocha/bin/mocha"
UGLIFY_DIR="node_modules/uglify-js/bin/uglifyjs"
# check module directory & install if not found
function check_module {
if ! type $2 &> /dev/null
then
echo "$2 is not found"
if ! type "npm" &> /dev/null
then
echo "npm is not installed"
echo "Exiting"
exit 1
else
echo "Installing $1..."
npm install $1
fi
fi
}
check_module "jshint" $JSHINT_DIR
check_module "mocha" $MOCHA_DIR
check_module "uglify-js" $UGLIFY_DIR
echo "Verifiying code..."
$JSHINT_DIR src/ua-parser.js
echo "Running test..."
$MOCHA_DIR -R nyan test/test.js
echo "Minifying script..."
$UGLIFY_DIR src/ua-parser.js > dist/ua-parser.min.js --comments '/UAParser\.js/'
echo "OK"

View File

@@ -1,112 +0,0 @@
#!/usr/bin/env node
/**
* Increment and update version in all project files.
*
* Ussage:
*
* Increment revision by 1:
* node verup.js 1
*
* Increment minor version by 1:
* node verup.js 1.0
*
* Increment major version by 1:
* node verup.js 1.0.0
*
*
* @author Dumitru Uzun (DUzun.Me)
* @version 1.1.0
*/
var path = require('path');
var fs = require('fs');
var _root = path.join(__dirname, '..');
var files = [
'ua-parser-js.jquery.json',
'component.json',
'bower.json',
'package.js',
'src/ua-parser.js'
];
var ver_reg = [
/^((?:\$|@|(\s*(?:var|,)?\s+))(?:LIBVERSION|version)[\s\:='"]+)([0-9]+(?:\.[0-9]+){2,2})/
, /^(\s?\*.*v)([0-9]+(?:\.[0-9]+){2,2})/
];
var packFile = path.join(_root, 'package.json');
var packo = require(packFile);
if ( !packo ) {
console.error('Can\'t read package.json file');
process.exit(1);
}
var over = packo.version;
/*
* bump should be 1 for revision, 1.0 for minor and 1.0.0 for major version
*/
var bump = (process.argv[2] || '1').split('.').reverse();
if ( over ) {
var nver = over.split('.').reverse();
var b, l;
while(bump.length && !(b = parseInt(bump.pop())));
l = bump.length;
// console.log({b:b,nver:nver,over:over,l:l,bump:bump})
nver[l] = +nver[l] + b;
bump.forEach(function (v,i) { nver[i] = v; });
nver = nver.reverse().join('.');
packo.version = nver;
console.log('Bumping version: ' + over + ' -> ' + nver);
var buf = JSON.stringify(packo, null, 2);
if ( buf && over != nver ) {
buf += "\n";
fs.writeFileSync(packFile, buf);
}
files.forEach(function (f) {
var fn = path.join(_root, f);
var cnt = fs.readFileSync(fn, 'utf8');
var ext = path.extname(f);
var buf;
switch(ext) {
case '.json': {
var packo = JSON.parse(cnt);
packo.version = nver;
buf = JSON.stringify(packo, null, 2);
if ( buf ) {
buf += "\n";
}
} break;
default: {
buf = cnt
.split('\n')
.map(function (l) {
for(var i=ver_reg.length; i--;) {
if ( ver_reg[i].test(l) ) {
return l.replace(ver_reg[i], function ($0,$1) { return $1 + nver })
}
}
return l;
})
.join("\n")
;
}
}
if ( buf && buf != cnt ) {
console.log("\t" + fn.replace(_root, ''));
fs.writeFileSync(fn, buf);
}
});
}

View File

@@ -1,6 +1,6 @@
{
"name": "ua-parser-js",
"version": "0.7.7",
"version": "0.7.11",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [
"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

8
dist/ua-parser.pack.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +1,12 @@
Package.describe({
name: 'faisalman:ua-parser-js',
version: '0.7.7',
version: '0.7.11',
summary: 'Lightweight JavaScript-based user-agent string parser',
git: 'https://github.com/faisalman/ua-parser-js.git',
documentation: 'readme.md'
});
Package.on_use(function (api) {
api.export("UAParser");
Package.onUse(function (api) {
api.addFiles("src/ua-parser.js");
api.export("UAParser");
});

View File

@@ -1,7 +1,7 @@
{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.7",
"version": "0.7.11",
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [
@@ -42,28 +42,35 @@
],
"main": "src/ua-parser.js",
"scripts": {
"test": "./build/build.sh",
"verup": "node ./build/verup.js"
"build": "uglifyjs src/ua-parser.js > dist/ua-parser.min.js --comments '/UAParser\\.js/' && uglifyjs src/ua-parser.js > dist/ua-parser.pack.js --comments '/UAParser\\.js/' --compress --mangle",
"test": "jshint src/ua-parser.js && mocha -R nyan test/test.js",
"verup": "node ./node_modules/verup",
"version": "node ./node_modules/verup 0"
},
"verup": {
"files": [
"ua-parser-js.jquery.json",
"component.json",
"bower.json",
"package.js",
"src/ua-parser.js"
],
"regs": [
"^((?:\\$|(\\s*\\*\\s*@)|(\\s*(?:var|,)?\\s+))(?:LIBVERSION|version)[\\s\\:='\"]+)([0-9]+(?:\\.[0-9]+){2,2})",
"^(\\s?\\*.*v)([0-9]+(?:\\.[0-9]+){2,2})"
]
},
"devDependencies": {
"jshint": "~1.1.0",
"mocha": "~1.8.0",
"uglify-js": "~1.3.4"
"uglify-js": "~1.3.4",
"verup": "^1.3.x"
},
"repository": {
"type": "git",
"url": "https://github.com/faisalman/ua-parser-js.git"
},
"licenses": [
{
"type": "GPLv2",
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
},
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
],
"license": "(GPL-2.0 OR MIT)",
"engines": {
"node": "*"
},

View File

@@ -1,8 +1,10 @@
# UAParser.js
Lightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as jQuery/Zepto plugin, Component package, Bower package, Meteor package, & AMD module
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
[![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)
[![CDNJS](https://img.shields.io/cdnjs/v/UAParser.js.svg)](https://cdnjs.com/libraries/UAParser.js)
* Author : Faisal Salman <<fyzlman@gmail.com>>
* Demo : http://faisalman.github.io/ua-parser-js
@@ -12,25 +14,25 @@ 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.
![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
* `getBrowser()`
* returns `{ name: '', major: '', version: '' }`
* returns `{ name: '', version: '' }`
```
# Possible 'browser.name':
Amaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Camino, Chimera, Chrome,
Chromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Epiphany, Fennec, Firebird,
Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon,
Chromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge, Epiphany, Fennec,
Firebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon,
Iceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links,
Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari,
Mosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet],
Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser, Swiftfox,
Tizen, UCBrowser, Vivaldi, w3m, Yandex
PhantomJS, Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser,
Swiftfox, Tizen, UCBrowser, Vivaldi, w3m, WeChat, Yandex
# 'browser.version' & 'browser.major' determined dynamically
# 'browser.version' determined dynamically
```
* `getDevice()`
@@ -54,8 +56,8 @@ Siemens, Sony-Ericsson, Sprint, Xbox, ZTE
```
# Possible 'engine.name'
Amaya, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto, Tasman,
Trident, w3m, WebKit
Amaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto,
Tasman, Trident, w3m, WebKit
# 'engine.version' determined dynamically
```
@@ -112,8 +114,7 @@ ppc, sparc, sparc64
ua: "",
browser: {
name: "",
version: "",
major: ""
version: ""
},
engine: {
name: "",
@@ -142,7 +143,7 @@ ppc, sparc, sparc64
// this will also produce the same result (without instantiation):
// var result = UAParser(uastring);
console.log(result.browser); // {name: "Chromium", major: "15", version: "15.0.874.106"}
console.log(result.browser); // {name: "Chromium", version: "15.0.874.106"}
console.log(result.device); // {model: undefined, type: undefined, vendor: undefined}
console.log(result.os); // {name: "Ubuntu", version: "11.10"}
console.log(result.os.version); // "11.10"
@@ -167,20 +168,6 @@ ppc, sparc, sparc64
</html>
```
### Extending regex patterns
* `UAParser(uastring[, extensions])`
Pass your own regexes to extend the limited matching rules.
```js
// Example:
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});
console.log(parser.getBrowser()); // {name: "ownbrowser", major: "1", version: "1.3"}
```
### Using node.js
```sh
@@ -188,16 +175,24 @@ $ npm install ua-parser-js
```
```js
var UAParser = require('ua-parser-js');
var parser = new UAParser();
var ua = request.headers['user-agent']; // user-agent header from an HTTP request
console.log(parser.setUA(ua).getResult());
var http = require('http');
var parser = require('ua-parser-js');
http.createServer(function (req, res) {
// get user-agent header
var ua = parser(req.headers['user-agent']);
// write the result as response
res.end(JSON.stringify(ua, null, ' '));
})
.listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
```
### Using requirejs
```js
require(['ua-parser'], function(UAParser) {
require(['ua-parser-js'], function(UAParser) {
var parser = new UAParser();
console.log(parser.getResult());
});
@@ -209,12 +204,6 @@ require(['ua-parser'], function(UAParser) {
$ component install faisalman/ua-parser-js
```
```js
var UAParser = require('ua-parser-js');
var parser = new UAParser();
console.log(parser.getResult());
```
### Using bower
```sh
@@ -250,12 +239,27 @@ console.log($.ua.device); // {vendor: "Motorola", model: "Xoom", type:
console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4
```
### Extending regex patterns
* `UAParser(uastring[, extensions])`
Pass your own regexes to extend the limited matching rules.
```js
// Example:
var uaString = 'ownbrowser/1.3';
var ownBrowser = [[/(ownbrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]];
var parser = new UAParser(uaString, {browser: ownBrowser});
console.log(parser.getBrowser()); // {name: "ownbrowser", version: "1.3"}
```
## Development
Verify, test, & minify script
```sh
$ npm test
$ npm run test
$ npm run build
```
Then submit a pull request to https://github.com/faisalman/ua-parser-js under `develop` branch.
@@ -265,7 +269,7 @@ Then submit a pull request to https://github.com/faisalman/ua-parser-js under `d
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
this software and associated documentation files (the "Software"), to deal in

View File

@@ -1,9 +1,9 @@
/**
* UAParser.js v0.7.7
* UAParser.js v0.7.11
* Lightweight JavaScript-based User-Agent string parser
* 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
*/
@@ -16,7 +16,7 @@
/////////////
var LIBVERSION = '0.7.7',
var LIBVERSION = '0.7.11',
EMPTY = '',
UNKNOWN = '?',
FUNC_TYPE = 'function',
@@ -45,12 +45,15 @@
var util = {
extend : function (regexes, extensions) {
for (var i in extensions) {
if ("browser cpu device engine os".indexOf(i) !== -1 && extensions[i].length % 2 === 0) {
regexes[i] = extensions[i].concat(regexes[i]);
var margedRegexes = {};
for (var i in regexes) {
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) {
if (typeof str1 === "string") {
@@ -64,6 +67,9 @@
},
major : function (version) {
return typeof(version) === STR_TYPE ? version.split(".")[0] : undefined;
},
trim : function (str) {
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
}
};
@@ -89,11 +95,13 @@
if (typeof result === UNDEF_TYPE) {
result = {};
for (p in props) {
q = props[p];
if (typeof q === OBJ_TYPE) {
result[q[0]] = undefined;
} else {
result[q] = undefined;
if (props.hasOwnProperty(p)){
q = props[p];
if (typeof q === OBJ_TYPE) {
result[q[0]] = undefined;
} else {
result[q] = undefined;
}
}
}
}
@@ -231,9 +239,11 @@
/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet
/(opera).+version\/([\w\.]+)/i, // Opera > 9.80
/(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80
], [NAME, VERSION], [
/(OPiOS)[\/\s]+([\w\.]+)/i // Opera mini on iphone >= 8.0
], [[NAME, 'Opera Mini'], VERSION], [
/\s(opr)\/([\w\.]+)/i // Opera Webkit
], [[NAME, 'Opera'], VERSION], [
@@ -249,26 +259,37 @@
// Webkit/KHTML based
/(rekonq)\/([\w\.]+)*/i, // Rekonq
/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i
// Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron
/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs)\/([\w\.-]+)/i
// Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS
], [NAME, VERSION], [
/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i, // IE11
/(Edge)\/((\d+)?[\w\.]+)/i // IE12
/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i // IE11
], [[NAME, 'IE'], VERSION], [
/(edge)\/((\d+)?[\w\.]+)/i // Microsoft Edge
], [NAME, VERSION], [
/(yabrowser)\/([\w\.]+)/i // Yandex
], [[NAME, 'Yandex'], VERSION], [
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
], [[NAME, /_/g, ' '], VERSION], [
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,
// Chrome/OmniWeb/Arora/Tizen/Nokia
/(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i
// UCBrowser/QQBrowser
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia
], [NAME, VERSION], [
/(MicroMessenger)\/([\w\.]+)/i // WeChat
], [[NAME, 'WeChat'], VERSION], [
/(qqbrowser)[\/\s]?([\w\.]+)/i // QQBrowser
], [NAME, VERSION], [
/(uc\s?browser)[\/\s]?([\w\.]+)/i,
/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,
/JUC.+(ucweb)[\/\s]?([\w\.]+)/i
// UCBrowser
], [[NAME, 'UCBrowser'], VERSION], [
/(dolfin)\/([\w\.]+)/i // Dolphin
], [[NAME, 'Dolphin'], VERSION], [
@@ -284,6 +305,9 @@
/FBAV\/([\w\.]+);/i // Facebook App for iOS
], [VERSION, [NAME, 'Facebook']], [
/fxios\/([\w\.-]+)/i // Firefox for iOS
], [VERSION, [NAME, 'Firefox']], [
/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i // Mobile Safari
], [VERSION, [NAME, 'Mobile Safari']], [
@@ -308,8 +332,8 @@
/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla
// Other
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir
/(links)\s\(([\w\.]+)/i, // Links
/(gobrowser)\/?([\w\.]+)*/i, // GoBrowser
/(ice\s?browser)\/v?([\w\._]+)/i, // ICE Browser
@@ -456,6 +480,9 @@
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
], [MODEL, VENDOR, [TYPE, TABLET]], [
@@ -467,6 +494,7 @@
/(archos)\s(gamepad2?)/i, // Archos
/(hp).+(touchpad)/i, // HP TouchPad
/(hp).+(tablet)/i, // HP Tablet
/(kindle)\/([\w\.]+)/i, // Kindle
/\s(nook)[\w\s]+build\/(\w+)/i, // Nook
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak
@@ -507,7 +535,7 @@
/android.+;\s(shield)\sbuild/i // Nvidia
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
/(playstation\s[3portablevi]+)/i // Playstation
/(playstation\s[34portablevi]+)/i // Playstation
], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [
/(sprint\s(\w+))/i // Sprint Phones
@@ -521,7 +549,7 @@
/(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i
// Alcatel/GeeksPhone/Huawei/Lenovo/Nexian/Panasonic/Sony
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [
/(nexus\s9)/i // HTC Nexus 9
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [
@@ -533,7 +561,8 @@
// Motorola
/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,
/mot[\s-]?(\w+)*/i,
/(XT\d{3,4}) build\//i
/(XT\d{3,4}) build\//i,
/(nexus\s[6])/i
], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [
/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i
], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [
@@ -541,12 +570,12 @@
/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
], [[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,
/sec-((sgh\w+))/i
], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [
/(samsung);smarttv/i
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/hbbtv.+maple;(\d+)/i
], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [
/\(dtv[\);].+(aquos)/i // Sharp
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [
@@ -585,7 +614,8 @@
/android.+(mi[\s\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i // Xiaomi Mi
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [
/(mobile|tablet);.+rv\:.+gecko\//i // Unidentifiable
/\s(tablet)[;\/]/i, // Unidentifiable Tablet
/\s(mobile)[;\/]/i // Unidentifiable Mobile
], [[TYPE, util.lowerize], VENDOR, MODEL]
/*//////////////////////////
@@ -641,7 +671,7 @@
], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(i-STYLE2.1)/i // i-mobile i-STYLE 2.1
], [[MODEL, 'i-STYLE 2.1'], [VENDOR, 'i-mobile'], [TYPE, MOBILE]], [
/(mobiistar touch LAI 512)/i // mobiistar touch LAI 512
], [[MODEL, 'Touch LAI 512'], [VENDOR, 'mobiistar'], [TYPE, MOBILE]], [
@@ -653,6 +683,9 @@
engine : [[
/windows.+\sedge\/([\w\.]+)/i // EdgeHTML
], [VERSION, [NAME, 'EdgeHTML']], [
/(presto)\/([\w\.]+)/i, // Presto
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m
/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, // KHTML/Tasman/Links
@@ -679,7 +712,7 @@
], [[NAME, 'BlackBerry'], VERSION], [
/(blackberry)\w*\/?([\w\.]+)*/i, // Blackberry
/(tizen)[\/\s]([\w\.]+)/i, // Tizen
/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,
/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,
// Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki
/linux;.+(sailfish);/i // Sailfish OS
], [NAME, VERSION], [
@@ -691,12 +724,12 @@
], [[NAME, 'Firefox OS'], VERSION], [
// Console
/(nintendo|playstation)\s([wids3portablevu]+)/i, // Nintendo/Playstation
/(nintendo|playstation)\s([wids34portablevu]+)/i, // Nintendo/Playstation
// GNU/Linux based
/(mint)[\/\s\(]?(\w+)*/i, // Mint
/(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux
/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|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-]?([\w\.-]+)*/i,
// Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware
// Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus
/(hurd|linux)\s?([\w\.]+)*/i, // Hurd/Linux
@@ -714,7 +747,7 @@
/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly
], [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, '.']], [
/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,
@@ -781,7 +814,6 @@
ua = uastring;
return this;
};
this.setUA(ua);
return this;
};
@@ -830,7 +862,7 @@
} else {
// requirejs env (optional)
if (typeof(define) === FUNC_TYPE && define.amd) {
define(function () {
define("ua-parser-js", [], function () {
return UAParser;
});
} else {
@@ -840,7 +872,7 @@
}
// jQuery/Zepto specific (optional)
// Note:
// Note:
// 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,
// and we should catch that.
@@ -860,4 +892,4 @@
};
}
})(this);
})(typeof window === 'object' ? window : this);

View File

@@ -2,7 +2,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
@@ -12,7 +12,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
@@ -22,7 +22,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Arora",
"version" : "0.2",
@@ -32,7 +32,7 @@
{
"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)",
"expect" :
"expect" :
{
"name" : "Avant ",
"version" : "undefined",
@@ -42,7 +42,7 @@
{
"desc" : "Baidu",
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; baidubrowser 1.x)",
"expect" :
"expect" :
{
"name" : "baidu",
"version" : "1.x",
@@ -52,7 +52,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Bolt",
"version" : "0.862",
@@ -62,7 +62,7 @@
{
"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)",
"expect" :
"expect" :
{
"name" : "Camino",
"version" : "2.0.9",
@@ -72,7 +72,7 @@
{
"desc" : "Chimera",
"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",
"version" : "0.6",
@@ -82,7 +82,7 @@
{
"desc" : "Chrome",
"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",
"version" : "20.0.1090.0",
@@ -92,7 +92,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Chrome",
"version" : "19.0.1084.60",
@@ -102,7 +102,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Chromium",
"version" : "16.0.912.21",
@@ -112,7 +112,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Chrome",
"version" : "16.0.912.75",
@@ -122,7 +122,7 @@
{
"desc" : "Dillo",
"ua" : "Dillo/2.2",
"expect" :
"expect" :
{
"name" : "Dillo",
"version" : "2.2",
@@ -132,7 +132,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Dolphin",
"version" : "2.0",
@@ -142,7 +142,7 @@
{
"desc" : "Doris",
"ua" : "Doris/1.15 [en] (Symbian)",
"expect" :
"expect" :
{
"name" : "Doris",
"version" : "1.15",
@@ -152,7 +152,7 @@
{
"desc" : "Epiphany",
"ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6",
"expect" :
"expect" :
{
"name" : "Epiphany",
"version" : "1.2.6",
@@ -162,7 +162,7 @@
{
"desc" : "Firebird",
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 Firebird/0.7",
"expect" :
"expect" :
{
"name" : "Firebird",
"version" : "0.7",
@@ -172,7 +172,7 @@
{
"desc" : "Firefox",
"ua" : "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2",
"expect" :
"expect" :
{
"name" : "Firefox",
"version" : "15.0a2",
@@ -182,7 +182,7 @@
{
"desc" : "Fennec",
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
"expect" :
"expect" :
{
"name" : "Fennec",
"version" : "1.0a1",
@@ -192,7 +192,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Flock",
"version" : "2.0",
@@ -202,7 +202,7 @@
{
"desc" : "GoBrowser",
"ua" : "Nokia5700XpressMusic/GoBrowser/1.6.91",
"expect" :
"expect" :
{
"name" : "GoBrowser",
"version" : "1.6.91",
@@ -212,7 +212,7 @@
{
"desc" : "IceApe",
"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",
"version" : "2.0.14",
@@ -222,7 +222,7 @@
{
"desc" : "IceCat",
"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",
"version" : "3.0.3-g1",
@@ -232,7 +232,7 @@
{
"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)",
"expect" :
"expect" :
{
"name" : "Iceweasel",
"version" : "3.0.6",
@@ -242,7 +242,7 @@
{
"desc" : "iCab",
"ua" : "iCab/2.9.5 (Macintosh; U; PPC; Mac OS X)",
"expect" :
"expect" :
{
"name" : "iCab",
"version" : "2.9.5",
@@ -252,7 +252,7 @@
{
"desc" : "IEMobile",
"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",
"version" : "7.11",
@@ -262,7 +262,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "IE",
"version" : "11.0",
@@ -272,7 +272,7 @@
{
"desc" : "IE 11 without IE token",
"ua" : "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko",
"expect" :
"expect" :
{
"name" : "IE",
"version" : "11.0",
@@ -282,7 +282,7 @@
{
"desc" : "K-Meleon",
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2",
"expect" :
"expect" :
{
"name" : "K-Meleon",
"version" : "0.8.2",
@@ -292,17 +292,17 @@
{
"desc" : "Kindle Browser",
"ua" : "Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)",
"expect" :
"expect" :
{
"name" : "Kindle",
"version" : "2.5",
"major" : "2"
}
},
},
{
"desc" : "Konqueror",
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu)",
"expect" :
"expect" :
{
"name" : "Konqueror",
"version" : "3.5",
@@ -312,7 +312,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Lunascape",
"version" : "5.1.4.5",
@@ -322,7 +322,7 @@
{
"desc" : "Lynx",
"ua" : "Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b",
"expect" :
"expect" :
{
"name" : "Lynx",
"version" : "2.8.5dev.16",
@@ -332,7 +332,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Maemo Browser",
"version" : "1.7.4.8",
@@ -342,7 +342,7 @@
{
"desc" : "Maxthon",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)",
"expect" :
"expect" :
{
"name" : "Maxthon",
"version" : "undefined",
@@ -352,7 +352,7 @@
{
"desc" : "Midori",
"ua" : "Midori/0.2.2 (X11; Linux i686; U; en-us) WebKit/531.2+",
"expect" :
"expect" :
{
"name" : "Midori",
"version" : "0.2.2",
@@ -362,7 +362,7 @@
{
"desc" : "Minimo",
"ua" : "Mozilla/5.0 (X11; U; Linux armv6l; rv 1.8.1.5pre) Gecko/20070619 Minimo/0.020",
"expect" :
"expect" :
{
"name" : "Minimo",
"version" : "0.020",
@@ -372,7 +372,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "MIUI Browser",
"version" : "1.0",
@@ -382,7 +382,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Mobile Safari",
"version" : "4.0.5",
@@ -392,7 +392,7 @@
{
"desc" : "Mosaic",
"ua" : "NCSA_Mosaic/2.6 (X11; SunOS 4.1.3 sun4m)",
"expect" :
"expect" :
{
"name" : "Mosaic",
"version" : "2.6",
@@ -402,7 +402,7 @@
{
"desc" : "Mozilla",
"ua" : "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20070606",
"expect" :
"expect" :
{
"name" : "Mozilla",
"version" : "5.0",
@@ -412,7 +412,7 @@
{
"desc" : "MSIE",
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)",
"expect" :
"expect" :
{
"name" : "IE",
"version" : "5.0b1",
@@ -422,7 +422,7 @@
{
"desc" : "NetFront",
"ua" : "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0",
"expect" :
"expect" :
{
"name" : "NetFront",
"version" : "3.0",
@@ -432,7 +432,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Netscape",
"version" : "9.0",
@@ -442,7 +442,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Netscape",
"version" : "8.0.1",
@@ -452,7 +452,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "NokiaBrowser",
"version" : "7.3.1.37",
@@ -462,7 +462,7 @@
{
"desc" : "OmniWeb",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.48",
"expect" :
"expect" :
{
"name" : "OmniWeb",
"version" : "558.48",
@@ -472,7 +472,7 @@
{
"desc" : "Opera > 9.80",
"ua" : "Opera/9.80 (X11; Linux x86_64; U; Linux Mint; en) Presto/2.2.15 Version/10.10",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "10.10",
@@ -482,7 +482,7 @@
{
"desc" : "Opera < 9.80 on Windows",
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.01 [en]",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "6.01",
@@ -492,7 +492,7 @@
{
"desc" : "Opera < 9.80 on OSX",
"ua" : "Opera/8.5 (Macintosh; PPC Mac OS X; U; en)",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "8.5",
@@ -502,7 +502,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Opera Mobi",
"version" : "11.50",
@@ -512,7 +512,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "14.0.1025.52315",
@@ -522,27 +522,47 @@
{
"desc" : "Opera Mini",
"ua" : "Opera/9.80 (J2ME/MIDP; Opera Mini/5.1.21214/19.916; U; en) Presto/2.5.25",
"expect" :
"expect" :
{
"name" : "Opera Mini",
"version" : "5.1.21214",
"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",
"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",
"version" : "11.1",
"major" : "11"
}
},
{
"desc" : "PhantomJS",
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34",
"expect" :
{
"name" : "PhantomJS",
"version" : "1.9.2",
"major" : "1"
}
},
{
"desc" : "Phoenix",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4",
"expect" :
"expect" :
{
"name" : "Phoenix",
"version" : "0.4",
@@ -552,7 +572,7 @@
{
"desc" : "Polaris",
"ua" : "LG-LX600 Polaris/6.0 MMP/2.0 Profile/MIDP-2.1 Configuration/CLDC-1.1",
"expect" :
"expect" :
{
"name" : "Polaris",
"version" : "6.0",
@@ -562,7 +582,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "RockMelt",
"version" : "0.8.36.78",
@@ -572,7 +592,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Safari",
"version" : "5.0.1",
@@ -582,7 +602,7 @@
{
"desc" : "Safari < 3.0",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3",
"expect" :
"expect" :
{
"name" : "Safari",
"version" : "2.0.4",
@@ -592,7 +612,7 @@
{
"desc" : "SeaMonkey",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b4pre) Gecko/20090405 SeaMonkey/2.0b1pre",
"expect" :
"expect" :
{
"name" : "SeaMonkey",
"version" : "2.0b1pre",
@@ -602,7 +622,7 @@
{
"desc" : "Silk Browser",
"ua" : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84)",
"expect" :
"expect" :
{
"name" : "Silk",
"version" : "1.1.0-84",
@@ -612,7 +632,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Skyfire",
"version" : "2.0",
@@ -622,7 +642,7 @@
{
"desc" : "SlimBrowser",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SlimBrowser)",
"expect" :
"expect" :
{
"name" : "Slim",
"version" : "undefined",
@@ -632,7 +652,7 @@
{
"desc" : "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",
"version" : "undefined",
@@ -642,7 +662,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Tizen Browser",
"version" : "1.0",
@@ -652,7 +672,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "UCBrowser",
"version" : "8.2.1.144",
@@ -662,17 +682,57 @@
{
"desc" : "UC Browser on Nokia",
"ua" : "Mozilla/5.0 (S60V3; U; en-in; NokiaN73)/UC Browser8.4.0.159/28/351/UCWEB Mobile",
"expect" :
"expect" :
{
"name" : "UC Browser",
"name" : "UCBrowser",
"version" : "8.4.0.159",
"major" : "8"
}
},
{
"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",
"expect" :
{
"name" : "UCBrowser",
"version" : "10.4.0.558",
"major" : "10"
}
},
{
"desc" : "UC Browser J2ME 2",
"ua" : "JUC (Linux; U; 2.3.5; zh-cn; GT-I9100; 480*800) UCWEB7.9.0.94/139/800",
"expect" :
{
"name" : "UCBrowser",
"version" : "7.9.0.94",
"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",
"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",
"version" : "1.0.83.38",
@@ -682,7 +742,7 @@
{
"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",
"expect" :
"expect" :
{
"name" : "Yandex",
"version" : "1.0.1084.5402",
@@ -690,13 +750,33 @@
}
},
{
"desc" : "Windows 10 EI",
"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",
"expect" :
"expect" :
{
"name" : "IE",
"name" : "Edge",
"version" : "12.0",
"major" : "12"
}
},
{
"desc" : "Iridium",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Iridium/43.8 Safari/537.36 Chrome/43.0.2357.132",
"expect" :
{
"name" : "Iridium",
"version" : "43.8",
"major" : "43"
}
},
{
"desc" : "Firefox iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) FxiOS/1.1 Mobile/13B143 Safari/601.1.46",
"expect" :
{
"name" : "Firefox",
"version" : "1.1",
"major" : "1"
}
}
]

View File

@@ -39,6 +39,16 @@
"type" : "mobile"
}
},
{
"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",
"expect" :
{
"vendor" : "Motorola",
"model" : "Nexus 6",
"type" : "mobile"
}
},
{
"desc" : "Motorola Droid RAZR 4G",
"ua" : "Mozilla/5.0 (Linux; U; Android 2.3; xx-xx; DROID RAZR 4G Build/6.5.1-73_DHD-11_M1-29) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
@@ -89,6 +99,16 @@
"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",
"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",
@@ -129,6 +149,36 @@
"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)",
"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",
@@ -238,5 +288,76 @@
"model" : "MI-ONE Plus",
"type" : "mobile"
}
},
{
"desc" : "PlayStation 4",
"ua" : "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)",
"expect" :
{
"vendor" : "Sony",
"model" : "PlayStation 4",
"type" : "console"
}
},
{
"desc" : "Galaxy Nexus",
"ua" : "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
"expect" :
{
"vendor" : "Samsung",
"model" : "Galaxy Nexus",
"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,4 +1,13 @@
[
{
"desc" : "EdgeHTML",
"ua" : "Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0",
"expect" :
{
"name" : "EdgeHTML",
"version" : "12.0"
}
},
{
"desc" : "Gecko",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b9pre) Gecko/20110111 Firefox/4.0b9pre",

View File

@@ -251,6 +251,15 @@
"version" : ""
}
},
{
"desc" : "PlayStation 4",
"ua" : "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)",
"expect" :
{
"name" : "PlayStation",
"version" : "4"
}
},
{
"desc" : "Mint",
"ua" : "",

View File

@@ -1,7 +1,7 @@
{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.7",
"version": "0.7.11",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [
"user-agent",