]> git.openstreetmap.org Git - rails.git/blob - config/initializers/browser.rb
Merge pull request #5362 from AntonKhorev/color-mode-preference-map
[rails.git] / config / initializers / browser.rb
1 module OpenStreetMap
2   module Browser
3     module Features
4       def es6?
5         chrome?(">44") || firefox?(">24") || safari?(">7") || edge?(">11") || generic_webkit?
6       end
7
8       def generic_webkit?
9         webkit? && !chrome? && !safari? && !edge? && !phantom_js?
10       end
11     end
12   end
13 end
14
15 Browser::Base.include(OpenStreetMap::Browser::Features)