Skip to content

Commit 45bf76a

Browse files
authored
Merge pull request #474 from dust-off/master
Fallback for Mobile
2 parents 89a72c2 + f543c5a commit 45bf76a

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
8181
Contiki, Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Fuchsia, Gentoo, GNU,
8282
Haiku, Hurd, iOS, Joli, KaiOS, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo,
8383
Minix, Mint, Morph OS, NetBSD, Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD,
84-
PCLinuxOS, Plan9, Playstation, QNX, RedHat, RIM Tablet OS, RISC OS, Sailfish,
84+
PCLinuxOS, Plan9, PlayStation, QNX, RedHat, RIM Tablet OS, RISC OS, Sailfish,
8585
Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux,
8686
WebOS, Windows [Phone/Mobile], Zenwalk, ...
8787

src/ua-parser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,10 @@
692692
], [[TYPE, SMARTTV]], [
693693

694694
/(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device
695-
], [MODEL, [VENDOR, 'Generic']]
695+
], [MODEL, [VENDOR, 'Generic']], [
696+
697+
/(phone)/i,
698+
], [[TYPE, MOBILE]]
696699
],
697700

698701
engine : [[

test/device-test.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,5 +1335,12 @@
13351335
"model": "LYA-TL00",
13361336
"type": "mobile"
13371337
}
1338+
},
1339+
{
1340+
"desc": "FaceBook Mobile App",
1341+
"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]",
1342+
"expect": {
1343+
"type": "mobile"
1344+
}
13381345
}
13391346
]

0 commit comments

Comments
 (0)