mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 08:43:25 +08:00
switch mobile detection to look for "Android"
This commit is contained in:
parent
40d6f062f7
commit
978fb61cdf
|
@ -1,6 +1,6 @@
|
|||
module MobileDetection
|
||||
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
|
||||
|
||||
# we need this as a reusable chunk that is called from the cache
|
||||
|
|
|
@ -37,7 +37,7 @@ class LogAnalyzer
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
def parsed_time
|
||||
|
|
Loading…
Reference in New Issue
Block a user