mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-18 15:50:36 +03:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a21b0f2294 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,12 +1,12 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
<<<<<<< HEAD
|
||||||
### vim ###
|
### vim ###
|
||||||
.*.s[a-w][a-z]
|
.*.s[a-w][a-z]
|
||||||
*.un~
|
*.un~
|
||||||
Session.vim
|
Session.vim
|
||||||
.netrwhist
|
.netrwhist
|
||||||
*~
|
*~
|
||||||
.versions
|
|
||||||
|
|
||||||
### OSX ###
|
### OSX ###
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@@ -21,4 +21,6 @@ Icon
|
|||||||
# Files that might appear on external disk
|
# Files that might appear on external disk
|
||||||
.Spotlight-V100
|
.Spotlight-V100
|
||||||
.Trashes
|
.Trashes
|
||||||
|
=======
|
||||||
.idea
|
.idea
|
||||||
|
>>>>>>> baf4bb99b4ef92c71419931e8fd334e34c051e52
|
||||||
|
|||||||
11
.travis.yml
11
.travis.yml
@@ -1,13 +1,6 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- stable
|
- 0.8
|
||||||
- "0.10"
|
- 0.6
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- node_modules
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|||||||
26
bower.json
26
bower.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.18",
|
"version": "0.7.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Faisal Salman <fyzlman@gmail.com>"
|
"Faisal Salman <fyzlman@gmail.com>"
|
||||||
],
|
],
|
||||||
@@ -13,5 +13,27 @@
|
|||||||
"test",
|
"test",
|
||||||
"tests"
|
"tests"
|
||||||
],
|
],
|
||||||
"dependencies": {}
|
"contributors": [
|
||||||
|
"Faisal Salman <fyzlman@gmail.com>",
|
||||||
|
"Benjamin Bertrand <bertrand.design@gmail.com>",
|
||||||
|
"Christopher De Cairos <chris.decairos@gmail.com>",
|
||||||
|
"Davit Barbakadze <jayarjo@gmail.com>",
|
||||||
|
"Dmitry Tyschenko <dtyschenko@gmail.com>",
|
||||||
|
"Douglas Li <doug@knotch.it>",
|
||||||
|
"Erik Hesselink <hesselink@gmail.com>",
|
||||||
|
"Fabian Becker <halfdan@xnorfz.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>",
|
||||||
|
"Lee Treveil <leetreveil@gmail.com>",
|
||||||
|
"Leonardo <leofiore@libero.it>",
|
||||||
|
"Michael Hess <mhess@connectify.me>",
|
||||||
|
"Ross Noble <rosshnoble@gmail.com>",
|
||||||
|
"Sandro Sonntag <sandro.sonntag@adorsys.de>"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
37
build/build.sh
Executable file
37
build/build.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/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 > src/ua-parser.min.js
|
||||||
|
echo "OK"
|
||||||
14
component.json
Normal file
14
component.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "ua-parser-js",
|
||||||
|
"version": "0.7.0",
|
||||||
|
"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
1
dist/ua-parser.html
vendored
@@ -1 +0,0 @@
|
|||||||
<script src="./ua-parser.min.js"></script>
|
|
||||||
9
dist/ua-parser.min.js
vendored
9
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
9
dist/ua-parser.pack.js
vendored
9
dist/ua-parser.pack.js
vendored
File diff suppressed because one or more lines are too long
12
package.js
12
package.js
@@ -1,12 +0,0 @@
|
|||||||
Package.describe({
|
|
||||||
name: 'faisalman:ua-parser-js',
|
|
||||||
version: '0.7.18',
|
|
||||||
summary: 'Lightweight JavaScript-based user-agent string parser',
|
|
||||||
git: 'https://github.com/faisalman/ua-parser-js.git',
|
|
||||||
documentation: 'readme.md'
|
|
||||||
});
|
|
||||||
|
|
||||||
Package.onUse(function (api) {
|
|
||||||
api.addFiles("src/ua-parser.js");
|
|
||||||
api.export("UAParser");
|
|
||||||
});
|
|
||||||
115
package.json
115
package.json
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"title": "UAParser.js",
|
"title": "UAParser.js",
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.7.18",
|
"version": "0.7.0",
|
||||||
"author": "Faisal Salman <f@faisalman.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": [
|
||||||
"user-agent",
|
"user-agent",
|
||||||
@@ -11,128 +11,57 @@
|
|||||||
"engine",
|
"engine",
|
||||||
"os",
|
"os",
|
||||||
"device",
|
"device",
|
||||||
"cpu",
|
"cpu"
|
||||||
"jquery-plugin",
|
|
||||||
"ecosystem:jquery"
|
|
||||||
],
|
],
|
||||||
"homepage": "http://github.com/faisalman/ua-parser-js",
|
"homepage": "http://github.com/faisalman/ua-parser-js",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Aamir Poonawalla <aamir@urx.com>",
|
"Faisal Salman <fyzlman@gmail.com>",
|
||||||
"Admas <mollases@users.noreply.github.com>",
|
|
||||||
"algenon <m@antonz.ru>",
|
|
||||||
"Andrea Vaghi <andrea.vaghi@jobrapido.com>",
|
|
||||||
"Anton Zhiyanov <m@antonz.ru>",
|
|
||||||
"Arturo Mejia <amejia@blim.com>",
|
|
||||||
"Arun Rama Reddy <arunramareddy@gmail.com>",
|
|
||||||
"Austin Pray <austin@austinpray.com>",
|
|
||||||
"Benjamin Bertrand <bertrand.design@gmail.com>",
|
"Benjamin Bertrand <bertrand.design@gmail.com>",
|
||||||
"Benjamin Urban <benjamin.urban@sueddeutsche.de>",
|
|
||||||
"boneyao <admin@boneyao.com>",
|
|
||||||
"Carl C Von Lewin <carlchristianlewin@gmail.com>",
|
|
||||||
"CESAR RAMOS <c@imagenproactiva.com>",
|
|
||||||
"Christopher De Cairos <chris.decairos@gmail.com>",
|
"Christopher De Cairos <chris.decairos@gmail.com>",
|
||||||
"Dario Vladovic <d.vladimyr@gmail.com>",
|
|
||||||
"Davit Barbakadze <jayarjo@gmail.com>",
|
"Davit Barbakadze <jayarjo@gmail.com>",
|
||||||
"ddivernois <david-emmanuel.divernois@amadeus.com>",
|
|
||||||
"Demis Palma <demis.palma@gmail.com>",
|
|
||||||
"dhoko <aurelien@protonmail.com>",
|
|
||||||
"dianhe <dianhe@webank.com>",
|
|
||||||
"Dmitry Tyschenko <dtyschenko@gmail.com>",
|
"Dmitry Tyschenko <dtyschenko@gmail.com>",
|
||||||
"Douglas Li <doug@knotch.it>",
|
"Douglas Li <doug@knotch.it>",
|
||||||
"Dumitru Uzun <contact@duzun.me>",
|
|
||||||
"Eric Schrenker <eric.schrenker@gmail.com>",
|
|
||||||
"Erik Hesselink <hesselink@gmail.com>",
|
"Erik Hesselink <hesselink@gmail.com>",
|
||||||
"Fabian Becker <halfdan@xnorfz.de>",
|
"Fabian Becker <halfdan@xnorfz.de>",
|
||||||
"Faisal Salman <fyzlman@gmail.com>",
|
"Jackpoll <jackpoll123456@gmail.com>",
|
||||||
"Frédéric Camblor <fcamblor@gmail.com>",
|
|
||||||
"Germán M. Bravo <german.mb@gmail.com>",
|
|
||||||
"Grigory Dmitrenko <grigory@snsk.ru>",
|
|
||||||
"Hendrik Helwich <h.helwich@iplabs.de>",
|
|
||||||
"Hermann Ebert <ebbmo@HE.local>",
|
|
||||||
"jackpoll <jackpoll123456@gmail.com>",
|
|
||||||
"Jake Mc <startswithaj@users.noreply.github.com>",
|
"Jake Mc <startswithaj@users.noreply.github.com>",
|
||||||
"John Tantalo <john.tantalo@gmail.com>",
|
"John Tantalo <john.tantalo@gmail.com>",
|
||||||
"John Yanarella <jmy@codecatalyst.com>",
|
"John Yanarella <jmy@codecatalyst.com>",
|
||||||
"Jon Buckley <jon@jbuckley.ca>",
|
"Jon Buckley <jon@jbuckley.ca>",
|
||||||
"Kendall Buchanan <kendall@kendagriff.com>",
|
|
||||||
"Lee Treveil <leetreveil@gmail.com>",
|
"Lee Treveil <leetreveil@gmail.com>",
|
||||||
"leonardo <leofiore@libero.it>",
|
"Leonardo <leofiore@libero.it>",
|
||||||
"Levente Balogh <balogh.levente.hu@gmail.com>",
|
|
||||||
"Liam Quinn <lquinn@blackberry.com>",
|
|
||||||
"Lithin <lithin@webklipper.com>",
|
|
||||||
"Loris Guignard <loris.guignard@gmail.com>",
|
|
||||||
"Lukas Drgon <lukas.drgon@gmail.com>",
|
|
||||||
"Lukas Eipert <leipert@users.noreply.github.com>",
|
|
||||||
"Malash <i@malash.me>",
|
|
||||||
"Martynas <martynas@firmfirm.co>",
|
|
||||||
"Matt Brophy <matt@brophy.org>",
|
|
||||||
"Max Maurer <maxemanuel.maurer@gmail.com>",
|
|
||||||
"Maximilian Haupt <mail@maximilianhaupt.com>",
|
|
||||||
"Michael Hess <mhess@connectify.me>",
|
"Michael Hess <mhess@connectify.me>",
|
||||||
"naoh <naoh.cs03g@nctu.edu.tw>",
|
|
||||||
"Nik Rolls <nik@rolls.cc>",
|
|
||||||
"Nikhil Motiani <nikhil.m@247-inc.com>",
|
|
||||||
"niris <nirisix@gmail.com>",
|
|
||||||
"Nobuo Okada <nookada@yahoo-corp.jp>",
|
|
||||||
"otakuSiD <otakusid@gmail.com>",
|
|
||||||
"Peter Dave Hello <PeterDaveHello@users.noreply.github.com>",
|
|
||||||
"philippsimon <github@philippsimon.de>",
|
|
||||||
"Pieter Hendrickx <pieter.hendrickx@belfius.be>",
|
|
||||||
"Piper Chester <piperchester@gmail.com>",
|
|
||||||
"Robert Tod <robert@qubit.com>",
|
|
||||||
"Ron Korland <ron@testim.io>",
|
|
||||||
"Ross Noble <rosshnoble@gmail.com>",
|
"Ross Noble <rosshnoble@gmail.com>",
|
||||||
"Sandro Sonntag <sandro.sonntag@adorsys.de>",
|
"Sandro Sonntag <sandro.sonntag@adorsys.de>"
|
||||||
"sgautrea <shanegautreau@gmail.com>",
|
|
||||||
"Shane Gautreau <sgautrea@opentext.com>",
|
|
||||||
"Shane Thacker <shane@steadymade.com>",
|
|
||||||
"Simon Eisenmann <simon@longsleep.org>",
|
|
||||||
"Simon Lang <me@simonlang.org>",
|
|
||||||
"Stiekel <histkc@gmail.com>",
|
|
||||||
"Sylvain Gizard <sylvain.gizard@gmail.com>",
|
|
||||||
"szchenghuang <szchenghuang@gmail.com>",
|
|
||||||
"Vadim Kurachevsky <vadim@hmvs.org>",
|
|
||||||
"Yun Young-jin <yupmin@yupmin-office-macmini.local>"
|
|
||||||
],
|
],
|
||||||
"main": "src/ua-parser.js",
|
"main": "src/ua-parser.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "uglifyjs src/ua-parser.js -o dist/ua-parser.min.js --comments '/UAParser\\.js/' && uglifyjs src/ua-parser.js -o dist/ua-parser.pack.js --comments '/UAParser\\.js/' --compress --mangle",
|
"test": "./build/build.sh"
|
||||||
"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": [
|
|
||||||
"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": {
|
"devDependencies": {
|
||||||
"jshint": "~1.1.0",
|
"jshint": "~1.1.0",
|
||||||
"mocha": "~1.8.0",
|
"mocha": "~1.7.1",
|
||||||
"requirejs": "^2.3.2",
|
"uglify-js": "~1.3.4"
|
||||||
"uglify-js": "~2.7.5",
|
|
||||||
"verup": "^1.3.x"
|
|
||||||
},
|
},
|
||||||
"repository" : {
|
"repository" : {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/faisalman/ua-parser-js.git"
|
"url": "https://github.com/faisalman/ua-parser-js.git"
|
||||||
},
|
},
|
||||||
"license": "(GPL-2.0 OR MIT)",
|
"licenses": [
|
||||||
|
{
|
||||||
|
"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": "*"
|
||||||
},
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"dist": "dist",
|
"lib": "src",
|
||||||
"src": "src",
|
|
||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
}
|
||||||
"bugs": "https://github.com/faisalman/ua-parser-js/issues",
|
|
||||||
"demo": "https://faisalman.github.io/ua-parser-js",
|
|
||||||
"download": "https://raw.github.com/faisalman/ua-parser-js/master/dist/ua-parser.min.js"
|
|
||||||
}
|
}
|
||||||
|
|||||||
203
readme.md
203
readme.md
@@ -1,45 +1,36 @@
|
|||||||
# UAParser.js
|
# UAParser.js
|
||||||
|
|
||||||
<img align="right" src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/logo.png"> A 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. However, it's not recommended to use this library as browser detection since the result may not be more accurate than using feature detection.
|
Lightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as Component package, Bower package, jQuery.ua, & AMD module
|
||||||
|
|
||||||
[](https://travis-ci.org/faisalman/ua-parser-js)
|
[](https://travis-ci.org/faisalman/ua-parser-js)
|
||||||
[](https://www.npmjs.com/package/ua-parser-js)
|
|
||||||
[](https://www.npmjs.com/package/ua-parser-js)
|
|
||||||
[](https://bower.io/)
|
|
||||||
[](https://cdnjs.com/libraries/UAParser.js)
|
|
||||||
[](https://gratipay.com/UAParser.js)
|
|
||||||
[](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)
|
|
||||||
|
|
||||||
* Author : Faisal Salman <<f@faisalman.com>>
|
* Author : Faisalman <<fyzlman@gmail.com>>
|
||||||
* Demo : http://faisalman.github.io/ua-parser-js
|
* Demo : http://faisalman.github.com/ua-parser-js
|
||||||
* Source : https://github.com/faisalman/ua-parser-js
|
* Source : https://github.com/faisalman/ua-parser-js
|
||||||
|
|
||||||
# Constructor
|
## Features
|
||||||
|
|
||||||
* `new UAParser([uastring][,extensions])`
|
Extract detailed type of web browser, layout engine, operating system, cpu architecture, and device purely from user-agent string with relatively lightweight footprint (~7KB minified / ~3KB gzipped). Written in vanilla js, which means it doesn't depends on any other library.
|
||||||
* returns new instance
|
|
||||||
|
|
||||||
* `UAParser([uastring][,extensions])`
|

|
||||||
* returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
|
||||||
|
|
||||||
# Methods
|
## Methods
|
||||||
|
|
||||||
* `getBrowser()`
|
* `getBrowser()`
|
||||||
* returns `{ name: '', version: '' }`
|
* returns `{ name: '', major: '', version: '' }`
|
||||||
|
|
||||||
```
|
```
|
||||||
# Possible 'browser.name':
|
# Possible 'browser.name':
|
||||||
Amaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Bowser, Camino, Chimera,
|
Amaya, Arora, Avant, Baidu, Blazer, Bolt, Camino, Chimera, Chrome, Chromium,
|
||||||
Chrome [WebView], Chromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge,
|
Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Epiphany, Fennec, Firebird,
|
||||||
Epiphany, Fennec, Firebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe,
|
Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon,
|
||||||
IceCat, IceDragon, Iceweasel, IE[Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle,
|
Iceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links,
|
||||||
Links, Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari,
|
Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, [Mobile] Safari, Mosaic, Mozilla,
|
||||||
Mosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet],
|
Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet], Phoenix,
|
||||||
PhantomJS, Phoenix, Polaris, QQBrowser, QQBrowserLite, Quark, RockMelt, Silk, Skyfire,
|
Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser, Swiftfox,
|
||||||
SeaMonkey, Sleipnir, SlimBrowser, Swiftfox, Tizen, UCBrowser, Vivaldi, w3m, Waterfox,
|
Tizen, UCBrowser, w3m, Yandex
|
||||||
WeChat, Yandex
|
|
||||||
|
|
||||||
# 'browser.version' determined dynamically
|
# 'browser.version' & 'browser.major' determined dynamically
|
||||||
```
|
```
|
||||||
|
|
||||||
* `getDevice()`
|
* `getDevice()`
|
||||||
@@ -47,13 +38,12 @@ WeChat, Yandex
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Possible 'device.type':
|
# Possible 'device.type':
|
||||||
console, mobile, tablet, smarttv, wearable, embedded
|
console, mobile, tablet
|
||||||
|
|
||||||
# Possible 'device.vendor':
|
# Possible 'device.vendor':
|
||||||
Acer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone,
|
Acer, Alcatel, Apple, Asus, BenQ, BlackBerry, Dell, GeeksPhone, HP, HTC, Huawei,
|
||||||
Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian,
|
Lenovo, LG, Meizu, Motorola, Nexian, Nintendo, Nokia, Palm, Panasonic,
|
||||||
Nintendo, Nokia, Nvidia, OnePlus, Ouya, Palm, Panasonic, Pebble, Polytron, RIM,
|
RIM, Samsung, Siemens, Sony-Ericsson, Sprint, ZTE
|
||||||
Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, Xbox, Xiaomi, ZTE
|
|
||||||
|
|
||||||
# 'device.model' determined dynamically
|
# 'device.model' determined dynamically
|
||||||
```
|
```
|
||||||
@@ -63,8 +53,8 @@ Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, Xbox, Xiaomi, ZTE
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Possible 'engine.name'
|
# Possible 'engine.name'
|
||||||
Amaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto,
|
Amaya, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto, Tasman,
|
||||||
Tasman, Trident, w3m, WebKit
|
Trident, w3m, WebKit
|
||||||
|
|
||||||
# 'engine.version' determined dynamically
|
# 'engine.version' determined dynamically
|
||||||
```
|
```
|
||||||
@@ -74,12 +64,12 @@ Tasman, Trident, w3m, WebKit
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Possible 'os.name'
|
# Possible 'os.name'
|
||||||
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,
|
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
|
||||||
Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS,
|
Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS,
|
||||||
Joli, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD,
|
Joli, Linux, Mac OS, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD, Nintendo,
|
||||||
Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD, PCLinuxOS, Plan9, Playstation, QNX, RedHat,
|
OpenBSD, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat, RIM Tablet OS,
|
||||||
RIM Tablet OS, RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen,
|
RISC OS, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, UNIX, WebOS,
|
||||||
Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk
|
Windows [Phone/Mobile], Zenwalk
|
||||||
|
|
||||||
# 'os.version' determined dynamically
|
# 'os.version' determined dynamically
|
||||||
```
|
```
|
||||||
@@ -89,21 +79,17 @@ Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Possible 'cpu.architecture'
|
# Possible 'cpu.architecture'
|
||||||
68k, amd64, arm[64], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64]
|
68k, amd64, arm, ia32, ia64, irix, irix64, mips, mips64, pa-risc, ppc, sparc, sparc64
|
||||||
```
|
```
|
||||||
|
|
||||||
* `getResult()`
|
* `getResult()`
|
||||||
* returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
* returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
||||||
|
|
||||||
* `getUA()`
|
* `getUA()`
|
||||||
* returns UA string of current instance
|
* returns UA string of current instance
|
||||||
|
|
||||||
* `setUA(uastring)`
|
* `setUA(uastring)`
|
||||||
* set UA string to parse
|
* set & parse UA string
|
||||||
* returns current instance
|
|
||||||
|
|
||||||
|
## Example
|
||||||
# Example
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
@@ -122,7 +108,8 @@ Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk
|
|||||||
ua: "",
|
ua: "",
|
||||||
browser: {
|
browser: {
|
||||||
name: "",
|
name: "",
|
||||||
version: ""
|
version: "",
|
||||||
|
major: ""
|
||||||
},
|
},
|
||||||
engine: {
|
engine: {
|
||||||
name: "",
|
name: "",
|
||||||
@@ -151,7 +138,7 @@ Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk
|
|||||||
// this will also produce the same result (without instantiation):
|
// this will also produce the same result (without instantiation):
|
||||||
// var result = UAParser(uastring);
|
// var result = UAParser(uastring);
|
||||||
|
|
||||||
console.log(result.browser); // {name: "Chromium", version: "15.0.874.106"}
|
console.log(result.browser); // {name: "Chromium", major: "15", version: "15.0.874.106"}
|
||||||
console.log(result.device); // {model: undefined, type: undefined, vendor: undefined}
|
console.log(result.device); // {model: undefined, type: undefined, vendor: undefined}
|
||||||
console.log(result.os); // {name: "Ubuntu", version: "11.10"}
|
console.log(result.os); // {name: "Ubuntu", version: "11.10"}
|
||||||
console.log(result.os.version); // "11.10"
|
console.log(result.os.version); // "11.10"
|
||||||
@@ -176,76 +163,49 @@ Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk
|
|||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using node.js
|
### Using node.js
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ npm install ua-parser-js
|
$ npm install ua-parser-js
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var http = require('http');
|
var UAParser = require('ua-parser-js');
|
||||||
var parser = require('ua-parser-js');
|
var parser = new UAParser();
|
||||||
|
var ua = request.headers['user-agent']; // user-agent header from an HTTP request
|
||||||
http.createServer(function (req, res) {
|
console.log(parser.setUA(ua).getResult());
|
||||||
// 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
|
### Using requirejs
|
||||||
|
|
||||||
```js
|
```js
|
||||||
requirejs.config({
|
require(['ua-parser'], function(UAParser) {
|
||||||
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 CDN
|
### Using component
|
||||||
|
|
||||||
```html
|
```sh
|
||||||
<script src="https://cdn.jsdelivr.net/npm/ua-parser-js@0/dist/ua-parser.min.js"></script>
|
$ component install faisalman/ua-parser-js
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using bower
|
```js
|
||||||
|
var UAParser = require('ua-parser-js');
|
||||||
|
var parser = new UAParser();
|
||||||
|
console.log(parser.getResult());
|
||||||
|
```
|
||||||
|
|
||||||
|
### Using bower
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ bower install ua-parser-js
|
$ bower install ua-parser-js
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using meteor
|
### Using jQuery.ua
|
||||||
|
|
||||||
```sh
|
Although written in vanilla js (which means it doesn't depends on jQuery), this library will automatically detect if jQuery 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)`.
|
||||||
$ meteor add faisalman:ua-parser-js
|
|
||||||
```
|
|
||||||
|
|
||||||
## Using CLI
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ node ua-parser.min.js "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)"
|
|
||||||
# multiple args
|
|
||||||
$ node ua-parser.min.js "Opera/1.2" "Opera/3.4"
|
|
||||||
# piped args
|
|
||||||
$ echo "Opera/1.2" | node ua-parser.min.js
|
|
||||||
# log file
|
|
||||||
$ cat ua.log | node ua-parser.min.js
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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)`.
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// In browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':
|
// In browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':
|
||||||
@@ -264,60 +224,29 @@ console.log($.ua.browser.name); // "Safari"
|
|||||||
console.log($.ua.engine.name); // "Webkit"
|
console.log($.ua.engine.name); // "Webkit"
|
||||||
console.log($.ua.device); // {vendor: "Motorola", model: "Xoom", type: "tablet"}
|
console.log($.ua.device); // {vendor: "Motorola", model: "Xoom", type: "tablet"}
|
||||||
console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4
|
console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4
|
||||||
|
|
||||||
// Add class to <body> tag
|
|
||||||
// <body class="ua-browser-safari ua-devicetype-tablet">
|
|
||||||
$('body').addClass('ua-browser-' + $.ua.browser.name + ' ua-devicetype-' + $.ua.device.type);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Extending regex patterns
|
## Development
|
||||||
|
|
||||||
* `UAParser([uastring,] extensions)`
|
Install dependencies
|
||||||
|
|
||||||
Pass your own regexes to extend the limited matching rules.
|
|
||||||
|
|
||||||
```js
|
|
||||||
// Example:
|
|
||||||
var myOwnRegex = [[/(myownbrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]];
|
|
||||||
var myParser = new UAParser({ browser: myOwnRegex });
|
|
||||||
var uaString = 'Mozilla/5.0 MyOwnBrowser/1.3';
|
|
||||||
console.log(myParser.setUA(uaString).getBrowser()); // {name: "MyOwnBrowser", version: "1.3"}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
# 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 `$ 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
|
```sh
|
||||||
$ npm run build
|
$ npm install jshint
|
||||||
|
$ npm install mocha
|
||||||
|
$ npm install uglify-js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Verify, test, & minify script
|
||||||
|
|
||||||
# Donate
|
```sh
|
||||||
|
$ ./build/build.sh
|
||||||
|
```
|
||||||
|
|
||||||
Do you use & like UAParser.js but you don’t find a way to show some love? If yes, please consider donating to support this project. Otherwise, no worries, regardless of whether there is support or not, I will keep maintaining this project. Still, if you buy me a cup of coffee I would be more than happy though :)
|
## License
|
||||||
|
|
||||||
[](https://pledgie.com/campaigns/34252)
|
Dual licensed under GPLv2 & MIT
|
||||||
|
|
||||||
|
Copyright © 2012-2013 Faisalman <<fyzlman@gmail.com>>
|
||||||
# License
|
|
||||||
|
|
||||||
Dual licensed under GPLv2 or MIT
|
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
826
src/ua-parser.js
Executable file → Normal file
826
src/ua-parser.js
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
1
src/ua-parser.min.js
vendored
Normal file
1
src/ua-parser.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -102,5 +102,21 @@
|
|||||||
{
|
{
|
||||||
"architecture" : "amd64"
|
"architecture" : "amd64"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "KTB iPad",
|
||||||
|
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"architecture" : "undefined"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "KTB-Nexus 5",
|
||||||
|
"ua" : "APP-My App/1.0 (Linux; Android 4.2.1; Nexus 5 Build/JOP40D)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"architecture" : "undefined"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,97 +1,19 @@
|
|||||||
[{
|
[
|
||||||
"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",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "HTC",
|
"vendor" : "HTC",
|
||||||
"model" : "Evo Shift 4G",
|
"model" : "Evo Shift 4G",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc": "HTC Nexus 9",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; Nexus 9 Build/LRX21R) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Mobile Crosswalk/7.36.154.13 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "HTC",
|
|
||||||
"model": "Nexus 9",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Huawei Honor",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 2.3; xx-xx; U8860 Build/HuaweiU8860) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Huawei",
|
|
||||||
"model": "U8860",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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": "Huawei P10",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; VTR-L09 Build/HUAWEIVTR-L09; xx-xx) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Huawei",
|
|
||||||
"model": "VTR-L09",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Huawei Y3II",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 5.1; xx-xx; HUAWEI LUA-L03 Build/HUAWEILUA-L03) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Huawei",
|
|
||||||
"model": "LUA-L03",
|
|
||||||
"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",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "LG",
|
"vendor" : "LG",
|
||||||
"model" : "Nexus 4",
|
"model" : "Nexus 4",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
@@ -100,52 +22,18 @@
|
|||||||
{
|
{
|
||||||
"desc" : "LG Nexus 5",
|
"desc" : "LG Nexus 5",
|
||||||
"ua" : "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 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; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "LG",
|
"vendor" : "LG",
|
||||||
"model" : "Nexus 5",
|
"model" : "Nexus 5",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc": "Meizu M5 Note",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 6.0; M5 Note Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043024 Safari/537.36 MicroMessenger/6.5.7.1040 NetType/WIFI Language/zh_CN",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Meizu",
|
|
||||||
"model": "M5 Note",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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",
|
|
||||||
"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",
|
"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",
|
"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",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "Motorola",
|
"vendor" : "Motorola",
|
||||||
"model" : "DROID RAZR 4G",
|
"model" : "DROID RAZR 4G",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
@@ -154,7 +42,8 @@
|
|||||||
{
|
{
|
||||||
"desc" : "iPhone",
|
"desc" : "iPhone",
|
||||||
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
|
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "Apple",
|
"vendor" : "Apple",
|
||||||
"model" : "iPhone",
|
"model" : "iPhone",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
@@ -163,693 +52,191 @@
|
|||||||
{
|
{
|
||||||
"desc" : "Motorola Droid RAZR 4G",
|
"desc" : "Motorola Droid RAZR 4G",
|
||||||
"ua" : "Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A501 Safari/9537.53",
|
"ua" : "Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A501 Safari/9537.53",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "Apple",
|
"vendor" : "Apple",
|
||||||
"model" : "iPod touch",
|
"model" : "iPod touch",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "Moto X",
|
"desc" : "AppleCoreMedia",
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2; xx-xx; XT1058 Build/13.9.0Q2.X-70-GHOST-ATT_LE-2) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
"ua" : "AppleCoreMedia/1.0.0.10A403 (iPad; U; CPU OS 6_0 like Mac OS X; it_it)",
|
||||||
"expect": {
|
"expect" :
|
||||||
"vendor": "Motorola",
|
{
|
||||||
"model": "XT1058",
|
"vendor" : "Apple",
|
||||||
|
"model" : "iPad",
|
||||||
|
"type" : "tablet"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "AppleTV",
|
||||||
|
"ua" : "AppleTV/3.0.2 (Macintosh; Intel Mac OS X 10.4.7) AppleWebKit/528.18",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Apple",
|
||||||
|
"model" : "Apple TV",
|
||||||
|
"type" : "undefined"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "AppleTV",
|
||||||
|
"ua" : "AppleCoreMedia/1.0.0.11B511d (Apple TV; U; CPU OS 7_0_3 like Mac OS X; es_es)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Apple",
|
||||||
|
"model" : "Apple TV",
|
||||||
|
"type" : "undefined"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Dalvik",
|
||||||
|
"ua" : "Dalvik/1.2.0 (Linux; U; Android 2.2.1; GT-S5830L Build/FROYO)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "Samsung",
|
||||||
|
"model" : "GT-S5830L",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "GStreamer",
|
||||||
|
"ua" : "GStreamer souphttpsrc (compatible; LG NetCast.TV-2012) libsoup/2.34.2",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "LG",
|
||||||
|
"model" : "undefined",
|
||||||
|
"type" : "smarttv"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "HTC Streaming Player",
|
||||||
|
"ua" : "HTC Streaming Player htc_asia_wwe / 1.0 / endeavoru / 4.1.1",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "HTC",
|
||||||
|
"model" : "undefined",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "HTC One S",
|
||||||
|
"ua" : "HTC_One_S/3.16.111.10",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "HTC",
|
||||||
|
"model" : "One S",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "LG Player",
|
||||||
|
"ua" : "LG Player 1.0; Android",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "LG",
|
||||||
|
"model" : "undefined",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "NexPlayer",
|
||||||
|
"ua" : "LG-P700/V10k-DEC-12-2012 Player/NexPlayer 4.0 for Android",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "LG",
|
||||||
|
"model" : "P700",
|
||||||
|
"type" : "mobile"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "LG Player",
|
||||||
|
"ua" : "LGE400/V10b Player/LG Player 1.0",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"vendor" : "LG",
|
||||||
|
"model" : "E400",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Nokia3xx",
|
"desc" : "Nokia3xx",
|
||||||
"ua" : "Nokia303/14.87 CLDC-1.1",
|
"ua" : "Nokia303/14.87 CLDC-1.1",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "Nokia",
|
"vendor" : "Nokia",
|
||||||
"model" : "303",
|
"model" : "303",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "OnePlus One",
|
"desc" : "KTB-iPhone",
|
||||||
"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",
|
"ua" : "APP-BE/1.0 (iPhone; Apple; CPU iPhone OS 7_0 like Mac OS X)",
|
||||||
"expect": {
|
"expect" :
|
||||||
"vendor": "OnePlus",
|
{
|
||||||
"model": "1",
|
"vendor" : "Apple",
|
||||||
|
"model" : "iPhone",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "OnePlus 3",
|
"desc" : "stagefright",
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.1.1; ONEPLUS A3000 Build/NMF26F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.98 Mobile Safari/537.36",
|
"ua" : "Samsung GT-I9070 stagefright/1.1 (Linux;Android 2.3.6)",
|
||||||
"expect": {
|
"expect" :
|
||||||
"vendor": "OnePlus",
|
{
|
||||||
"model": "A3000",
|
"vendor" : "Samsung",
|
||||||
|
"model" : "GT-I9070",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "OPPO R7s",
|
"desc" : "KTB-iPod Touch",
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.4.4; zh-cn; OPPO R7s Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/7.1 Mobile Safari/537.36",
|
"ua" : "APP-BE/1.0 (iPod touch; Apple; CPU iPhone OS 7_0_2 like Mac OS X)",
|
||||||
"expect": {
|
"expect" :
|
||||||
"vendor": "OPPO",
|
{
|
||||||
"model": "R7s",
|
"vendor" : "Apple",
|
||||||
|
"model" : "iPod touch",
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "Philips SmartTV",
|
"desc" : "rad.io",
|
||||||
"ua": "Opera/9.80 HbbTV/1.1.1 (; Philips; ; ; ; ) NETTV/4.0.2; en) Version/11.60",
|
"ua" : "rad.io 1.18.1 rv:593 (iPhone 4S; iPhone OS 7.0.4; it_IT)",
|
||||||
"expect": {
|
"expect" :
|
||||||
"vendor": "Philips",
|
{
|
||||||
"model": "",
|
"vendor" : "Apple",
|
||||||
"type": "smarttv"
|
"model" : "iPhone 4S",
|
||||||
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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",
|
||||||
"expect": {
|
"expect" :
|
||||||
|
{
|
||||||
"vendor" : "Amazon",
|
"vendor" : "Amazon",
|
||||||
"model" : "KFTT",
|
"model" : "KFTT",
|
||||||
"type" : "tablet"
|
"type" : "tablet"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "Samsung Galaxy Note 8",
|
"desc" : "KTB-iPad",
|
||||||
"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",
|
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)",
|
||||||
"expect": {
|
"expect" :
|
||||||
"vendor": "Samsung",
|
{
|
||||||
"model": "GT-N5100",
|
"vendor" : "Apple",
|
||||||
|
"model" : "iPad",
|
||||||
"type" : "tablet"
|
"type" : "tablet"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc": "Samsung SM-C5000",
|
"desc" : "KTB-Nexus 5",
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; SM-C5000 Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.81 Mobile Safari/537.36 wkbrowser 4.1.35 3065",
|
"ua" : "APP-My App/1.0 (Linux; Android 4.2.1; Nexus 5 Build/JOP40D)",
|
||||||
"expect": {
|
"expect" :
|
||||||
"vendor": "Samsung",
|
|
||||||
"model": "SM-C5000",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"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",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Samsung",
|
|
||||||
"model": "SM-T231",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Samsung SM-T700",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; SM-T700 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Samsung",
|
|
||||||
"model": "SM-T700",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Samsung SM-T520",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; SM-T520 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Samsung",
|
|
||||||
"model": "SM-T520",
|
|
||||||
"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)",
|
|
||||||
"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",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Sony",
|
|
||||||
"model": "C5303",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Sony SO-02F (Xperia Z1 F)",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; SO-02F Build/14.1.H.2.119) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Sony",
|
|
||||||
"model": "SO-02F",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Sony D6653 (Xperia Z3)",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4; D6653 Build/23.0.A.0.376) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.141 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Sony",
|
|
||||||
"model": "D6653",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Sony Xperia SOL25 (ZL2)",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.4; SOL25 Build/17.1.1.C.1.64) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Sony",
|
|
||||||
"model": "SOL25",
|
|
||||||
"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": "C5302",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Sony",
|
|
||||||
"model": "Xperia Tablet",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Sony Tablet S",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 3.1; Sony Tablet S Build/THMAS10000) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Sony",
|
|
||||||
"model": "Xperia Tablet",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Sony Tablet Z LTE",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1; SonySGP321 Build/10.2.C.0.143) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Sony",
|
|
||||||
"model": "Xperia Tablet",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Xiaomi 2013023",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; en-US; 2013023 Build/HM2013023) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 UCBrowser/10.0.1.512 U3/0.8.0 Mobile Safari/533.1",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "2013023",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Xiaomi Hongmi Note 1W",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.2; zh-CN; HM NOTE 1W Build/JDQ39) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 UCBrowser/9.7.9.439 U3/0.8.0 Mobile Safari/533.1",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "HM NOTE 1W",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Xiaomi Mi 3C",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.3; zh-CN; MI 3C Build/JLS36C) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 UCBrowser/9.7.9.439 U3/0.8.0 Mobile Safari/533.1",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "MI 3C",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Xiaomi Mi 5",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; MI 5 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.83 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "MI 5",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Xiaomi Mi 6",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.1; MI 6 Build/NMF26X; xx-xx) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/59.0.3071.125 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "MI 6",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Xiaomi Mi 5s Plus",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; zh-cn; MI 5s Plus Build/MXB48T) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.146 Mobile Safari/537.36 XiaoMi/MiuiBrowser/8.7.1",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "MI 5s Plus",
|
|
||||||
"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",
|
|
||||||
"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",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Google Chromecast",
|
|
||||||
"ua": "Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.84 Safari/537.36 CrKey/1.22.79313",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Google",
|
|
||||||
"model": "Chromecast"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Google Pixel C",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.0; Pixel C Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.98 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Google",
|
|
||||||
"model": "Pixel C",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Google Pixel",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.1; Pixel Build/NDE63V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Google",
|
|
||||||
"model": "Pixel",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Google Pixel",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 7.1; Pixel XL Build/NDE63X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Google",
|
|
||||||
"model": "Pixel XL",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"desc": "Generic Android Device",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; i980 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Generic",
|
|
||||||
"model": "Android 6.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "LG VK Series Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.2; VK700 Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.84 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor" : "LG",
|
"vendor" : "LG",
|
||||||
"model": "VK700",
|
"model" : "Nexus 5",
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "LG LK Series Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.1; LGLK430 Build/LRX21Y) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/38.0.2125.102 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "LG",
|
|
||||||
"model": "LK430",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "RCA Voyager III Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; RCT6973W43 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "RCA",
|
|
||||||
"model": "RCT6973W43",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "RCA Voyager II Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; RCT6773W22B Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "RCA",
|
|
||||||
"model": "RCT6773W22B",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Verizon Quanta Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; QMV7B Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Verizon",
|
|
||||||
"model": "QMV7B",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Verizon Ellipsis 8 Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; QTAQZ3 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Verizon",
|
|
||||||
"model": "QTAQZ3",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Verizon Ellipsis 8HD Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; QTASUN1 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Verizon",
|
|
||||||
"model": "QTASUN1",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Dell Venue 8 Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Venue 8 3830 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Dell",
|
|
||||||
"model": "Venue 8 3830",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Dell Venue 7 Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Venue 7 3730 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Dell",
|
|
||||||
"model": "Venue 7 3730",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Barnes & Noble Nook HD+ Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; Barnes & Noble Nook HD+ Build/JZO54K; CyanogenMod-10) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Barnes & Noble",
|
|
||||||
"model": "Nook HD+",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Barnes & Noble V400 Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.0.4; BNTV400 Build/IMM76L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Barnes & Noble",
|
|
||||||
"model": "V400",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "NuVision TM101A540N Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; TM101A540N Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/50.0.2661.86 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "NuVision",
|
|
||||||
"model": "TM101A540N",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "ZTE K Series Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; K88 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "ZTE",
|
|
||||||
"model": "K88",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Swizz GEN610",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; GEN610 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Swiss",
|
|
||||||
"model": "GEN610",
|
|
||||||
"type" : "mobile"
|
"type" : "mobile"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Swizz ZUR700",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; ZUR700 Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Swiss",
|
|
||||||
"model": "ZUR700",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Zeki TB782b Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; en-US; TB782B Build/IMM76D) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.0.2.299 U3/0.8.0 Mobile Safari/534.31",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Zeki",
|
|
||||||
"model": "TB782B",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Dragon Touch Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.0.4; DT9138B Build/IMM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.72 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Dragon Touch",
|
|
||||||
"model": "9138B",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Insignia Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; NS-P08A7100 Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Insignia",
|
|
||||||
"model": "NS-P08A7100",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Voice Xtreme V75",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.2.1; en-us; V75 Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Voice",
|
|
||||||
"model": "V75",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "LvTel V11",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.1.1; V11 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "LvTel",
|
|
||||||
"model": "V11",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Envizen Tablet V100MD",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; V100MD Build/V100MD.20130816) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Envizen",
|
|
||||||
"model": "V100MD",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Rotor Tablet",
|
|
||||||
"ua": "mozilla/5.0 (linux; android 5.0.1; tu_1491 build/lrx22c) applewebkit/537.36 (khtml, like gecko) chrome/43.0.2357.93 safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Rotor",
|
|
||||||
"model": "1491",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "MachSpeed Tablets",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.4.2; Trio 7.85 vQ Build/Trio_7.85_vQ) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "MachSpeed",
|
|
||||||
"model": "Trio 7.85 vQ",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Trinity Tablets",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.0.1; Trinity T101 Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Trinity",
|
|
||||||
"model": "T101",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "NextBook Next7",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Next7P12 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "NextBook",
|
|
||||||
"model": "Next7P12",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "NextBook Tablets",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.0; NXA8QC116 Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "NextBook",
|
|
||||||
"model": "NXA8QC116",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Le Pan Tablets",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Le Pan TC802A Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Le Pan",
|
|
||||||
"model": "TC802A",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Le Pan Tablets",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Le Pan TC802A Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Le Pan",
|
|
||||||
"model": "TC802A",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Amazon Kindle Fire Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; U; Android 4.4.3; en-us; KFSAWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/3.66 like Chrome/39.0.2171.93 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Amazon",
|
|
||||||
"model": "KFSAWI",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Gigaset Tablet",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Gigaset QV830 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Gigaset",
|
|
||||||
"model": "QV830",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "Redmi Note 3",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 6.0.1; Redmi Note 3 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "Redmi Note 3",
|
|
||||||
"type": "mobile"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"desc": "MI PAD 2",
|
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 5.1; MI PAD 2 Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Safari/537.36 [FB_IAB/FB4A;FBAV/137.0.0.24.91;]",
|
|
||||||
"expect": {
|
|
||||||
"vendor": "Xiaomi",
|
|
||||||
"model": "MI PAD 2",
|
|
||||||
"type": "tablet"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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",
|
"desc" : "Gecko",
|
||||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b9pre) Gecko/20110111 Firefox/4.0b9pre",
|
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b9pre) Gecko/20110111 Firefox/4.0b9pre",
|
||||||
@@ -70,5 +61,24 @@
|
|||||||
"name" : "WebKit",
|
"name" : "WebKit",
|
||||||
"version" : "533.19.4"
|
"version" : "533.19.4"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "KTA Mobile App",
|
||||||
|
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Mobile-App",
|
||||||
|
"version" : "1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "KTB-Nexus 5",
|
||||||
|
"ua" : "APP-My App/1.0 (Linux; Android 4.2.1; Nexus 5 Build/JOP40D)",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Mobile-App",
|
||||||
|
"version" : "1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,582 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -71,15 +71,6 @@
|
|||||||
"version" : "8"
|
"version" : "8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc" : "Windows 10",
|
|
||||||
"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" :
|
|
||||||
{
|
|
||||||
"name" : "Windows",
|
|
||||||
"version" : "10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"desc" : "Windows RT",
|
"desc" : "Windows RT",
|
||||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
|
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
|
||||||
@@ -107,15 +98,6 @@
|
|||||||
"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)",
|
||||||
@@ -154,11 +136,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Tizen",
|
"desc" : "Tizen",
|
||||||
"ua" : "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.3 Mobile Safari/537.3",
|
"ua" : "",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Tizen",
|
"name" : "",
|
||||||
"version" : "2.3"
|
"version" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -260,15 +242,6 @@
|
|||||||
"version" : ""
|
"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",
|
"desc" : "Mint",
|
||||||
"ua" : "",
|
"ua" : "",
|
||||||
@@ -289,20 +262,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Ubuntu",
|
"desc" : "Ubuntu",
|
||||||
"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",
|
"ua" : "",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Ubuntu",
|
"name" : "",
|
||||||
"version" : "12.04"
|
"version" : ""
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -485,15 +449,6 @@
|
|||||||
"version" : ""
|
"version" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"desc" : "iOS in App",
|
|
||||||
"ua" : "AppName/version CFNetwork/version Darwin/version",
|
|
||||||
"expect" :
|
|
||||||
{
|
|
||||||
"name" : "iOS",
|
|
||||||
"version" : "undefined"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"desc" : "iOS with Chrome",
|
"desc" : "iOS with Chrome",
|
||||||
"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",
|
||||||
@@ -517,17 +472,17 @@
|
|||||||
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36",
|
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Mac OS",
|
"name" : "Mac OS X",
|
||||||
"version" : "10.6.8"
|
"version" : "10.6.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Haiku",
|
"desc" : "Haiku",
|
||||||
"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",
|
"ua" : "",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"name" : "Haiku",
|
"name" : "",
|
||||||
"version" : "R1"
|
"version" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
48
test/test.js
48
test/test.js
@@ -1,5 +1,4 @@
|
|||||||
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');
|
||||||
@@ -64,50 +63,3 @@ for (var i in methods) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('Returns', function () {
|
|
||||||
it('getResult() should returns JSON', function(done) {
|
|
||||||
assert.deepEqual(new UAParser('').getResult(),
|
|
||||||
{
|
|
||||||
ua : '',
|
|
||||||
browser: { name: undefined, version: undefined, major: undefined },
|
|
||||||
cpu: { architecture: undefined },
|
|
||||||
device: { vendor: undefined, model: undefined, type: undefined },
|
|
||||||
engine: { name: undefined, version: undefined},
|
|
||||||
os: { name: undefined, version: undefined }
|
|
||||||
});
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
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 parser1 = new UAParser(uaString, {browser: myOwnBrowser});
|
|
||||||
assert.equal(parser1.getBrowser().name, 'MyOwnBrowser');
|
|
||||||
assert.equal(parser1.getBrowser().version, '1.3');
|
|
||||||
assert.equal(parser1.getBrowser().major, '1');
|
|
||||||
|
|
||||||
var parser2 = new UAParser({browser: myOwnBrowser});
|
|
||||||
assert.equal(parser2.getBrowser().name, undefined);
|
|
||||||
parser2.setUA(uaString);
|
|
||||||
assert.equal(parser2.getBrowser().name, 'MyOwnBrowser');
|
|
||||||
assert.equal(parser1.getBrowser().version, '1.3');
|
|
||||||
});
|
|
||||||
|
|
||||||
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();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
32
ua-parser-js.jquery.json
Normal file
32
ua-parser-js.jquery.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"title": "UAParser.js",
|
||||||
|
"name": "ua-parser-js",
|
||||||
|
"version": "0.7.0",
|
||||||
|
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||||
|
"keywords": [
|
||||||
|
"user-agent",
|
||||||
|
"parser",
|
||||||
|
"browser",
|
||||||
|
"engine",
|
||||||
|
"os",
|
||||||
|
"device",
|
||||||
|
"cpu"
|
||||||
|
],
|
||||||
|
"homepage": "https://faisalman.github.com/ua-parser-js",
|
||||||
|
"author": {
|
||||||
|
"name": "Faisal Salman",
|
||||||
|
"email": "fyzlman@gmail.com"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"jquery": ">=1.5"
|
||||||
|
},
|
||||||
|
"licenses": [
|
||||||
|
{
|
||||||
|
"type": "MIT",
|
||||||
|
"url": "http://www.opensource.org/licenses/mit-license.php"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bugs": "https://github.com/faisalman/ua-parser-js/issues",
|
||||||
|
"docs": "https://github.com/faisalman/ua-parser-js",
|
||||||
|
"download": "https://raw.github.com/faisalman/ua-parser-js/master/src/ua-parser.min.js"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user