From ac6d38ab340fb0b754949a2a0bc05f2c03654a8a Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Sat, 26 Mar 2016 02:02:23 -0700 Subject: [PATCH] radically simplify our mobile user agent detection --- lib/mobile_detection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mobile_detection.rb b/lib/mobile_detection.rb index 9dc0e17995a..a9e2702de1b 100644 --- a/lib/mobile_detection.rb +++ b/lib/mobile_detection.rb @@ -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