Skip to content

Commit 68447d8

Browse files
committed
Merge branch 'develop' of github.com:faisalman/ua-parser-js into develop
2 parents 0b0c7ff + 5b2e80b commit 68447d8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/ua-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
// Samsung
381381
/\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
382382
], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [
383-
/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,
383+
/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
384384
/samsung[- ]([-\w]+)/i,
385385
/sec-(sgh\w+)/i
386386
], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [

test/device-test.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,6 +1584,15 @@
15841584
"type": "mobile"
15851585
}
15861586
},
1587+
{
1588+
"desc": "Samsung Galaxy S20 5G",
1589+
"ua": "Mozilla/5.0 (Linux; Android 10; SCG01) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36",
1590+
"expect": {
1591+
"vendor": "Samsung",
1592+
"model": "SCG01",
1593+
"type": "mobile"
1594+
}
1595+
},
15871596
{
15881597
"desc": "Samsung Galaxy Note 10+",
15891598
"ua": "Mozilla/5.0 (Linux; Android 9; SM-N976V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.89 Mobile Safari/537.36",

0 commit comments

Comments
 (0)