diff --git a/src/ua-parser.js b/src/ua-parser.js index 34cabc461..99f75077a 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -375,7 +375,6 @@ ////////////////////////// // MOBILES & TABLETS - // Ordered by popularity ///////////////////////// // Samsung @@ -396,6 +395,10 @@ /(macintosh);/i ], [MODEL, [VENDOR, APPLE]], [ + // Sharp + /\b(sh-?[altvz]?\d\d[a-ekm]?)/i + ], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [ + // Huawei /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i ], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [ @@ -511,10 +514,6 @@ /\bmz-([-\w]{2,})/i ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [ - // Sharp - /\b(sh-?[altvz]?\d\d[a-ekm]?)/i - ], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [ - // MIXED /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron diff --git a/test/device-test.json b/test/device-test.json index bb2952866..08874210a 100644 --- a/test/device-test.json +++ b/test/device-test.json @@ -1764,6 +1764,15 @@ "type": "mobile" } }, + { + "desc": "Sharp Aquos L2", + "ua": "Mozilla/5.0 (Linux; Android 7.0; SH-L02) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36", + "expect": { + "vendor": "Sharp", + "model": "SH-L02", + "type": "mobile" + } + }, { "desc": "Sharp Aquos R2", "ua": "Mozilla/5.0 (Linux; Android 8.0; SHV42) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Mobile Safari/537.36",