mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
radically simplify our mobile user agent detection
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module MobileDetection
|
||||
def self.mobile_device?(user_agent)
|
||||
user_agent =~ /Mobile|Android|webOS/ && !(user_agent =~ /iPad|Nexus (9|10)/)
|
||||
user_agent =~ /Mobile/ && !(user_agent =~ /iPad/)
|
||||
end
|
||||
|
||||
# we need this as a reusable chunk that is called from the cache
|
||||
|
Reference in New Issue
Block a user