Skip to content

Commit

Permalink
Add new device vendor: itel
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Aug 24, 2024
1 parent b1dae13 commit 491c2d7
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/enums/ua-parser-enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const Vendor = Object.freeze({
HTC: 'HTC',
HUAWEI: 'Huawei',
INFINIX: 'Infinix',
ITEL: 'itel',
JOLLA: 'Jolla',
KOBO: 'Kobo',
LENOVO: 'Lenovo',
Expand Down
4 changes: 4 additions & 0 deletions src/main/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,10 @@
/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i
], [MODEL, [VENDOR, 'TCL'], [TYPE, MOBILE]], [

// 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/specs/device-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,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 491c2d7

Please sign in to comment.