Skip to content

Commit b4cfe1b

Browse files
authored
Merge pull request #535 from shimar/fix/534-oppo-reno5-a
Enable to detect OPPO Reno5 A correctly.
2 parents 95fea1c + 191fed9 commit b4cfe1b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/ua-parser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@
404404

405405
// OPPO
406406
/; (\w+) bui.+ oppo/i,
407-
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i
407+
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
408408
], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [
409409

410410
// Vivo

test/device-test.json

+9
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,15 @@
12421242
"type": "mobile"
12431243
}
12441244
},
1245+
{
1246+
"desc": "OPPO Reno5 A",
1247+
"ua": "Mozilla/5.0 (Linux; Android 11; A101OP) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Mobile Safari/537.36",
1248+
"expect": {
1249+
"vendor": "OPPO",
1250+
"model": "A101OP",
1251+
"type": "mobile"
1252+
}
1253+
},
12451254
{
12461255
"desc": "OPPO Find X",
12471256
"ua": "Mozilla/5.0 (Linux; Android 8.1; PAFM00 Build/OPM1.171019.026) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36",

0 commit comments

Comments
 (0)