From 191fed912779a0fd1db46319c956353feb8e4ff2 Mon Sep 17 00:00:00 2001 From: Ryohei Shima Date: Fri, 22 Oct 2021 12:23:36 +0900 Subject: [PATCH] Enable to detect OPPO Reno5 A correctly. --- src/ua-parser.js | 2 +- test/device-test.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ua-parser.js b/src/ua-parser.js index ce134241..8df1885a 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -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 diff --git a/test/device-test.json b/test/device-test.json index d0a5f897..da6a820e 100644 --- a/test/device-test.json +++ b/test/device-test.json @@ -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",