mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
Merge pull request #26 from startswithaj/master
Add support for iPod touch and add device tests for iPhone and iPod
This commit is contained in:
commit
4d28bee555
@ -315,7 +315,7 @@
|
|||||||
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak
|
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak
|
||||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||||
|
|
||||||
/\((ip[honed]+);.+(apple)/i // iPod/iPhone
|
/\((ip[honed|\s\w*]+);.+(apple)/i // iPod/iPhone
|
||||||
], [MODEL, VENDOR, [TYPE, MOBILE]], [
|
], [MODEL, VENDOR, [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/(blackberry)[\s-]?(\w+)/i, // BlackBerry
|
/(blackberry)[\s-]?(\w+)/i, // BlackBerry
|
||||||
|
@ -28,4 +28,25 @@
|
|||||||
"model" : "DROID RAZR 4G",
|
"model" : "DROID RAZR 4G",
|
||||||
"type" : "mobile"
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user