Skip to content

Commit

Permalink
Enable to detect OPPO Reno5 A correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
shimar committed Oct 22, 2021
1 parent 8fe448f commit 191fed9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@

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

// Vivo
Expand Down
9 changes: 9 additions & 0 deletions test/device-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,15 @@
"type": "mobile"
}
},
{
"desc": "OPPO Reno5 A",
"ua": "Mozilla/5.0 (Linux; Android 11; A101OP) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Mobile Safari/537.36",
"expect": {
"vendor": "OPPO",
"model": "A101OP",
"type": "mobile"
}
},
{
"desc": "OPPO Find X",
"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",
Expand Down

0 comments on commit 191fed9

Please sign in to comment.