Skip to content

Commit

Permalink
Merge pull request #474 from dust-off/master
Browse files Browse the repository at this point in the history
Fallback for Mobile
  • Loading branch information
faisalman authored Jan 8, 2021
2 parents 89a72c2 + f543c5a commit 45bf76a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,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
Original file line number Diff line number Diff line change
Expand Up @@ -1335,5 +1335,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"
}
}
]

0 comments on commit 45bf76a

Please sign in to comment.