Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback for Mobile #474

Merged
merged 3 commits into from Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -81,7 +81,7 @@ AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
Contiki, Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Fuchsia, Gentoo, GNU,
Haiku, Hurd, iOS, Joli, KaiOS, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo,
Minix, Mint, Morph OS, NetBSD, Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD,
PCLinuxOS, Plan9, Playstation, QNX, RedHat, RIM Tablet OS, RISC OS, Sailfish,
PCLinuxOS, Plan9, PlayStation, QNX, RedHat, RIM Tablet OS, RISC OS, Sailfish,
Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux,
WebOS, Windows [Phone/Mobile], Zenwalk, ...

Expand Down
5 changes: 4 additions & 1 deletion src/ua-parser.js
Expand Up @@ -689,7 +689,10 @@
], [[TYPE, SMARTTV]], [

/(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']]
], [MODEL, [VENDOR, 'Generic']], [

/(phone)/i,
], [[TYPE, MOBILE]]
],

engine : [[
Expand Down
7 changes: 7 additions & 0 deletions test/device-test.json
Expand Up @@ -1326,5 +1326,12 @@
"model": "LYA-TL00",
"type": "mobile"
}
},
{
"desc": "FaceBook Mobile App",
"ua": "[FBAN/FBIOS;FBAV/283.0.0.44.117;FBBV/238386386;FBDV/iPhone12,1;FBMD/iPhone;FBSN/iOS;FBSV/13.6.1;FBSS/2;FBID/phone;FBLC/en_US;FBOP/5;FBRV/240127608]",
"expect": {
"type": "mobile"
}
}
]