Compare commits

...

271 Commits

Author SHA1 Message Date
Faisal Salman
6095258673 Fix #268 revert changes 2017-10-12 15:16:23 +07:00
Faisal Salman
40aa1a693b bump version 2017-10-12 12:10:08 +07:00
Faisal Salman
25e143ee7c Fix vulnerable regex in getOS() (as reported by Nick Starke) 2017-10-12 12:07:10 +07:00
Faisal Salman
7bd9ffea24 Fix #262 Chrome Headless 2017-10-12 09:48:25 +07:00
Faisal Salman
c566f45cbd Merge branch 'master' into develop 2017-10-12 09:39:37 +07:00
Faisal Salman
3b89dff771 increment revision 0.7.15 2017-10-12 09:28:14 +07:00
Faisal Salman
5ba5e7abc9 Merge branch 'develop' of github.com:faisalman/ua-parser-js into develop 2017-10-12 09:19:03 +07:00
Faisal Salman
b8978f5933 Fix #262 Chrome Headless 2017-10-12 09:18:42 +07:00
Faisal Salman
eeb1b9ef81 Merge pull request #265 from brophdawg11/support-ios-gsa
Add support for Google Search Appliance on iOS
2017-10-11 21:35:06 +07:00
Faisal Salman
aeae29be66 Merge pull request #267 from LukasDrgon/patch-1
Add CDN link
2017-10-11 20:48:39 +07:00
Lukas Drgon
3ce12c0cf9 Add CDN link 2017-10-02 19:31:03 +02:00
Matt Brophy
4d95ac10ef Add support for Google Search Appliance on iOS 2017-09-19 14:19:32 -04:00
Faisal Salman
61b4a089c5 Merge pull request #264 from arunrreddy/support-device-redmi
Support device redmi
2017-09-17 06:02:39 +07:00
Arun Rama Reddy
74ec93ffb6 feat: Added Redmi phone and Mi Pad tablet detection support 2017-09-16 11:12:29 +05:30
Faisal Salman
459f3d34f5 Issue #258 0.7.15rc 2017-08-06 08:27:02 +07:00
Faisal Salman
6f621f1ae2 New feature: CLI support 2017-08-06 07:55:22 +07:00
Faisal Salman
7ae3098778 Fix #256 tag new release 0.7.14 2017-07-19 19:39:01 +07:00
Faisal Salman
806c2b8030 move jquery.json to package.json 2017-07-19 19:35:42 +07:00
Faisal Salman
cb1a64b509 Merge some commits from branch 'develop' 2017-07-17 23:14:19 +07:00
Faisal Salman
b49cfae4e2 Opening donation 2017-07-17 22:54:45 +07:00
Faisal Salman
91b046462c Merge branch 'master' of github.com:faisalman/ua-parser-js 2017-07-17 22:51:38 +07:00
Faisal Salman
69509af6dd Merge pull request #254 from hr6r/develop
+ browser inside QQ support
2017-07-05 19:01:27 +07:00
Faisal Salman
225f703b67 Merge pull request #231 from motnik/develop
Added Multiple Tablets Detection (LG, RCA, Dell, Verizon, etc.)
2017-07-05 19:00:02 +07:00
dianhe
7f217753f5 + browser inside QQ support 2017-07-05 19:55:19 +08:00
Faisal Salman
10f9fb35ca Merge pull request #234 from Kronuz/patch-1
Fix server side rendering
2017-07-05 18:38:48 +07:00
Faisal Salman
5ae468a3d3 uastring is optional when using extensions 2017-07-01 20:28:03 +07:00
Faisal Salman
fd46c4d2be Fix #249 Detect Huawei devices 2017-07-01 18:49:35 +07:00
Faisal Salman
297c6538bc Fix #206 Detect OS for iOS app 2017-06-28 16:12:43 +07:00
Faisal Salman
f9f9fa79e1 Fix #247 Add Oculus Browser 2017-06-28 15:57:50 +07:00
Faisal Salman
07fe58b793 Fix #220 Identify UBrowser as UCBrowser 2017-06-28 14:54:39 +07:00
Faisal Salman
3a4626b5e8 Fix #211 Distinguish Samsung Browser from Android Browser 2017-06-28 14:20:05 +07:00
Faisal Salman
3fd01f07ea Fix #235 Detect Meizu Tablet 2017-06-22 17:37:35 +07:00
Faisal Salman
d103dd5450 Fix #219 samsung mistakenly detected as sony 2017-06-22 17:04:14 +07:00
Faisal Salman
6cc6742f5e increment patch version 2017-06-22 14:20:01 +07:00
Faisal Salman
cf977c50ed remove component.json 2017-06-22 14:11:17 +07:00
Faisal Salman
4c15b10730 revert readme.md fix 2017-06-03 02:28:55 +07:00
Faisal Salman
a3c7619d3a fix readme.md conflict 2017-06-03 01:08:20 +07:00
Faisal Salman
82aba654f9 Merge pull request #242 from ebbmo/feature/recognize_facebook_browser_for_android
Facebook browser now recognized as well (not only iOS)
2017-05-23 14:55:27 +07:00
Hermann Ebert
2f1b14906f Facebook browser now recognized as well (not only iOS) 2017-05-23 09:06:58 +02:00
Faisal Salman
a3a09d33bc Merge pull request #236 from ronkorland/master
Add support for Chrome Headless user agent
2017-05-17 09:49:29 +07:00
Faisal Salman
946ba02c54 Merge pull request #228 from arturom/develop
Added Google Chromemast detection
2017-05-15 00:38:11 +07:00
Faisal Salman
d2d570fcd5 Merge pull request #233 from vladimyr/develop
Adding Opera Coast support, fixing UCBrowser detection
2017-05-15 00:33:38 +07:00
Faisal Salman
18e08428f4 Merge pull request #216 from ericschrenker/0readme
Copyedit Readme File
2017-04-26 11:15:28 +07:00
Ron Korland
552915907e Add support to Chrome Headless user agent 2017-04-13 16:42:04 +03:00
Germán M. Bravo
6984de7927 Fix server side rendering
Fixes problem when window is undefined in the server.
2017-03-30 16:13:41 -06:00
Dario Vladovic
7a68f35574 Adding support for Puffin browser 2017-03-21 18:41:51 +01:00
Dario Vladovic
2bc75f10bc Adding Opera Coast support, fixing UCBrowser detection
- pushing UCBrowser up to avoid being caught by Chrome regex
- adding regex for Opera Coast (Opera's iOS browser)
2017-03-21 18:09:15 +01:00
Nikhil Motiani
2610f37a8b Added Gigaset Tablet detection 2017-03-16 20:39:21 +05:30
Nikhil Motiani
a25bb8b1a6 Added Amazon Kindle Fire Tablet detection 2017-03-16 20:35:11 +05:30
Nikhil Motiani
ee2db31f8c Added Le-Pan Tablet detection 2017-03-16 20:27:04 +05:30
Nikhil Motiani
89775a8ae7 Added NextBook Tablet detection 2017-03-16 20:19:14 +05:30
Nikhil Motiani
7d826ed62e Improved Unidentified Tablet detection 2017-03-16 20:09:22 +05:30
Nikhil Motiani
a6316f02b0 Added Trinity Tablets detection 2017-03-16 20:06:33 +05:30
Nikhil Motiani
72a11e24b2 Added MachSpeed Tablets detection 2017-03-16 20:00:42 +05:30
Nikhil Motiani
f7ca724f3b Added Rotor Tablets detection 2017-03-16 19:56:40 +05:30
Nikhil Motiani
8d826fcc24 Added Envizen Tablets detection 2017-03-16 19:51:44 +05:30
Nikhil Motiani
951106c425 Added LvTel Phones detection 2017-03-16 19:44:21 +05:30
Nikhil Motiani
83ca52bb28 Added Voice Xtreme Phones detection 2017-03-16 19:43:50 +05:30
Nikhil Motiani
6fb4941458 Added Insignia Tablets detection 2017-03-16 15:48:22 +05:30
Nikhil Motiani
48ab3b372c Added Dragon-Touch Tablets detection 2017-03-16 15:45:39 +05:30
Nikhil Motiani
38c409e8d9 Added Zeki Tablets detection 2017-03-16 15:27:35 +05:30
Nikhil Motiani
4e2cbdfd16 Added Swiss Mobiles and Tablets detection 2017-03-16 15:19:22 +05:30
Nikhil Motiani
fbe8a0e3a6 Added Generic Android detection 2017-03-16 15:09:01 +05:30
Nikhil Motiani
8e9c400ec5 Added ZTE K-Series Tablet detection 2017-03-16 15:07:22 +05:30
Nikhil Motiani
b89fa098aa Added NuVision Tablet detection 2017-03-16 15:04:02 +05:30
Nikhil Motiani
f3882f1882 Added Barnes & Noble Tablet detection 2017-03-16 15:03:04 +05:30
Nikhil Motiani
a25426840c Added Dell Venue Tablet detection 2017-03-16 15:01:49 +05:30
Nikhil Motiani
985a7b18e0 Added Verizon Devices detection 2017-03-16 15:00:00 +05:30
Nikhil Motiani
8e09cd49e3 Added RCA Devices detection 2017-03-16 14:57:28 +05:30
Nikhil Motiani
4768992762 Added LG Generic Mobile 2017-03-16 14:54:40 +05:30
Nikhil Motiani
f89e08f2c0 Improved LG Tablet Detection 2017-03-16 14:47:11 +05:30
Arturo Mejia
fe568ffe96 Added Google Chromemast detection 2017-03-08 12:55:35 -05:00
Eric Schrenker
252db2534e 📝 copyedit readme 2017-01-17 14:43:09 -06:00
Faisal Salman
6555bf6e81 Fix #210 Refine browser: QQBrowser 2016-12-27 16:36:51 +07:00
Faisal Salman
740fc93b4b Fix #210 Add device: OPPO 2016-12-27 15:58:58 +07:00
Faisal Salman
eed646f9ce Add Bowser 2016-12-22 23:50:01 +07:00
Faisal Salman
764de40fe0 Merge pull request #205 from piperchester/patch-1
Fix formatting for consistency
2016-12-07 14:35:43 +07:00
Piper Chester
49609c0990 Fix formatting for consistency 2016-12-06 22:16:25 -08:00
Faisal Salman
ef69224d7c Edit readme 2016-12-06 13:47:30 +07:00
Faisal Salman
caa2f47c06 update uglify version 2016-12-06 12:44:16 +07:00
Faisal Salman
5177c460a5 Use constructors 2016-12-06 12:41:48 +07:00
Faisal Salman
3e2d5c1817 Update contributors 2016-11-22 14:03:54 +07:00
Faisal Salman
29a0372611 Merge branch 'master' into develop 2016-11-22 00:52:24 +07:00
Faisal Salman
2aa2f77881 Fix #186 unnecessary if statement inside while loop 2016-11-22 00:49:18 +07:00
Faisal Salman
1e228b2fbe Merge pull request #201 from roberttod/google-pixel
Add google pixel devices
2016-11-18 14:50:13 +07:00
Robert Tod
5379ec8513 Add google pixel devices
- Add Google Pixel and Google Pixel XL mobiles
- Add Google Pixel C tablet
2016-11-17 13:36:08 -05:00
Faisal Salman
01ae611dfa Build dist package 2016-11-14 10:14:01 +07:00
Faisal Salman
2de1f2a75d Remove ComponentJS support 2016-11-14 10:12:49 +07:00
Faisal Salman
975cbdc89e Bumping version: 0.7.11 -> 0.7.12 2016-11-14 10:02:07 +07:00
Faisal Salman
507714c3c7 Move logo to right 2016-11-14 00:42:43 +07:00
Faisal Salman
2b4a20d162 Edit readme 2016-11-14 00:33:56 +07:00
Faisal Salman
34848e8ec2 Fix #187 #171 #92 Require.js 2016-11-11 18:40:26 +07:00
Faisal Salman
97b52b2cfd Test unit for extension 2016-11-11 13:58:15 +07:00
Faisal Salman
9f0419607b Fix #127 galaxy note 2016-11-11 10:40:32 +07:00
Faisal Salman
b13c891d7f Fix #190 haiku 2016-11-11 09:26:59 +07:00
Faisal Salman
7f9919f896 Fix #185 Huawei Nexus 6P 2016-11-10 09:41:16 +07:00
Faisal Salman
9fe7561d78 Fix #96 Moto X 2016-11-10 09:30:04 +07:00
Faisal Salman
b99840d074 Fix #158 xiaomi mi note 2016-11-10 09:24:00 +07:00
Faisal Salman
61b0f1c054 Fix #87 oneplus one 2016-11-10 09:16:17 +07:00
Faisal Salman
58880fda7f Fix #43 #68 xperia sp & asus padfone 2016-11-10 09:11:23 +07:00
Faisal Salman
73735e1ca8 Fix #37 #38 test case for nexus 7 & ipod 2016-11-10 08:57:15 +07:00
Faisal Salman
0f0ea13fab Fix #99 Wrong Windows version 2016-11-10 00:45:48 +07:00
Faisal Salman
1fb82fb6ff Smart-TV ordering 2016-11-10 00:43:20 +07:00
Faisal Salman
88f2f4e24c Fix #32 browser recognized as version 2016-11-10 00:21:28 +07:00
Faisal Salman
1a4dab5829 Edit readme: guide to contribute 2016-11-09 23:41:57 +07:00
Faisal Salman
2467a458e3 Fix #22 #33 #34 #129 Distinguish stock Android Browser from Chrome 2016-11-09 22:37:21 +07:00
Faisal Salman
aadabcce29 Fix #188 Separate Chrome WebView from Chrome 2016-11-09 19:32:20 +07:00
Faisal Salman
d0b7c5892f Samsung smarttv misidentified as mobile 2016-11-09 19:27:41 +07:00
Faisal Salman
d3f959ee28 Split mediaplayer test cases, edit readme 2016-11-09 18:09:11 +07:00
Faisal Salman
d1a33d7d85 Test case for #174 2016-11-08 12:55:56 +07:00
Faisal Salman
3dae55a3c8 Fix #197 microsoft lumia 2016-11-08 12:55:19 +07:00
Faisal Salman
87b88246a2 Merge branch 'master' of github.com:faisalman/ua-parser-js 2016-11-07 21:34:16 +07:00
Faisal Salman
a56c990ec3 Fix #188 distinguish webview from chrome 2016-11-07 21:34:05 +07:00
Faisal Salman
458f3c3cd2 Merge pull request #196 from leventebalogh/patch-1
Fix: don't define the RequireJs module with name
2016-11-07 20:27:24 +07:00
Levente Balogh
f28f87c412 Fix: don't define the RequireJs module with name
If we define it with name it becomes less portable and breaks code that used version `0.7.10`.
This is not correct according to **semver**, as this is a `patch` only which should not break APIs.

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

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

These changes reflect your license choice according to #1
2016-05-23 11:33:12 +02:00
Benjamin Urban
1020d10a30 Add generic device detection for samsung smartphones 2016-03-22 15:08:11 +01:00
Frédéric Camblor
5ba9fd50ed Fixed require sample in readme
Module name is `ua-parser-js`, not `ua-parser` (see [here](d929c3e508/src/ua-parser.js (L855)))
2016-03-17 18:03:33 +01:00
philippsimon
bb69ef2bd4 Get SmartTV device by HbbTV part 2016-02-26 18:53:43 +01:00
Faisal Salman
3a457f9bd9 Merge pull request #136 from malash/fix/util-extend
Rewrite util.extend to a clone version
2016-02-25 10:54:54 +07:00
Malash
d929c3e508 Merge branch 'master' into fix/util-extend
* master:
  Meteor fixes
  fix it for opera mini 8 above on iphone
  Add name to UA-Parser
  Fix image #150
  Increment build version: 0.7.10
  Check for tablet first
  Fix #153 mistaken Search phrase for Arch OS
  Seems to fix the issue for specific UA found in #159
  UAParser is exposed globally to the window object. It can be used directly.
  Fix detection of Firefox on iOS.
  Added hasOwnProperty check
  Generalize the check for an unidentifiable mobile or tablet to correctly categorize unidentifiable Android smartphones as "mobile".
  travis update: node_js stable, cache node_modules, sudo false
  Detect Nexus 6 as Motorola only.
  Add Playstation 4 support.
  Added Nexus 6 detection
  Added DEVICE regular expressions for "Samsung galaxy S6" and "Samsung Galaxy S6 Edge" devices + test cases
  Adding PhantomJS (http://phantomjs.org/)
  Add Sleipnir
2016-02-22 15:15:09 +08:00
Faisal Salman
0d42b3a752 Merge pull request #163 from jobrapido/develop
Optimized Android browser regex patterns
2016-02-21 22:47:04 +07:00
Faisal Salman
1ec2119288 Merge pull request #160 from gryphon/master
Add name to UA-Parser RequireJS module
2016-02-21 22:46:56 +07:00
Andrea Vaghi
4344c43d04 run build 2016-01-28 11:05:27 +01:00
Andrea Vaghi
909d6fc26d Optimized pattern for Android browser, moved them before the Chrome pattern to avoid errors in the some of the newest browsers 2016-01-28 11:01:05 +01:00
Faisal Salman
8e46a85549 Merge pull request #162 from cesarve77/patch-1
Meteor fixes
2016-01-07 09:11:13 +07:00
Faisal Salman
1f92d6148c Merge pull request #161 from yupmin/opera-mini-8-above-iphone
fix it for opera mini 8 above on iphone
2016-01-07 09:10:02 +07:00
CESAR RAMOS
5d57850074 Meteor fixes 2016-01-03 21:23:20 -04:30
Yun Young-jin
8e81811dea fix it for opera mini 8 above on iphone
https://dev.opera.com/blog/opera-mini-8-for-ios/
2015-12-30 12:00:33 +09:00
Grigory Dmitrenko
99a80e88fb Add name to UA-Parser 2015-12-23 14:10:37 +03:00
Faisal Salman
cbba2f5728 Fix image #150 2015-12-12 18:26:40 +07:00
Faisal Salman
fd39be3336 Increment build version: 0.7.10 2015-12-12 17:44:29 +07:00
Faisal Salman
a1293f804e merge develop 2015-12-12 17:40:57 +07:00
Faisal Salman
cf5c1f9e01 Check for tablet first 2015-12-12 17:34:00 +07:00
Faisal Salman
5d3835ad00 Merge pull request #154 from szchenghuang/meteor-export
UAParser is exposed globally to the window object. It can be used directly.
2015-12-12 15:43:09 +07:00
Faisal Salman
09bf4ecf7f Fix #153 mistaken Search phrase for Arch OS 2015-12-12 15:23:11 +07:00
Faisal Salman
43b0ee79d6 Seems to fix the issue for specific UA found in #159 2015-12-12 14:43:16 +07:00
Faisal Salman
9518833e83 Add PhantomJS fix #157 2015-12-12 14:28:39 +07:00
Faisal Salman
1e58e884ef Add PhantomJS support fix #157 2015-12-12 13:39:45 +07:00
szchenghuang
e230cc1920 UAParser is exposed globally to the window object. It can be used directly. 2015-11-20 15:30:28 +08:00
Faisal Salman
bbd3f14cfb Merge pull request #151 from 0x7f/firefox-ios
Fix detection of Firefox on iOS.
2015-11-19 21:38:06 +07:00
Faisal Salman
a66d9b238a Merge pull request #145 from lquinn/general-android-mobile
Treat all Android smartphones as mobile
2015-11-18 23:00:18 +07:00
Maximilian Haupt
ae5bfb3893 Fix detection of Firefox on iOS.
Firefox on iOS' ua string is also matched by the "Safari < 3.0" regular
expression, unfortunately. Reorder the regular expressions so that the
one for FxiOS matches first.
2015-11-13 12:09:32 +01:00
niris
2e5dff95c8 add support for wechat 2015-11-03 16:05:37 +08:00
Faisal Salman
e944fededb Merge pull request #148 from shanebo/master
Added hasOwnProperty check in result object for in
2015-11-02 09:39:34 +07:00
Shane Thacker
23160c9fb3 Added hasOwnProperty check
This ensures that the result output is clean of extended type methods
2015-11-01 12:34:54 -06:00
Liam Quinn
01ba36c94d Generalize the check for an unidentifiable mobile or tablet to correctly
categorize unidentifiable Android smartphones as "mobile".
2015-10-29 10:24:44 -04:00
Faisal Salman
99c15dee95 Merge pull request #144 from duzun/master
travis update: node_js stable, cache node_modules, sudo false
2015-10-28 06:25:55 +07:00
Dumitru Uzun
e8bec7e611 travis update: node_js stable, cache node_modules, sudo false 2015-10-22 09:30:52 +03:00
Faisal Salman
f670224d8e Merge pull request #140 from 0x7f/playstation4
Add Playstation 4 support.
2015-10-17 05:31:21 +07:00
Faisal Salman
116b5c695d Merge pull request #141 from 0x7f/fix-nexus-6
Detect Nexus 6 as Motorola only.
2015-10-17 05:31:00 +07:00
Maximilian Haupt
0aafba67fa Detect Nexus 6 as Motorola only.
The commit 3964971c3 added Nexus 6 to LG and Motorola, but it should be
Motorola only, as stated in the according commit message anyways.
2015-10-16 15:01:57 +00:00
Maximilian Haupt
ab6a56d931 Add Playstation 4 support. 2015-10-16 14:14:56 +00:00
Faisal Salman
3bff4cf037 Merge pull request #133 from URXtech/nexus-6
Added Nexus 6 detection
2015-10-13 22:02:42 +07:00
Malash
792dc0246a Rewrite util.extend to a clone version 2015-10-10 15:53:17 +08:00
Aamir Poonawalla
3964971c38 Added Nexus 6 detection
Correctly identifies a Nexus 6 device as being a Motorola mobile device.
2015-09-21 13:34:56 -07:00
Faisal Salman
3382b75cad Merge pull request #131 from pieterhendrickx/develop
Added DEVICE regular expressions for "Samsung galaxy S6" and "Samsung…
2015-08-20 20:59:59 +07:00
Pieter Hendrickx
a19c6be712 Added DEVICE regular expressions for "Samsung galaxy S6" and "Samsung Galaxy S6 Edge" devices + test cases 2015-08-20 09:00:16 +02:00
Faisal Salman
20ea67ed1d Merge pull request #130 from malash/ucbrowser
fix support for UCBrowser
2015-08-05 23:36:30 +07:00
Malash
172d63a28f fix support for UCBrowser 2015-08-05 19:47:48 +08:00
Faisal Salman
992e829643 Verup 0.7.9 2015-07-19 04:00:01 +07:00
Faisal Salman
e9e5467add Readme: flattr button, nodejs example, drop browser.major 2015-07-19 03:49:39 +07:00
Faisal Salman
d3a2e1750b Merge branch 'master' of github.com:faisalman/ua-parser-js 2015-07-19 02:22:22 +07:00
Faisal Salman
29d75c994e Merge pull request #124 from longsleep/iridium-detection
Added detection for Iridium Browser.
2015-07-19 02:23:38 +07:00
Faisal Salman
7e23d53e4b Merge branch 'master' of github.com:faisalman/ua-parser-js 2015-07-19 02:03:50 +07:00
Simon Eisenmann
892476f544 Added detection for Iridium Browser. 2015-07-17 16:10:59 +02:00
Faisal Salman
a165e152de Merge pull request #119 from roberttod/patch-1
Reference window as global if available
2015-07-04 01:39:19 +07:00
Faisal Salman
ab64c21a80 Merge pull request #120 from demis-palma/patch-4
palm os regexp fixed
2015-07-04 01:39:14 +07:00
Faisal Salman
5da2305369 Merge pull request #121 from duzun/verup
verup.js installed over NPM -> devDependencies
2015-07-04 01:39:10 +07:00
Faisal Salman
8e169098b5 Merge pull request #122 from divdavem/phantomjs
Adding PhantomJS (http://phantomjs.org/)
2015-07-04 01:39:06 +07:00
ddivernois
aa1bf53337 Adding PhantomJS (http://phantomjs.org/) 2015-07-01 11:23:56 +02:00
Dumitru Uzun
1b957cad1a verup.js installed over NPM -> devDependencies 2015-06-19 01:50:06 +03:00
Demis Palma
8d9cd21331 palm os regexp fixed
The regexp won't work as expected because the meta-character \o doesn't make sense.
Replaced with \s which indicates "whitespace character"
2015-06-18 23:32:15 +01:00
Robert Tod
f117f600ba Reference window as global if available
This change will use `window` by default if it exists so that `browserify` and `Webpack` builds do not need to do something like

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

https://github.com/faisalman/ua-parser-js/issues/84
2015-06-10 17:35:16 +01:00
Faisal Salman
22e17fb004 Add Sleipnir 2015-05-11 23:44:34 +07:00
Faisal Salman
978ee5a4da Add Firefox for iOS 2015-05-11 23:33:57 +07:00
Faisal Salman
a3e4fbe5bb Merge pull request #116 from nikrolls/patch-1
Added Edge and EdgeHTML to documentation
2015-05-10 12:14:13 +07:00
Faisal Salman
9dacf37e4a Merge pull request #112 from duzun/master
Updated verup to v1.2.0 and moved its config to package.json
2015-05-10 12:13:46 +07:00
Nik Rolls
4d99bc0777 Added Edge and EdgeHTML to documentation 2015-05-10 15:33:36 +12:00
Faisal Salman
f558e657bb Merge pull request #113 from nikrolls/correct-ms-edge-detection
Microsoft Edge is not IE12
2015-05-08 20:15:13 +07:00
Nik Rolls
4203f8144f Microsoft Edge is not IE12 2015-05-08 18:02:05 +12:00
Faisal Salman
21a525f442 Add layout engine: EdgeHTML 2015-05-07 04:59:01 +07:00
Faisal Salman
3abf465aec changing build flow 2015-05-07 04:21:43 +07:00
Dumitru Uzun
56c90d2134 updated verup script 2015-05-05 20:39:23 +03:00
Dumitru Uzun
dc6bae6aae Updated verup to v1.2.0 and moved its config to package.json 2015-04-30 17:58:30 +03:00
Faisal Salman
1fa7137f1f Fix #111 2015-04-29 11:29:54 +07:00
Faisal Salman
378a298fee Merge pull request #110 from duzun/master
Added a script to bump version in project files. Fix #107
2015-04-28 13:39:17 +07:00
Dumitru Uzun
32db7bfb97 verup adds \n at the end of JSON files 2015-04-20 14:24:20 +03:00
Dumitru Uzun
d1a18c6ff1 Added script to bump version. Eg: npm run verup -- 1.0 2015-04-20 14:19:37 +03:00
Faisal Salman
4887793ee0 Merge pull request #108 from mollases/master
Adding Windows 10 IE 12 to ua-parser (w/ test)
2015-04-19 13:56:17 +07:00
Faisal Salman
b616d0b3d1 Merge pull request #106 from duzun/master
updated email of Dumitru Uzun in package.json
2015-04-19 13:56:09 +07:00
Admas
c7749b3a2a Adding WIndows 10 IE regex
IE 12 for windows 10 uses gets caught as chrome:
https://msdn.microsoft.com/en-us/library/ie/hh869301%28v=vs.85%29.aspx

Now we search for Edge and mark it as IE
2015-04-17 09:23:28 -07:00
Admas
b00b2a7bcf Adding WIndows 10 IE test 2015-04-17 09:21:11 -07:00
Dumitru Uzun
ca4e8ce2e6 update email of Dumitru Uzun; merged from faisalman 2015-04-17 17:33:30 +03:00
Faisal Salman
3d2d8d5d84 Fix jshint eror 2015-04-15 01:39:21 +07:00
Faisal Salman
cce9dc1474 Add meteor support 2015-04-07 02:40:50 +07:00
Faisal Salman
fa6f8de25f Increment patch version to 0.7.4 2015-04-07 01:41:46 +07:00
Faisal Salman
6a284e2670 Temporarily comment device models to be moved soon 2015-04-07 01:37:14 +07:00
Faisal Salman
ad2613d8e9 Create package.js for meteor package 2015-04-07 01:19:14 +07:00
Faisal Salman
866bdc27af Windows 10 test 2015-03-29 10:02:39 +07:00
Faisal Salman
a5cb2d8821 Fix #100: Detect NT 10.0 as Windows 10 2015-03-29 09:57:34 +07:00
Faisal Salman
fe133e4228 Merge pull request #102 from demis-palma/patch-3
Unneeded comma
2015-03-10 22:48:42 +07:00
Faisal Salman
357ea1b42f Merge pull request #101 from demis-palma/patch-1
Character class may not be used inside character range
2015-03-10 22:47:34 +07:00
Demis Palma
89a3a21ce3 Unneeded comma
Removed last comma in array literal
2015-02-27 17:57:27 +00:00
Demis Palma
3c911f2dd4 Character class may not be used inside character range
Additional information and examples at http://stackoverflow.com/questions/15321938/regex-character-class-inside-character-range-failing-intellijs-jslint-inspectio
2015-02-27 17:42:20 +00:00
Faisal Salman
69c688810d Merge from @algenon 2015-02-27 11:55:52 +07:00
Faisal Salman
6b2571eaa3 Merge pull request #94 from d1o/develop
Added Xperia Z, Galaxy, Oppo, Advan, i-mobile
2015-02-27 10:43:57 +07:00
otakuSiD
5dcc4db665 Get rid of duplicate Xiaomi detection 2015-02-26 15:19:09 +02:00
Dmitry Tyschenko
af9fc69161 Added Facebook application browser 2015-02-05 12:31:47 +02:00
Anton Zhiyanov
feed5498eb Refactor Xiaomi regexps 2015-02-02 19:54:46 +03:00
Anton Zhiyanov
2e87b02dda Add Vivaldi browser 2015-02-02 19:53:29 +03:00
Dmitry Tyschenko
f6b22d6654 Added Xperia Z, Galaxy, Oppo, Advan, i-mobile 2015-01-30 11:17:01 +02:00
Faisal Salman
354d29c2b6 Merge pull request #93 from austinpray/master
fixes typeof
2015-01-29 13:05:51 +07:00
Faisal Salman
6402ac67b9 Merge pull request #91 from algenon/develop
Android Browser and Xiaomi devices detection
2015-01-29 13:05:36 +07:00
Austin Pray
7cae802f3c fixes typeof 2015-01-28 13:01:03 -06:00
algenon
5c25229616 Add Android and MIUI Browser to description 2015-01-25 18:26:43 +03:00
algenon
9d383c5395 Add Xiaomi devices 2015-01-25 17:54:39 +03:00
algenon
1eeb1face1 Add Android Browser and Xiaomi MIUI Browser 2015-01-25 17:39:15 +03:00
Faisal Salman
c3ddbe27ae Merge pull request #88 from soundrop/develop
Better detection of Sony Xperia devices
2015-01-10 18:53:46 +07:00
Dumitru Uzun
073b551b90 Merge branch 'master' of https://github.com/faisalman/ua-parser-js 2014-12-27 00:32:02 +02:00
Sylvain Gizard
7d5e50f008 Remove duplication 2014-12-18 16:26:38 +01:00
Sylvain Gizard
294fae589d Remove duplicated test 2014-12-18 16:09:51 +01:00
Sylvain Gizard
d47e1a5e8e Update build 2014-12-18 16:04:31 +01:00
Sylvain Gizard
50c4e3e551 Trailing whitespace 2014-12-18 16:04:24 +01:00
Sylvain Gizard
5002ea0846 Rough detection of Sony Xperia phones and tablets 2014-12-18 16:04:08 +01:00
Faisal Salman
bc4561b1c1 Merge pull request #86 from sgautrea/nexus-9
Adding HTC Nexus 9 recognition
2014-12-03 15:30:16 +07:00
Shane Gautreau
083db7b7d2 Adding test for Nexus 9 recognition 2014-12-02 16:46:04 -05:00
sgautrea
744c9bf0bd Update ua-parser.js
Adding regex for Nexus 9 tablet
2014-12-02 16:08:47 -05:00
Dumitru Uzun
27c17736c2 Closure Compiled 2014-11-20 12:41:15 +02:00
Faisal Salman
4d3656bb9c Merge pull request #81 from duzun/patch-2
Keep global scope clean with AMD. Always check for jQuery global.
2014-11-20 17:40:52 +07:00
Dumitru Uzun
551fbf100c Keep global scope clean with AMD. Always check for jQuery global.
If an AMD environment, don't export `UAParser` to global scope.
Even in AMD environment jQuery exports to global scope. We should catch it even then.
It also can happen then one joins the jQuery source file with other jQuery plugins in a CommonJS env.
2014-11-20 12:32:31 +02:00
Faisal Salman
e725633328 Fix #24 #80 2014-11-20 07:15:18 +07:00
Faisal Salman
d5cf025713 Merge pull request #79 from hmvs/patch-3
Moto X, G, Razr Mobile detection
2014-11-20 07:07:26 +07:00
Vadim Kurachevsky
9256ed4186 Moto X, G, Razr Mobile detection
Moto RAZR: 
Mozilla/5.0 (Linux; Android 4.0.4; XT910 Build/6.7.2-180_SPU-19-TA-11.6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Mobile Safari/537.36
Moto X:
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
Moto G:
Mozilla/5.0 (Linux; Android 4.4.2; XT1033 Build/KXB20.25-1.31) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36
2014-11-19 10:38:48 +02:00
Faisal Salman
70d629ca71 Extract major from version instead of directly using regex 2014-11-10 18:43:04 +07:00
Faisal Salman
0951cebd09 Update patch version to 0.7.3 2014-11-09 21:08:48 +07:00
Faisal Salman
0a2b05c6fd Fix #77: Standardize OS name for Mac OS 2014-11-08 09:55:26 +07:00
Faisal Salman
9e81f03558 Merge branch 'master' of github.com:faisalman/ua-parser-js 2014-11-07 21:51:41 +07:00
Faisal Salman
a04d2c0efc Merge from develop branch 2014-11-07 17:11:31 +07:00
Faisal Salman
152377b390 Add Windows 10 2014-11-07 16:57:52 +07:00
Faisal Salman
d3f1b0eaf7 Increment patch version to 0.7.2 2014-11-07 15:32:38 +07:00
Faisal Salman
a78d3f7d4b Keep license comment when minifying 2014-11-07 15:20:44 +07:00
Faisal Salman
b0ed222114 Fix #54: update mocha version to 1.8.0 2014-11-07 14:56:31 +07:00
Faisal Salman
8c813e15b3 Drop test on 0.8 2014-11-07 14:53:16 +07:00
Faisal Salman
e6c2296d86 Update readme.md 2014-11-07 14:50:10 +07:00
Faisal Salman
577ded5272 Move minified script under /dist directory 2014-11-04 18:09:39 +07:00
Faisal Salman
a455d7be0d Add OS: VectorLinux 2014-10-31 07:04:22 +07:00
Faisal Salman
4222c6c1e0 Add new devices: Pebble & Google Glass 2014-10-26 01:40:55 +07:00
Faisal Salman
2be03bf30c New categories for device: wearable & embedded 2014-10-26 01:33:07 +07:00
Faisal Salman
6c1c202815 Rearranging things 2014-10-26 01:30:39 +07:00
Faisal Salman
d3a0e23945 Add OS: Contiki, Mageia, Linpus, Solaris, OpenVMS 2014-10-24 04:23:40 +07:00
Faisal Salman
6bb2e23924 Add CPU architecture: ARM64, AVR 2014-10-22 01:03:16 +07:00
Faisal Salman
4e41b6e1d0 Change for loop into while 2014-10-22 00:17:51 +07:00
Faisal Salman
b2f54a6b24 Merge pull request #73 from PeterDaveHello/patch-2
Use svg instead of png to get better image quality
2014-10-20 23:59:55 +07:00
Peter Dave Hello
39168a321c Use svg instead of png to get better image quality 2014-10-20 20:51:19 +08:00
Faisal Salman
1cd7427e90 Add new devices: Microsoft Kin, Archos Gamepad, Nvidia Shield, Samsung SmartTV, Sharp Aquos 2014-10-20 01:19:06 +07:00
Faisal Salman
02122f0002 Add new devices: Xbox, Ouya 2014-10-20 00:17:12 +07:00
21 changed files with 2680 additions and 1831 deletions

1
.gitignore vendored
View File

@@ -6,6 +6,7 @@ npm-debug.log
Session.vim
.netrwhist
*~
.versions
### OSX ###
.DS_Store

View File

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

View File

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

View File

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

View File

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

1
dist/ua-parser.html vendored Normal file
View File

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

9
dist/ua-parser.min.js vendored Normal file

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

12
package.js Normal file
View File

@@ -0,0 +1,12 @@
Package.describe({
name: 'faisalman:ua-parser-js',
version: '0.7.17',
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");
});

View File

@@ -1,8 +1,8 @@
{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.1",
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
"version": "0.7.17",
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [
"user-agent",
@@ -11,63 +11,111 @@
"engine",
"os",
"device",
"cpu"
"cpu",
"jquery-plugin",
"ecosystem:jquery"
],
"homepage": "http://github.com/faisalman/ua-parser-js",
"contributors": [
"Faisal Salman <fyzlman@gmail.com>",
"Aamir Poonawalla <aamir@urx.com>",
"Admas <mollases@users.noreply.github.com>",
"algenon <m@antonz.ru>",
"Andrea Vaghi <andrea.vaghi@jobrapido.com>",
"Anton Zhiyanov <m@antonz.ru>",
"Austin Pray <austin@austinpray.com>",
"Benjamin Bertrand <bertrand.design@gmail.com>",
"boneyao <admin@boneyao.com>",
"Carl C Von Lewin <carlchristianlewin@gmail.com>",
"CESAR RAMOS <c@imagenproactiva.com>",
"Christopher De Cairos <chris.decairos@gmail.com>",
"Davit Barbakadze <jayarjo@gmail.com>",
"ddivernois <david-emmanuel.divernois@amadeus.com>",
"Demis Palma <demis.palma@gmail.com>",
"Dmitry Tyschenko <dtyschenko@gmail.com>",
"Douglas Li <doug@knotch.it>",
"Dumitru Uzun <duzun@mail.ru>",
"Dumitru Uzun <contact@duzun.me>",
"Erik Hesselink <hesselink@gmail.com>",
"Fabian Becker <halfdan@xnorfz.de>",
"Faisal Salman <fyzlman@gmail.com>",
"Frédéric Camblor <fcamblor@gmail.com>",
"Grigory Dmitrenko <grigory@snsk.ru>",
"Hendrik Helwich <h.helwich@iplabs.de>",
"Jackpoll <jackpoll123456@gmail.com>",
"jackpoll <jackpoll123456@gmail.com>",
"Jake Mc <startswithaj@users.noreply.github.com>",
"John Tantalo <john.tantalo@gmail.com>",
"John Yanarella <jmy@codecatalyst.com>",
"Jon Buckley <jon@jbuckley.ca>",
"Kendall Buchanan <kendall@kendagriff.com>",
"Lee Treveil <leetreveil@gmail.com>",
"Leonardo <leofiore@libero.it>",
"leonardo <leofiore@libero.it>",
"Levente Balogh <noreply@github.com>",
"Liam Quinn <lquinn@blackberry.com>",
"Lithin <lithin@webklipper.com>",
"Lukas Eipert <leipert@users.noreply.github.com>",
"Malash <i@malash.me>",
"Martynas <noreply@github.com>",
"Maximilian Haupt <mail@maximilianhaupt.com>",
"Max Maurer <maxemanuel.maurer@gmail.com>",
"Michael Hess <mhess@connectify.me>",
"OtakuSiD <otakusid@gmail.com>",
"naoh <noreply@github.com>",
"Nik Rolls <nik@rolls.cc>",
"niris <nirisix@gmail.com>",
"otakuSiD <otakusid@gmail.com>",
"Peter Dave Hello <PeterDaveHello@users.noreply.github.com>",
"philippsimon <github@philippsimon.de>",
"Pieter Hendrickx <pieter.hendrickx@belfius.be>",
"Robert Tod <robert@qubit.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>",
"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",
"scripts": {
"test": "./build/build.sh"
"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": "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": {
"jshint": "~1.1.0",
"mocha": "~1.7.1",
"uglify-js": "~1.3.4"
"mocha": "~1.8.0",
"requirejs": "^2.3.2",
"uglify-js": "~2.7.5",
"verup": "^1.3.x"
},
"repository" : {
"repository": {
"type": "git",
"url": "https://github.com/faisalman/ua-parser-js.git"
},
"licenses": [
{
"type": "GPLv2",
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
},
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
],
"license": "(GPL-2.0 OR MIT)",
"engines": {
"node": "*"
},
"directories": {
"lib": "src",
"dist": "dist",
"src": "src",
"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
View File

@@ -1,36 +1,44 @@
# UAParser.js
Lightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as jQuery/Zepto plugin, Component package, Bower package, & AMD module
<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 accurate than using feature detection.
[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.png?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)
[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)
[![NPM downloads](https://img.shields.io/npm/dw/ua-parser-js.svg)](https://www.npmjs.com/package/ua-parser-js)
[![NPM](https://img.shields.io/npm/v/ua-parser-js.svg)](https://www.npmjs.com/package/ua-parser-js)
[![Bower](https://img.shields.io/bower/v/ua-parser-js.svg)](https://bower.io/)
[![CDNJS](https://img.shields.io/cdnjs/v/UAParser.js.svg)](https://cdnjs.com/libraries/UAParser.js)
[![Gratipay](https://img.shields.io/gratipay/team/UAParser.js.svg)](https://gratipay.com/UAParser.js)
[![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)
* Author : Faisal Salman <<fyzlman@gmail.com>>
* Author : Faisal Salman <<f@faisalman.com>>
* Demo : http://faisalman.github.io/ua-parser-js
* Source : https://github.com/faisalman/ua-parser-js
## Features
# Constructor
Extract detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model purely from user-agent string with relatively lightweight footprint (~11KB minified / ~4KB gzipped). Written in vanilla js, which means it doesn't depends on any other library.
* `new UAParser([uastring][,extensions])`
* returns new instance
![It's over 9000](https://pbs.twimg.com/media/A9LpEG6CIAA5VrT.jpg)
* `UAParser([uastring][,extensions])`
* returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
## Methods
# Methods
* `getBrowser()`
* returns `{ name: '', major: '', version: '' }`
* returns `{ name: '', version: '' }`
```
# Possible 'browser.name':
Amaya, Arora, Avant, Baidu, Blazer, Bolt, Camino, Chimera, Chrome, Chromium,
Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Epiphany, Fennec, Firebird,
Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon,
Iceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links,
Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, [Mobile] Safari, Mosaic, Mozilla,
Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet], Phoenix,
Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser, Swiftfox,
Tizen, UCBrowser, w3m, Yandex
Amaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Bowser, Camino, Chimera,
Chrome [WebView], Chromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge,
Epiphany, Fennec, Firebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe,
IceCat, IceDragon, Iceweasel, IE[Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle,
Links, Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari,
Mosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet],
PhantomJS, Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, Sleipnir,
SlimBrowser, Swiftfox, Tizen, UCBrowser, Vivaldi, w3m, WeChat, Yandex
# 'browser.version' & 'browser.major' determined dynamically
# 'browser.version' determined dynamically
```
* `getDevice()`
@@ -38,12 +46,13 @@ Tizen, UCBrowser, w3m, Yandex
```
# Possible 'device.type':
console, mobile, tablet, smarttv
console, mobile, tablet, smarttv, wearable, embedded
# Possible 'device.vendor':
Acer, Alcatel, Amazon, Apple, Asus, BenQ, BlackBerry, Dell, GeeksPhone,
HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Motorola, Nexian, Nintendo, Nokia,
Palm, Panasonic, Polytron, RIM, Samsung, Siemens, Sony-Ericsson, Sprint, ZTE
Acer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone,
Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian,
Nintendo, Nokia, Nvidia, OnePlus, Ouya, Palm, Panasonic, Pebble, Polytron, RIM,
Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, Xbox, Xiaomi, ZTE
# 'device.model' determined dynamically
```
@@ -53,8 +62,8 @@ Palm, Panasonic, Polytron, RIM, Samsung, Siemens, Sony-Ericsson, Sprint, ZTE
```
# Possible 'engine.name'
Amaya, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto, Tasman,
Trident, w3m, WebKit
Amaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto,
Tasman, Trident, w3m, WebKit
# 'engine.version' determined dynamically
```
@@ -64,12 +73,12 @@ Trident, w3m, WebKit
```
# Possible 'os.name'
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,
Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS,
Joli, Linux, Mac OS, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD, Nintendo,
OpenBSD, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat, RIM Tablet OS,
RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu,
UNIX, WebOS, Windows [Phone/Mobile], Zenwalk
Joli, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD,
Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD, PCLinuxOS, Plan9, Playstation, QNX, RedHat,
RIM Tablet OS, RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen,
Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk
# 'os.version' determined dynamically
```
@@ -79,7 +88,7 @@ UNIX, WebOS, Windows [Phone/Mobile], Zenwalk
```
# Possible 'cpu.architecture'
68k, amd64, arm, ia32, ia64, irix, irix64, mips, mips64, pa-risc, ppc, sparc, sparc64
68k, amd64, arm[64], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64]
```
* `getResult()`
@@ -89,9 +98,11 @@ UNIX, WebOS, Windows [Phone/Mobile], Zenwalk
* returns UA string of current instance
* `setUA(uastring)`
* set & parse UA string
* set UA string to parse
* returns current instance
## Example
# Example
```html
<!doctype html>
@@ -110,8 +121,7 @@ UNIX, WebOS, Windows [Phone/Mobile], Zenwalk
ua: "",
browser: {
name: "",
version: "",
major: ""
version: ""
},
engine: {
name: "",
@@ -140,7 +150,7 @@ UNIX, WebOS, Windows [Phone/Mobile], Zenwalk
// this will also produce the same result (without instantiation):
// var result = UAParser(uastring);
console.log(result.browser); // {name: "Chromium", major: "15", version: "15.0.874.106"}
console.log(result.browser); // {name: "Chromium", version: "15.0.874.106"}
console.log(result.device); // {model: undefined, type: undefined, vendor: undefined}
console.log(result.os); // {name: "Ubuntu", version: "11.10"}
console.log(result.os.version); // "11.10"
@@ -165,61 +175,74 @@ UNIX, WebOS, Windows [Phone/Mobile], Zenwalk
</html>
```
### Extending regex patterns
* `UAParser(uastring[, extensions])`
Pass your own regexes to extend the limited matching rules.
```js
// Example:
var uaString = 'ownbrowser/1.3';
var ownBrowser = [[/(ownbrowser)\/((\d+)?[\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION, UAParser.BROWSER.MAJOR]];
var parser = new UAParser(uaString, {browser: ownBrowser});
console.log(parser.getBrowser()); // {name: "ownbrowser", major: "1", version: "1.3"}
```
### Using node.js
## Using node.js
```sh
$ npm install ua-parser-js
```
```js
var UAParser = require('ua-parser-js');
var parser = new UAParser();
var ua = request.headers['user-agent']; // user-agent header from an HTTP request
console.log(parser.setUA(ua).getResult());
var http = require('http');
var parser = require('ua-parser-js');
http.createServer(function (req, res) {
// get user-agent header
var ua = parser(req.headers['user-agent']);
// write the result as response
res.end(JSON.stringify(ua, null, ' '));
})
.listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
```
### Using requirejs
## Using requirejs
```js
require(['ua-parser'], function(UAParser) {
requirejs.config({
baseUrl : 'js/lib', // path to your script directory
paths : {
'ua-parser-js' : 'ua-parser.min'
}
});
requirejs(['ua-parser-js'], function(UAParser) {
var parser = new UAParser();
console.log(parser.getResult());
});
```
### Using component
## Using CDN
```sh
$ component install faisalman/ua-parser-js
```html
<script src="https://cdn.jsdelivr.net/npm/ua-parser-js@0/dist/ua-parser.min.js"></script>
```
```js
var UAParser = require('ua-parser-js');
var parser = new UAParser();
console.log(parser.getResult());
```
### Using bower
## Using bower
```sh
$ bower install ua-parser-js
```
### Using jQuery/Zepto ($.ua)
## Using meteor
```sh
$ 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)`.
@@ -240,24 +263,60 @@ console.log($.ua.browser.name); // "Safari"
console.log($.ua.engine.name); // "Webkit"
console.log($.ua.device); // {vendor: "Motorola", model: "Xoom", type: "tablet"}
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);
```
## Development
## Extending regex patterns
Verify, test, & minify script
* `UAParser([uastring,] extensions)`
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
$ npm test
$ npm run build
```
Then submit a pull request to https://github.com/faisalman/ua-parser-js under `develop` branch.
# Donate
Do you use & like UAParser.js but you dont 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 :)
[![Support via Pledgie](https://pledgie.com/campaigns/34252.png?skin_name=chrome)](https://pledgie.com/campaigns/34252)
## License
# License
Dual licensed under GPLv2 & MIT
Copyright © 2012-2014 Faisal Salman <<fyzlman@gmail.com>>
Copyright © 2012-2016 Faisal Salman <<fyzlman@gmail.com>>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

751
src/ua-parser.js Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,68 @@
[
{
"desc" : "Android Browser on Galaxy Nexus",
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Android Browser on Galaxy S3",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.4; en-us; SAMSUNG GT-I9300I Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36",
"expect" :
{
"name" : "Android Browser",
"version" : "1.5",
"major" : "1"
}
},
{
"desc" : "Android Browser on HTC Flyer (P510E)",
"ua" : "Mozilla/5.0 (Linux; U; Android 3.2.1; ru-ru; HTC Flyer P510e Build/HTK75C) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13",
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Android Browser on Huawei Honor Glory II (U9508)",
"ua" : "Mozilla/5.0 (Linux; U; Android 4.0.4; ru-by; HUAWEI U9508 Build/HuaweiU9508) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ACHEETAHI/2100050044",
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Android Browser on Huawei P8 (H891L)",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.4; HUAWEI H891L Build/HuaweiH891L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36",
"expect" :
{
"name" : "Android Browser",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Android Browser on Samsung S6 (SM-G925F)",
"ua" : "Mozilla/5.0 (Linux; Android 5.0.2; SAMSUNG SM-G925F Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.0 Chrome/38.0.2125.102 Mobile Safari/537.36",
"expect" :
{
"name" : "Samsung Browser",
"version" : "3.0",
"major" : "3"
}
},
{
"desc" : "Arora",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-CH) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2",
"expect" :
"expect" :
{
"name" : "Arora",
"version" : "0.2",
@@ -12,7 +72,7 @@
{
"desc" : "Avant",
"ua" : "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB5; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
"expect" :
"expect" :
{
"name" : "Avant ",
"version" : "undefined",
@@ -22,7 +82,7 @@
{
"desc" : "Baidu",
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; baidubrowser 1.x)",
"expect" :
"expect" :
{
"name" : "baidu",
"version" : "1.x",
@@ -32,17 +92,27 @@
{
"desc" : "Bolt",
"ua" : "Mozilla/5.0 (X11; 78; CentOS; US-en) AppleWebKit/527+ (KHTML, like Gecko) Bolt/0.862 Version/3.0 Safari/523.15",
"expect" :
"expect" :
{
"name" : "Bolt",
"version" : "0.862",
"major" : "0"
}
},
{
"desc" : "Bowser",
"ua" : "Mozilla/5.0 (iOS; like Mac OS X) AppleWebKit/536.36 (KHTML, like Gecko) not Chrome/27.0.1500.95 Mobile/10B141 Safari/537.36 Bowser/0.2.1",
"expect" :
{
"name" : "Bowser",
"version" : "0.2.1",
"major" : "0"
}
},
{
"desc" : "Camino",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.0.19) Gecko/2011091218 Camino/2.0.9 (like Firefox/3.0.19)",
"expect" :
"expect" :
{
"name" : "Camino",
"version" : "2.0.9",
@@ -52,7 +122,7 @@
{
"desc" : "Chimera",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; pl-PL; rv:1.0.1) Gecko/20021111 Chimera/0.6",
"expect" :
"expect" :
{
"name" : "Chimera",
"version" : "0.6",
@@ -62,17 +132,47 @@
{
"desc" : "Chrome",
"ua" : "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6",
"expect" :
"expect" :
{
"name" : "Chrome",
"version" : "20.0.1090.0",
"major" : "20"
}
},
{
"desc" : "Chrome Headless",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36",
"expect" :
{
"name" : "Chrome Headless",
"version" : "undefined",
"major" : "undefined"
}
},
{
"desc" : "Chrome Headless",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/60.0.3112.113 Safari/537.36",
"expect" :
{
"name" : "Chrome Headless",
"version" : "60.0.3112.113",
"major" : "60"
}
},
{
"desc" : "Chrome WebView",
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Mobile Safari/537.36",
"expect" :
{
"name" : "Chrome WebView",
"version" : "43.0.2357.65",
"major" : "43"
}
},
{
"desc" : "Chrome on iOS",
"ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3",
"expect" :
"expect" :
{
"name" : "Chrome",
"version" : "19.0.1084.60",
@@ -82,7 +182,7 @@
{
"desc" : "Chromium",
"ua" : "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.7 (KHTML, like Gecko) Ubuntu/11.10 Chromium/16.0.912.21 Chrome/16.0.912.21 Safari/535.7",
"expect" :
"expect" :
{
"name" : "Chromium",
"version" : "16.0.912.21",
@@ -92,7 +192,7 @@
{
"desc" : "Chrome on Android",
"ua" : "Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7",
"expect" :
"expect" :
{
"name" : "Chrome",
"version" : "16.0.912.75",
@@ -102,7 +202,7 @@
{
"desc" : "Dillo",
"ua" : "Dillo/2.2",
"expect" :
"expect" :
{
"name" : "Dillo",
"version" : "2.2",
@@ -112,7 +212,7 @@
{
"desc" : "Dolphin",
"ua" : "Mozilla/5.0 (SCH-F859/F859DG12;U;NUCLEUS/2.1;Profile/MIDP-2.1 Configuration/CLDC-1.1;480*800;CTC/2.0) Dolfin/2.0",
"expect" :
"expect" :
{
"name" : "Dolphin",
"version" : "2.0",
@@ -122,7 +222,7 @@
{
"desc" : "Doris",
"ua" : "Doris/1.15 [en] (Symbian)",
"expect" :
"expect" :
{
"name" : "Doris",
"version" : "1.15",
@@ -132,17 +232,37 @@
{
"desc" : "Epiphany",
"ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6",
"expect" :
"expect" :
{
"name" : "Epiphany",
"version" : "1.2.6",
"major" : "1"
}
},
{
"desc" : "Facebook in-App Browser for Android",
"ua" : "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]",
"expect" :
{
"name" : "Facebook",
"version" : "35.0.0.48.273",
"major" : "35"
}
},
{
"desc" : "Facebook in-App Browser for iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304 [FBAN/FBIOS;FBAV/91.0.0.41.73;FBBV/57050710;FBDV/iPhone8,1;FBMD/iPhone;FBSN/iOS;FBSV/10.3.1;FBSS/2;FBCR/Telekom.de;FBID/phone;FBLC/de_DE;FBOP/5;FBRV/0])",
"expect" :
{
"name" : "Facebook",
"version" : "91.0.0.41.73",
"major" : "91"
}
},
{
"desc" : "Firebird",
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 Firebird/0.7",
"expect" :
"expect" :
{
"name" : "Firebird",
"version" : "0.7",
@@ -152,7 +272,7 @@
{
"desc" : "Firefox",
"ua" : "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2",
"expect" :
"expect" :
{
"name" : "Firefox",
"version" : "15.0a2",
@@ -162,7 +282,7 @@
{
"desc" : "Fennec",
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
"expect" :
"expect" :
{
"name" : "Fennec",
"version" : "1.0a1",
@@ -172,7 +292,7 @@
{
"desc" : "Flock",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008100716 Firefox/3.0.3 Flock/2.0",
"expect" :
"expect" :
{
"name" : "Flock",
"version" : "2.0",
@@ -182,7 +302,7 @@
{
"desc" : "GoBrowser",
"ua" : "Nokia5700XpressMusic/GoBrowser/1.6.91",
"expect" :
"expect" :
{
"name" : "GoBrowser",
"version" : "1.6.91",
@@ -192,7 +312,7 @@
{
"desc" : "IceApe",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.19) Gecko/20110817 Iceape/2.0.14",
"expect" :
"expect" :
{
"name" : "Iceape",
"version" : "2.0.14",
@@ -202,7 +322,7 @@
{
"desc" : "IceCat",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092921 IceCat/3.0.3-g1",
"expect" :
"expect" :
{
"name" : "IceCat",
"version" : "3.0.3-g1",
@@ -212,7 +332,7 @@
{
"desc" : "Iceweasel",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3)",
"expect" :
"expect" :
{
"name" : "Iceweasel",
"version" : "3.0.6",
@@ -222,7 +342,7 @@
{
"desc" : "iCab",
"ua" : "iCab/2.9.5 (Macintosh; U; PPC; Mac OS X)",
"expect" :
"expect" :
{
"name" : "iCab",
"version" : "2.9.5",
@@ -232,7 +352,7 @@
{
"desc" : "IEMobile",
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11) 320x240; VZW; Motorola-Q9c; Windows Mobile 6.1 Standard",
"expect" :
"expect" :
{
"name" : "IEMobile",
"version" : "7.11",
@@ -242,7 +362,7 @@
{
"desc" : "IE 11 with IE token",
"ua" : "Mozilla/5.0 (IE 11.0; Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko",
"expect" :
"expect" :
{
"name" : "IE",
"version" : "11.0",
@@ -252,7 +372,7 @@
{
"desc" : "IE 11 without IE token",
"ua" : "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko",
"expect" :
"expect" :
{
"name" : "IE",
"version" : "11.0",
@@ -262,7 +382,7 @@
{
"desc" : "K-Meleon",
"ua" : "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2",
"expect" :
"expect" :
{
"name" : "K-Meleon",
"version" : "0.8.2",
@@ -272,17 +392,17 @@
{
"desc" : "Kindle Browser",
"ua" : "Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)",
"expect" :
"expect" :
{
"name" : "Kindle",
"version" : "2.5",
"major" : "2"
}
},
},
{
"desc" : "Konqueror",
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu)",
"expect" :
"expect" :
{
"name" : "Konqueror",
"version" : "3.5",
@@ -292,7 +412,7 @@
{
"desc" : "Lunascape",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090804 Firefox/3.5.2 Lunascape/5.1.4.5",
"expect" :
"expect" :
{
"name" : "Lunascape",
"version" : "5.1.4.5",
@@ -302,7 +422,7 @@
{
"desc" : "Lynx",
"ua" : "Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b",
"expect" :
"expect" :
{
"name" : "Lynx",
"version" : "2.8.5dev.16",
@@ -312,7 +432,7 @@
{
"desc" : "Maemo Browser",
"ua" : "Mozilla/5.0 (X11; U; Linux armv7l; ru-RU; rv:1.9.2.3pre) Gecko/20100723 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900",
"expect" :
"expect" :
{
"name" : "Maemo Browser",
"version" : "1.7.4.8",
@@ -322,7 +442,7 @@
{
"desc" : "Maxthon",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)",
"expect" :
"expect" :
{
"name" : "Maxthon",
"version" : "undefined",
@@ -332,7 +452,7 @@
{
"desc" : "Midori",
"ua" : "Midori/0.2.2 (X11; Linux i686; U; en-us) WebKit/531.2+",
"expect" :
"expect" :
{
"name" : "Midori",
"version" : "0.2.2",
@@ -342,17 +462,27 @@
{
"desc" : "Minimo",
"ua" : "Mozilla/5.0 (X11; U; Linux armv6l; rv 1.8.1.5pre) Gecko/20070619 Minimo/0.020",
"expect" :
"expect" :
{
"name" : "Minimo",
"version" : "0.020",
"major" : "0"
}
},
{
"desc" : "MIUI Browser on Xiaomi Hongmi WCDMA (HM2013023)",
"ua" : "Mozilla/5.0 (Linux; U; Android 4.2.2; ru-ru; 2013023 Build/HM2013023) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 XiaoMi/MiuiBrowser/1.0",
"expect" :
{
"name" : "MIUI Browser",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "Mobile Safari",
"ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7",
"expect" :
"expect" :
{
"name" : "Mobile Safari",
"version" : "4.0.5",
@@ -362,7 +492,7 @@
{
"desc" : "Mosaic",
"ua" : "NCSA_Mosaic/2.6 (X11; SunOS 4.1.3 sun4m)",
"expect" :
"expect" :
{
"name" : "Mosaic",
"version" : "2.6",
@@ -372,7 +502,7 @@
{
"desc" : "Mozilla",
"ua" : "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20070606",
"expect" :
"expect" :
{
"name" : "Mozilla",
"version" : "5.0",
@@ -382,7 +512,7 @@
{
"desc" : "MSIE",
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)",
"expect" :
"expect" :
{
"name" : "IE",
"version" : "5.0b1",
@@ -392,7 +522,7 @@
{
"desc" : "NetFront",
"ua" : "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0",
"expect" :
"expect" :
{
"name" : "NetFront",
"version" : "3.0",
@@ -402,7 +532,7 @@
{
"desc" : "Netscape on Windows ME",
"ua" : "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8.1.8pre) Gecko/20071015 Firefox/2.0.0.7 Navigator/9.0",
"expect" :
"expect" :
{
"name" : "Netscape",
"version" : "9.0",
@@ -412,7 +542,7 @@
{
"desc" : "Netscape on Windows 2000",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1",
"expect" :
"expect" :
{
"name" : "Netscape",
"version" : "8.0.1",
@@ -422,17 +552,27 @@
{
"desc" : "Nokia Browser",
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaN8-00/025.007; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba",
"expect" :
"expect" :
{
"name" : "NokiaBrowser",
"version" : "7.3.1.37",
"major" : "7"
}
},
{
"desc" : "Oculus Browser",
"ua" : "Mozilla/5.0 (Linux; Android 7.0; SM-G920I Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/3.4.9 SamsungBrowser/4.0 Chrome/57.0.2987.146 Mobile VR Safari/537.36",
"expect" :
{
"name" : "Oculus Browser",
"version" : "3.4.9",
"major" : "3"
}
},
{
"desc" : "OmniWeb",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.48",
"expect" :
"expect" :
{
"name" : "OmniWeb",
"version" : "558.48",
@@ -442,7 +582,7 @@
{
"desc" : "Opera > 9.80",
"ua" : "Opera/9.80 (X11; Linux x86_64; U; Linux Mint; en) Presto/2.2.15 Version/10.10",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "10.10",
@@ -452,7 +592,7 @@
{
"desc" : "Opera < 9.80 on Windows",
"ua" : "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.01 [en]",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "6.01",
@@ -462,7 +602,7 @@
{
"desc" : "Opera < 9.80 on OSX",
"ua" : "Opera/8.5 (Macintosh; PPC Mac OS X; U; en)",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "8.5",
@@ -472,7 +612,7 @@
{
"desc" : "Opera Mobile",
"ua" : "Opera/9.80 (Android 2.3.5; Linux; Opera Mobi/ADR-1111101157; U; de) Presto/2.9.201 Version/11.50",
"expect" :
"expect" :
{
"name" : "Opera Mobi",
"version" : "11.50",
@@ -482,7 +622,7 @@
{
"desc" : "Opera Webkit",
"ua" : "Mozilla/5.0 AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.123 Mobile Safari/537.22 OPR/14.0.1025.52315",
"expect" :
"expect" :
{
"name" : "Opera",
"version" : "14.0.1025.52315",
@@ -492,27 +632,57 @@
{
"desc" : "Opera Mini",
"ua" : "Opera/9.80 (J2ME/MIDP; Opera Mini/5.1.21214/19.916; U; en) Presto/2.5.25",
"expect" :
"expect" :
{
"name" : "Opera Mini",
"version" : "5.1.21214",
"major" : "5"
}
},
{
"desc" : "Opera Mini 8 above on iPhone",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) OPiOS/12.1.1.98980 Mobile/13C75 Safari/9537.53",
"expect" :
{
"name" : "Opera Mini",
"version" : "12.1.1.98980",
"major" : "12"
}
},
{
"desc" : "Opera Tablet",
"ua" : "Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1",
"expect" :
"expect" :
{
"name" : "Opera Tablet",
"version" : "11.1",
"major" : "11"
}
},
{
"desc" : "Opera Coast",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X; en) AppleWebKit/601.1.46 (KHTML, like Gecko) Coast/5.04.110603 Mobile/13F69 Safari/7534.48.3",
"expect" :
{
"name" : "Opera Coast",
"version" : "5.04.110603",
"major" : "5"
}
},
{
"desc" : "PhantomJS",
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34",
"expect" :
{
"name" : "PhantomJS",
"version" : "1.9.2",
"major" : "1"
}
},
{
"desc" : "Phoenix",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4",
"expect" :
"expect" :
{
"name" : "Phoenix",
"version" : "0.4",
@@ -522,17 +692,27 @@
{
"desc" : "Polaris",
"ua" : "LG-LX600 Polaris/6.0 MMP/2.0 Profile/MIDP-2.1 Configuration/CLDC-1.1",
"expect" :
"expect" :
{
"name" : "Polaris",
"version" : "6.0",
"major" : "6"
}
},
{
"desc" : "QQ",
"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",
"expect" :
{
"name" : "QQBrowser",
"version" : "7.1",
"major" : "7"
}
},
{
"desc" : "RockMelt",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) RockMelt/0.8.36.78 Chrome/7.0.517.44 Safari/534.7",
"expect" :
"expect" :
{
"name" : "RockMelt",
"version" : "0.8.36.78",
@@ -542,7 +722,7 @@
{
"desc" : "Safari",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8",
"expect" :
"expect" :
{
"name" : "Safari",
"version" : "5.0.1",
@@ -552,17 +732,27 @@
{
"desc" : "Safari < 3.0",
"ua" : "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3",
"expect" :
"expect" :
{
"name" : "Safari",
"version" : "2.0.4",
"major" : "2"
}
},
{
"desc" : "Samsung Browser",
"ua" : "Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG-SM-G925A Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36",
"expect" :
{
"name" : "Samsung Browser",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "SeaMonkey",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b4pre) Gecko/20090405 SeaMonkey/2.0b1pre",
"expect" :
"expect" :
{
"name" : "SeaMonkey",
"version" : "2.0b1pre",
@@ -572,7 +762,7 @@
{
"desc" : "Silk Browser",
"ua" : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84)",
"expect" :
"expect" :
{
"name" : "Silk",
"version" : "1.1.0-84",
@@ -582,7 +772,7 @@
{
"desc" : "Skyfire",
"ua" : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17 Skyfire/2.0",
"expect" :
"expect" :
{
"name" : "Skyfire",
"version" : "2.0",
@@ -592,7 +782,7 @@
{
"desc" : "SlimBrowser",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SlimBrowser)",
"expect" :
"expect" :
{
"name" : "Slim",
"version" : "undefined",
@@ -602,7 +792,7 @@
{
"desc" : "Swiftfox",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)",
"expect" :
"expect" :
{
"name" : "Swiftfox",
"version" : "undefined",
@@ -612,17 +802,37 @@
{
"desc" : "Tizen Browser",
"ua" : "Mozilla/5.0 (Linux; U; Tizen/1.0 like Android; en-us; AppleWebKit/534.46 (KHTML, like Gecko) Tizen Browser/1.0 Mobile",
"expect" :
"expect" :
{
"name" : "Tizen Browser",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "UC Browser",
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 UBrowser/5.6.12860.7 Safari/537.36",
"expect" :
{
"name" : "UCBrowser",
"version" : "5.6.12860.7",
"major" : "5"
}
},
{
"desc" : "UC Browser",
"ua" : "Mozilla/5.0 (Linux; U; Android 6.0.1; en-US; Lenovo P2a42 Build/MMB29M) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/11.2.0.915 U3/0.8.0 Mobile Safari/534.30",
"expect" :
{
"name" : "UCBrowser",
"version" : "11.2.0.915",
"major" : "11"
}
},
{
"desc" : "UC Browser on Samsung",
"ua" : "Mozilla/5.0 (Java; U; Pt-br; samsung-gt-s5620) UCBrowser8.2.1.144/69/352/UCWEB Mobile UNTRUSTED/1.0",
"expect" :
"expect" :
{
"name" : "UCBrowser",
"version" : "8.2.1.144",
@@ -632,21 +842,141 @@
{
"desc" : "UC Browser on Nokia",
"ua" : "Mozilla/5.0 (S60V3; U; en-in; NokiaN73)/UC Browser8.4.0.159/28/351/UCWEB Mobile",
"expect" :
"expect" :
{
"name" : "UC Browser",
"name" : "UCBrowser",
"version" : "8.4.0.159",
"major" : "8"
}
},
{
"desc" : "UC Browser J2ME",
"ua" : "UCWEB/2.0 (MIDP-2.0; U; zh-CN; HTC EVO 3D X515m) U2/1.0.0 UCBrowser/10.4.0.558 U2/1.0.0 Mobile",
"expect" :
{
"name" : "UCBrowser",
"version" : "10.4.0.558",
"major" : "10"
}
},
{
"desc" : "UC Browser J2ME 2",
"ua" : "JUC (Linux; U; 2.3.5; zh-cn; GT-I9100; 480*800) UCWEB7.9.0.94/139/800",
"expect" :
{
"name" : "UCBrowser",
"version" : "7.9.0.94",
"major" : "7"
}
},
{
"desc": "WeChat on iOS",
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12H321 MicroMessenger/6.3.6 NetType/WIFI Language/zh_CN",
"expect":
{
"name": "WeChat",
"version": "6.3.6",
"major": "6"
}
},
{
"desc": "WeChat on Android",
"ua": "Mozilla/5.0 (Linux; U; Android 5.1; zh-cn; Lenovo K50-t5 Build/LMY47D) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 MQQBrowser/5.4 TBS/025478 Mobile Safari/533.1 MicroMessenger/6.3.5.50_r1573191.640 NetType/WIFI Language/zh_CN",
"expect":
{
"name": "WeChat",
"version": "6.3.5.50_r1573191.640",
"major": "6"
}
},
{
"desc" : "Vivaldi",
"ua" : "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.89 Vivaldi/1.0.83.38 Safari/537.36",
"expect" :
{
"name" : "Vivaldi",
"version" : "1.0.83.38",
"major" : "1"
}
},
{
"desc" : "Yandex",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5402 Safari/536.5",
"expect" :
"expect" :
{
"name" : "Yandex",
"version" : "1.0.1084.5402",
"major" : "1"
}
},
{
"desc" : "Puffin",
"ua" : "Mozilla/5.0 (Linux; Android 6.0.1; Lenovo P2a42 Build/MMB29M; en-us) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Puffin/6.0.8.15804AP",
"expect" :
{
"name" : "Puffin",
"version" : "6.0.8.15804AP",
"major" : "6"
}
},
{
"desc" : "Microsoft Edge",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0",
"expect" :
{
"name" : "Edge",
"version" : "12.0",
"major" : "12"
}
},
{
"desc" : "Iridium",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Iridium/43.8 Safari/537.36 Chrome/43.0.2357.132",
"expect" :
{
"name" : "Iridium",
"version" : "43.8",
"major" : "43"
}
},
{
"desc" : "Firefox iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) FxiOS/1.1 Mobile/13B143 Safari/601.1.46",
"expect" :
{
"name" : "Firefox",
"version" : "1.1",
"major" : "1"
}
},
{
"desc" : "QQ on iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Mobile/14A456 QQ/6.5.3.410 V1_IPH_SQ_6.5.3_1_APP_A Pixel/1080 Core/UIWebView NetType/WIFI Mem/26",
"expect" :
{
"name" : "QQ",
"version" : "6.5.3.410",
"major" : "6"
}
},
{
"desc" : "QQ on Android",
"ua" : "Mozilla/5.0 (Linux; Android 6.0; PRO 6 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile MQQBrowser/6.8 TBS/036824 Safari/537.36 V1_AND_SQ_6.5.8_422_YYB_D PA QQ/6.5.8.2910 NetType/WIFI WebP/0.3.0 Pixel/1080",
"expect" :
{
"name" : "QQ",
"version" : "6.5.8.2910",
"major" : "6"
}
},
{
"desc" : "GSA on iOS",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) GSA/30.1.161623614 Mobile/14F89 Safari/602.1",
"expect" :
{
"name" : "GSA",
"version" : "30.1.161623614",
"major" : "30"
}
}
]

View File

@@ -1,112 +1,819 @@
[
{
"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",
"expect" :
{
"vendor" : "HTC",
"model" : "Evo Shift 4G",
"type" : "mobile"
[{
"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" : "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",
"expect" :
{
"vendor" : "LG",
"model" : "Nexus 4",
"type" : "mobile"
"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" : "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",
"expect" :
{
"vendor" : "LG",
"model" : "Nexus 5",
"type" : "mobile"
"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" : "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",
"expect" :
{
"vendor" : "Motorola",
"model" : "DROID RAZR 4G",
"type" : "mobile"
"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",
"expect": {
"vendor": "HTC",
"model": "Evo Shift 4G",
"type": "mobile"
}
},
{
"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",
"expect" :
{
"vendor" : "Apple",
"model" : "iPhone",
"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" : "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",
"expect" :
{
"vendor" : "Apple",
"model" : "iPod touch",
"type" : "mobile"
"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" : "Nokia3xx",
"ua" : "Nokia303/14.87 CLDC-1.1",
"expect" :
{
"vendor" : "Nokia",
"model" : "303",
"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" : "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",
"expect" :
{
"vendor" : "Amazon",
"model" : "KFTT",
"type" : "tablet"
"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" : "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": "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" : "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": "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" : "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": "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",
"expect": {
"vendor": "LG",
"model": "Nexus 4",
"type": "mobile"
}
},
{
"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",
"expect": {
"vendor": "LG",
"model": "Nexus 5",
"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",
"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": {
"vendor": "Motorola",
"model": "DROID RAZR 4G",
"type": "mobile"
}
},
{
"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",
"expect": {
"vendor": "Apple",
"model": "iPhone",
"type": "mobile"
}
},
{
"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",
"expect": {
"vendor": "Apple",
"model": "iPod touch",
"type": "mobile"
}
},
{
"desc": "Moto X",
"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",
"expect": {
"vendor": "Motorola",
"model": "XT1058",
"type": "mobile"
}
},
{
"desc": "Nokia3xx",
"ua": "Nokia303/14.87 CLDC-1.1",
"expect": {
"vendor": "Nokia",
"model": "303",
"type": "mobile"
}
},
{
"desc": "OnePlus One",
"ua": "Mozilla/5.0 (Linux; Android 4.4.4; A0001 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36",
"expect": {
"vendor": "OnePlus",
"model": "1",
"type": "mobile"
}
},
{
"desc": "OPPO R7s",
"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",
"expect": {
"vendor": "OPPO",
"model": "R7s",
"type": "mobile"
}
},
{
"desc": "Philips SmartTV",
"ua": "Opera/9.80 HbbTV/1.1.1 (; Philips; ; ; ; ) NETTV/4.0.2; en) Version/11.60",
"expect": {
"vendor": "Philips",
"model": "",
"type": "smarttv"
}
},
{
"desc": "Kindle Fire HD",
"ua": "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true",
"expect": {
"vendor": "Amazon",
"model": "KFTT",
"type": "tablet"
}
},
{
"desc": "Samsung Galaxy Note 8",
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; GT-N5100 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.141 Safari/537.36",
"expect": {
"vendor": "Samsung",
"model": "GT-N5100",
"type": "tablet"
}
},
{
"desc": "Samsung SM-C5000",
"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",
"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 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",
"model": "VK700",
"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"
}
},
{
"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"
}
}
]

View File

@@ -1,4 +1,13 @@
[
{
"desc" : "EdgeHTML",
"ua" : "Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0",
"expect" :
{
"name" : "EdgeHTML",
"version" : "12.0"
}
},
{
"desc" : "Gecko",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b9pre) Gecko/20110111 Firefox/4.0b9pre",

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

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

View File

@@ -71,6 +71,15 @@
"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",
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
@@ -98,6 +107,15 @@
"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",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; DELL; Venue Pro)",
@@ -136,11 +154,11 @@
},
{
"desc" : "Tizen",
"ua" : "",
"ua" : "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.3 Mobile Safari/537.3",
"expect" :
{
"name" : "",
"version" : ""
"name" : "Tizen",
"version" : "2.3"
}
},
{
@@ -242,6 +260,15 @@
"version" : ""
}
},
{
"desc" : "PlayStation 4",
"ua" : "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)",
"expect" :
{
"name" : "PlayStation",
"version" : "4"
}
},
{
"desc" : "Mint",
"ua" : "",
@@ -262,11 +289,20 @@
},
{
"desc" : "Ubuntu",
"ua" : "",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Ubuntu/12.04 (3.4.1-0ubuntu1) Epiphany/3.4.1",
"expect" :
{
"name" : "",
"version" : ""
"name" : "Ubuntu",
"version" : "12.04"
}
},
{
"desc" : "Ubuntu",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/31.0.1650.63 Chrome/31.0.1650.63 Safari/537.36",
"expect" :
{
"name" : "Ubuntu",
"version" : "undefined"
}
},
{
@@ -449,6 +485,15 @@
"version" : ""
}
},
{
"desc" : "iOS in App",
"ua" : "AppName/version CFNetwork/version Darwin/version",
"expect" :
{
"name" : "iOS",
"version" : "undefined"
}
},
{
"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",
@@ -472,17 +517,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",
"expect" :
{
"name" : "Mac OS X",
"name" : "Mac OS",
"version" : "10.6.8"
}
},
{
"desc" : "Haiku",
"ua" : "",
"ua" : "Mozilla/5.0 (Macintosh; Intel Haiku R1 x86) AppleWebKit/602.1.1 (KHTML, like Gecko) WebPositive/1.2 Version/8.0 Safari/602.1.1",
"expect" :
{
"name" : "",
"version" : ""
"name" : "Haiku",
"version" : "R1"
}
},
{

View File

@@ -1,4 +1,5 @@
var assert = require('assert');
var requirejs = require('requirejs');
var UAParser = require('./../src/ua-parser');
var browsers = require('./browser-test.json');
var cpus = require('./cpu-test.json');
@@ -43,15 +44,6 @@ describe('UAParser()', function () {
assert.deepEqual(UAParser(ua), new UAParser().setUA(ua).getResult());
});
describe('Injected Browser', function () {
var uaString = 'ownbrowser/1.3';
var ownBrowser = [[/(ownbrowser)\/((\d+)?[\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION, UAParser.BROWSER.MAJOR]];
var parser = new UAParser(uaString, {browser: ownBrowser});
assert.equal(parser.getBrowser().name, 'ownbrowser');
assert.equal(parser.getBrowser().major, '1');
assert.equal(parser.getBrowser().version, '1.3');
});
for (var i in methods) {
describe(methods[i]['title'], function () {
for (var j in methods[i]['list']) {
@@ -72,3 +64,50 @@ 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();
});
});
});

View File

@@ -1,32 +0,0 @@
{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.1",
"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"
}