Skip to content
This repository was archived by the owner on Jul 19, 2018. It is now read-only.

Commit d53bc18

Browse files
committed
Merge pull request #331 from miketaylr/fx-tablet
Better detection of Firefox browsers on tablets (Firefox OS and Android)
2 parents 2875e0c + 35be2de commit d53bc18

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

regexes.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ os_parsers:
678678
##########
679679
# Firefox OS
680680
##########
681-
- regex: '\(Mobile;.+Firefox/\d+\.\d+'
681+
- regex: '\((?:Mobile|Tablet);.+Firefox/\d+\.\d+'
682682
os_replacement: 'Firefox OS'
683683

684684
##########

test_resources/test_device.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ test_cases:
213213
- user_agent_string: 'Mozilla/5.0 (Mobile; rv:15.0) Gecko/15.0 Firefox/15.0'
214214
family: 'Other'
215215

216+
- user_agent_string: 'Mozilla/5.0 (Tablet; rv:29.0) Gecko/29.0 Firefox/29.0'
217+
family: 'Other'
218+
216219
- user_agent_string: 'PantechP6010/JNUS11072011 BMP/1.0.2 DeviceId/141020 NetFront/4.1 OMC/1.5.3 Profile/MIDP-2.1 Configuration/CLDC-1.1'
217220
family: 'Pantech P6010'
218221

test_resources/test_user_agent_parser_os.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ test_cases:
217217
patch:
218218
patch_minor:
219219

220+
- user_agent_string: 'Mozilla/5.0 (Tablet; rv:29.0) Gecko/29.0 Firefox/29.0'
221+
family: 'Firefox OS'
222+
major:
223+
minor:
224+
patch:
225+
patch_minor:
226+
220227
- user_agent_string: 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10'
221228
family: 'iOS'
222229
major: '3'

0 commit comments

Comments
 (0)