Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:faisalman/ua-parser-js into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Jan 26, 2023
2 parents 0b0c7ff + 5b2e80b commit 68447d8
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
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
// Samsung
/\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,
/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
/samsung[- ]([-\w]+)/i,
/sec-(sgh\w+)/i
], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [
Expand Down
9 changes: 9 additions & 0 deletions test/device-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,15 @@
"type": "mobile"
}
},
{
"desc": "Samsung Galaxy S20 5G",
"ua": "Mozilla/5.0 (Linux; Android 10; SCG01) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36",
"expect": {
"vendor": "Samsung",
"model": "SCG01",
"type": "mobile"
}
},
{
"desc": "Samsung Galaxy Note 10+",
"ua": "Mozilla/5.0 (Linux; Android 9; SM-N976V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.89 Mobile Safari/537.36",
Expand Down

0 comments on commit 68447d8

Please sign in to comment.