2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-03-04 16:23:54 +01:00
|
|
|
class BrowserSupport
|
|
|
|
def self.supported?(browser)
|
|
|
|
[
|
2023-10-11 23:22:13 +02:00
|
|
|
browser.chrome? && browser.version.to_i >= 79 && !browser.platform.ios?,
|
|
|
|
browser.edge? && browser.version.to_i >= 79 && !browser.compatibility_view?,
|
|
|
|
browser.firefox? && browser.version.to_i >= 67 && !browser.platform.ios?,
|
|
|
|
browser.opera? && browser.version.to_i >= 50,
|
|
|
|
browser.safari? && browser.version.to_i >= 12,
|
2024-02-20 16:32:39 +01:00
|
|
|
browser.platform.ios? && browser.platform.version.to_i >= 12,
|
|
|
|
browser.samsung_browser? && browser.version.to_i >= 12
|
2020-03-04 16:23:54 +01:00
|
|
|
].any?
|
|
|
|
end
|
|
|
|
end
|