switch mobile detection to look for "Android"

This commit is contained in:
Jeff Atwood 2016-03-15 17:12:05 -07:00
parent 40d6f062f7
commit 978fb61cdf
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
module MobileDetection module MobileDetection
def self.mobile_device?(user_agent) def self.mobile_device?(user_agent)
user_agent =~ /Mobile|webOS|Nexus (5|6|7)/ && !(user_agent =~ /iPad/) user_agent =~ /Mobile|Android|webOS/ && !(user_agent =~ /iPad|Nexus (9|10)/)
end end
# we need this as a reusable chunk that is called from the cache # we need this as a reusable chunk that is called from the cache

View File

@ -37,7 +37,7 @@ class LogAnalyzer
end end
def is_mobile? def is_mobile?
user_agent =~ /Mobile|webOS|Nexus (5|6|7)/ && !(user_agent =~ /iPad/) user_agent =~ /Mobile|Android|webOS/ && !(user_agent =~ /iPad|Nexus (7|10)/)
end end
def parsed_time def parsed_time