mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Detect Googlebot from user agent and use a different layout that doesn't load javascript
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
module MobileDetection
|
||||
def self.mobile_device?(user_agent)
|
||||
# TODO: this is dumb. user agent matching is a doomed approach. a better solution is coming.
|
||||
user_agent =~ /Mobile|webOS|Nexus 7/ && !(user_agent =~ /iPad/)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user