mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 16:38:47 +03:00
Merge pull request #88 from soundrop/develop
Better detection of Sony Xperia devices
This commit is contained in:
commit
c3ddbe27ae
4
dist/ua-parser.min.js
vendored
4
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
|||||||
* UAParser.js v0.7.3
|
* UAParser.js v0.7.3
|
||||||
* Lightweight JavaScript-based User-Agent string parser
|
* Lightweight JavaScript-based User-Agent string parser
|
||||||
* https://github.com/faisalman/ua-parser-js
|
* https://github.com/faisalman/ua-parser-js
|
||||||
*
|
*
|
||||||
* Copyright © 2012-2014 Faisal Salman <fyzlman@gmail.com>
|
* Copyright © 2012-2014 Faisal Salman <fyzlman@gmail.com>
|
||||||
* Dual licensed under GPLv2 & MIT
|
* Dual licensed under GPLv2 & MIT
|
||||||
*/
|
*/
|
||||||
@ -260,7 +260,7 @@
|
|||||||
], [[NAME, 'Yandex'], VERSION], [
|
], [[NAME, 'Yandex'], VERSION], [
|
||||||
|
|
||||||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
|
||||||
], [[NAME, /_/g, ' '], VERSION], [
|
], [[NAME, /_/g, ' '], VERSION], [
|
||||||
|
|
||||||
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,
|
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,
|
||||||
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
||||||
@ -484,8 +484,11 @@
|
|||||||
/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i
|
/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i
|
||||||
], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [
|
], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [
|
||||||
|
|
||||||
/(sony)\s(tablet\s[ps])/i // Sony Tablets
|
/(sony)\s(tablet\s[ps])\sbuild\//i, // Sony
|
||||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
/(sony)?(?:sgp.+)\sbuild\//i
|
||||||
|
], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [
|
||||||
|
/(?:sony)?(?:(?:(?:c|d)\d{4})|(?:so[-l].+))\sbuild\//i
|
||||||
|
], [[VENDOR, 'Sony'], [MODEL, 'Xperia Phone'], [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/\s(ouya)\s/i, // Ouya
|
/\s(ouya)\s/i, // Ouya
|
||||||
/(nintendo)\s([wids3u]+)/i // Nintendo
|
/(nintendo)\s([wids3u]+)/i // Nintendo
|
||||||
@ -550,16 +553,16 @@
|
|||||||
/(nexus\s[45])/i, // LG
|
/(nexus\s[45])/i, // LG
|
||||||
/lg[e;\s\/-]+(\w+)*/i
|
/lg[e;\s\/-]+(\w+)*/i
|
||||||
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [
|
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/android.+(ideatab[a-z0-9\-\s]+)/i // Lenovo
|
/android.+(ideatab[a-z0-9\-\s]+)/i // Lenovo
|
||||||
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [
|
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [
|
||||||
|
|
||||||
/linux;.+((jolla));/i // Jolla
|
/linux;.+((jolla));/i // Jolla
|
||||||
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/((pebble))app\/[\d\.]+\s/i // Pebble
|
/((pebble))app\/[\d\.]+\s/i // Pebble
|
||||||
], [VENDOR, MODEL, [TYPE, WEARABLE]], [
|
], [VENDOR, MODEL, [TYPE, WEARABLE]], [
|
||||||
|
|
||||||
/android.+;\s(glass)\s\d/i // Google Glass
|
/android.+;\s(glass)\s\d/i // Google Glass
|
||||||
], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [
|
], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [
|
||||||
|
|
||||||
@ -633,7 +636,7 @@
|
|||||||
/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i // iOS
|
/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i // iOS
|
||||||
], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [
|
], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [
|
||||||
|
|
||||||
/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,
|
/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,
|
||||||
/(macintosh|mac(?=_powerpc)\s)/i // Mac OS
|
/(macintosh|mac(?=_powerpc)\s)/i // Mac OS
|
||||||
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [
|
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [
|
||||||
|
|
||||||
@ -705,7 +708,7 @@
|
|||||||
UAParser.BROWSER = {
|
UAParser.BROWSER = {
|
||||||
NAME : NAME,
|
NAME : NAME,
|
||||||
MAJOR : MAJOR,
|
MAJOR : MAJOR,
|
||||||
VERSION : VERSION
|
VERSION : VERSION
|
||||||
};
|
};
|
||||||
UAParser.CPU = {
|
UAParser.CPU = {
|
||||||
ARCHITECTURE : ARCHITECTURE
|
ARCHITECTURE : ARCHITECTURE
|
||||||
@ -727,7 +730,7 @@
|
|||||||
};
|
};
|
||||||
UAParser.OS = {
|
UAParser.OS = {
|
||||||
NAME : NAME,
|
NAME : NAME,
|
||||||
VERSION : VERSION
|
VERSION : VERSION
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
{
|
{
|
||||||
"desc" : "Nokia3xx",
|
"desc" : "Nokia3xx",
|
||||||
"ua" : "Nokia303/14.87 CLDC-1.1",
|
"ua" : "Nokia303/14.87 CLDC-1.1",
|
||||||
"expect" :
|
"expect" :
|
||||||
{
|
{
|
||||||
"vendor" : "Nokia",
|
"vendor" : "Nokia",
|
||||||
"model" : "303",
|
"model" : "303",
|
||||||
@ -118,5 +118,75 @@
|
|||||||
"model" : "SM-T520",
|
"model" : "SM-T520",
|
||||||
"type" : "tablet"
|
"type" : "tablet"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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" : "Xperia Phone",
|
||||||
|
"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" : "Xperia Phone",
|
||||||
|
"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" : "Xperia Phone",
|
||||||
|
"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" : "Xperia Phone",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user