From 55b5b40c7dd5f2e44e645022ec8990efcad7e907 Mon Sep 17 00:00:00 2001 From: kNoAPP Date: Tue, 20 Sep 2022 11:56:24 -0700 Subject: [PATCH 1/2] Fix #596 - Detect Galaxy Tab S8 as tablet --- src/ua-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ua-parser.js b/src/ua-parser.js index 67e4db862..b61c16121 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -373,7 +373,7 @@ ///////////////////////// // Samsung - /\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i + /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i ], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [ /\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, From 48d930f0f1295b3a59efc8ee52854a9948d29eab Mon Sep 17 00:00:00 2001 From: kNoAPP Date: Tue, 20 Sep 2022 12:01:17 -0700 Subject: [PATCH 2/2] Add test case --- test/device-test.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/device-test.json b/test/device-test.json index dcc0498fa..bad1e50af 100644 --- a/test/device-test.json +++ b/test/device-test.json @@ -1638,6 +1638,15 @@ "type": "tablet" } }, + { + "desc": "Samsung Galaxy Tab S8", + "ua": "Mozilla/5.0 (Linux; Android 12; SM-X706B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36", + "expect": { + "vendor": "Samsung", + "model": "SM-X706B", + "type": "tablet" + } + }, { "desc": "Samsung Galaxy Tab S", "ua": "Mozilla/5.0 (Linux; Android 4.4.2; SM-T700 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",