mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Fix #379 Detect Lenovo Tab
This commit is contained in:
parent
b1d6eda6e1
commit
8cf2a87938
@ -471,13 +471,10 @@
|
|||||||
/(sprint\s(\w+))/i // Sprint Phones
|
/(sprint\s(\w+))/i // Sprint Phones
|
||||||
], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [
|
], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i // Lenovo tablets
|
|
||||||
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
|
||||||
|
|
||||||
/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i, // HTC
|
/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i, // HTC
|
||||||
/(zte)-(\w*)/i, // ZTE
|
/(zte)-(\w*)/i, // ZTE
|
||||||
/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i
|
/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i
|
||||||
// Alcatel/GeeksPhone/Lenovo/Nexian/Panasonic/Sony
|
// Alcatel/GeeksPhone/Nexian/Panasonic/Sony
|
||||||
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [
|
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/(nexus\s9)/i // HTC Nexus 9
|
/(nexus\s9)/i // HTC Nexus 9
|
||||||
@ -544,8 +541,12 @@
|
|||||||
/android.+lg(\-?[\d\w]+)\s+build/i
|
/android.+lg(\-?[\d\w]+)\s+build/i
|
||||||
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [
|
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [
|
||||||
|
|
||||||
|
/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i // Lenovo tablets
|
||||||
|
], [VENDOR, MODEL, [TYPE, TABLET]], [
|
||||||
/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]], [
|
||||||
|
/(lenovo)[_\s-]?([\w-]+)/i
|
||||||
|
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
||||||
|
|
||||||
/linux;.+((jolla));/i // Jolla
|
/linux;.+((jolla));/i // Jolla
|
||||||
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
], [VENDOR, MODEL, [TYPE, MOBILE]], [
|
||||||
|
@ -133,6 +133,15 @@
|
|||||||
"type": "mobile"
|
"type": "mobile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc": "Lenovo Tab 2",
|
||||||
|
"ua": "Mozilla/5.0 (Linux; Android 5.0.1; Lenovo TAB 2 A7-30HC Build/LRX21M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.157 Safari/537.36",
|
||||||
|
"expect": {
|
||||||
|
"vendor": "Lenovo",
|
||||||
|
"model": "TAB 2 A7",
|
||||||
|
"type": "tablet"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc": "LG Nexus 4",
|
"desc": "LG Nexus 4",
|
||||||
"ua": "Mozilla/5.0 (Linux; Android 4.2.1; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19",
|
"ua": "Mozilla/5.0 (Linux; Android 4.2.1; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user