Fall back to old edit mode if typed arrays are not supported.

This commit is contained in:
bootstraponline
2012-07-03 14:47:27 -06:00
parent f738aa4234
commit 00ded65b7f
2 changed files with 17 additions and 4 deletions
-3
View File
@@ -32,12 +32,9 @@ module Precious
# Detect unsupported browsers.
@@supported_browsers = ['Firefox', 'Chrome', 'Safari']
Browser = Struct.new(:browser, :version)
# ie9 support is a work in progress.
# @@ie9 = Browser.new('Internet Explorer', '9.0')
def supported_useragent?(user_agent)
ua = UserAgent.parse(user_agent)
# return true if ua >= @@ie9
@@supported_browsers.include? ua.browser
end