Skip to content

Commit

Permalink
Merge pull request #598 from kNoAPP/knoapp-tab-s8
Browse files Browse the repository at this point in the history
Fix #596 - Detect Galaxy Tab S8 as tablet
  • Loading branch information
faisalman committed Sep 27, 2022
2 parents 8483ac0 + 48d930f commit 8d21e34
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
Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions test/device-test.json
Expand Up @@ -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",
Expand Down

0 comments on commit 8d21e34

Please sign in to comment.