Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f1d024c

Browse filesBrowse files
committed
Merge pull request selwin#38 from glogiotatidis/firefoxos
Firefox OS fixes
2 parents bb1f6bc + a10aa4a commit f1d024c
Copy full SHA for f1d024c

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎user_agents/parsers.py

Copy file name to clipboardExpand all lines: user_agents/parsers.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
'Windows RT',
6363
'Windows CE',
6464
'Windows Mobile',
65+
'Firefox OS',
6566
)
6667

6768
TOUCH_CAPABLE_DEVICE_FAMILIES = (
@@ -164,6 +165,8 @@ def is_tablet(self):
164165
return True
165166
if self.os.family.startswith('Windows RT'):
166167
return True
168+
if self.os.family == 'Firefox OS' and 'Mobile' not in self.browser.family:
169+
return True
167170
return False
168171

169172
@property
@@ -175,7 +178,8 @@ def is_mobile(self):
175178
return True
176179
# Device is considered Mobile OS is Android and not tablet
177180
# This is not fool proof but would have to suffice for now
178-
if self.os.family == 'Android' and not self.is_tablet:
181+
if ((self.os.family == 'Android' or self.os.family == 'Firefox OS')
182+
and not self.is_tablet):
179183
return True
180184
if self.os.family == 'BlackBerry OS' and self.device.family != 'Blackberry Playbook':
181185
return True

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.