Skip to content

Commit

Permalink
Backport - Add new device vendor: itel
Browse files Browse the repository at this point in the history
(cherry picked from commit 491c2d7)
  • Loading branch information
faisalman committed Sep 10, 2024
1 parent 33eb27d commit a931582
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@
/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i
], [MODEL, [VENDOR, 'TCL'], [TYPE, TABLET]], [

// itel
/(itel) ((\w+))/i
], [[VENDOR, lowerize], MODEL, [TYPE, strMapper, { 'tablet' : ['p10001l', 'w7001'], '*' : 'mobile' }]], [

// Acer
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [
Expand Down
54 changes: 54 additions & 0 deletions test/device-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,60 @@
"type": "mobile"
}
},
{
"desc": "itel A25",
"ua": "Mozilla/5.0 (Linux; Android 9; itel L5002) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.130 Mobile Safari/537.36 OPR/63.3.3216.58675",
"expect": {
"vendor": "itel",
"model": "L5002",
"type": "mobile"
}
},
{
"desc": "itel A50",
"ua": "Mozilla/5.0 (Linux; U; Android 14; itel A667L Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36 OPR/83.1.2254.73239",
"expect": {
"vendor": "itel",
"model": "A667L",
"type": "mobile"
}
},
{
"desc": "itel KidPad 1",
"ua": "Mozilla/5.0 (Linux; Android 10; Itel W7001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.101 Mobile Safari/537.36",
"expect": {
"vendor": "itel",
"model": "W7001",
"type": "tablet"
}
},
{
"desc": "itel Pad One",
"ua": "Mozilla/5.0 (Linux; Android 12; itel P10001L Build/SP1A.210812.016) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.172 Safari/537.36",
"expect": {
"vendor": "itel",
"model": "P10001L",
"type": "tablet"
}
},
{
"desc": "itel RS4",
"ua": "Mozilla/5.0 (Linux; Android 13; itel S666LN Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/468.1.0.56.78;]",
"expect": {
"vendor": "itel",
"model": "S666LN",
"type": "mobile"
}
},
{
"desc": "itel Vision 2S",
"ua": "Mozilla/5.0 (Linux; Android 11; itel P651L Build/RP1A.201005.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.76 Mobile Safari/537.36",
"expect": {
"vendor": "itel",
"model": "P651L",
"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",
Expand Down

0 comments on commit a931582

Please sign in to comment.