From b8d823dd574411906028c4ae3e4bd1bcc5ee936c Mon Sep 17 00:00:00 2001 From: Faisal Salman Date: Fri, 16 Aug 2024 14:23:07 +0700 Subject: [PATCH] Improve detection: Amazon Echo Show devices --- src/main/ua-parser.js | 2 +- test/specs/device-all.json | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/ua-parser.js b/src/main/ua-parser.js index a6cbfcd..75ff935 100755 --- a/src/main/ua-parser.js +++ b/src/main/ua-parser.js @@ -600,7 +600,7 @@ // Amazon /(alexa)webm/i, - /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, // Kindle Fire without Silk / Echo Show + /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, // Kindle Fire without Silk / Echo Show /(kf[a-z]+)( bui|\)).+silk\//i // Kindle Fire HD ], [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]], [ /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i // Fire Phone diff --git a/test/specs/device-all.json b/test/specs/device-all.json index bff5163..125555a 100644 --- a/test/specs/device-all.json +++ b/test/specs/device-all.json @@ -1916,6 +1916,24 @@ "type": "tablet" } }, + { + "desc": "Echo Show 8", + "ua": "Mozilla/5.0 (Linux; Android 7.1.2; AEOCW) AppleWebKit/537.36 (KHTML, like Gecko) Silk/106.3.3 like Chrome/106.0.5249.170 Safari/537.36", + "expect": { + "vendor": "Amazon", + "model": "AEOCW", + "type": "tablet" + } + }, + { + "desc": "Echo Show 15", + "ua": "Mozilla/5.0 (Linux; Android 9; AEOHY) AppleWebKit/537.36 (KHTML, like Gecko) Silk/112.6.3 like Chrome/112.0.5615.213 Safari/537.36", + "expect": { + "vendor": "Amazon", + "model": "AEOHY", + "type": "tablet" + } + }, { "desc": "Echo Dot", "ua": "Dalvik/2.1.0 (Linux; U; Android 5.1.1; AEOBC Build/LVY48F)",