]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Update to bowser 2.7.0
[rails.git] / app / assets / javascripts / index.js
index 2c7d70e11ad99603056546396c017cc7e1711ddc..2087886fa7693e3ce3beaae36047120327da3db3 100644 (file)
@@ -24,7 +24,8 @@
 //= require querystring
 
 $(document).ready(function () {
-  var querystring = require("querystring-component");
+  var querystring = require("querystring-component"),
+      browser = bowser.getParser(window.navigator.userAgent);
 
   var loaderTimeout;
 
@@ -256,7 +257,7 @@ $(document).ready(function () {
         };
 
     if (location.protocol === "http" ||
-        bowser.check({ chrome: "53", firefox: "55" })) {
+        browser.satisfies({ chrome: ">=53", firefox: ">=55" })) {
       url = "http://127.0.0.1:8111/load_and_zoom?";
     } else {
       url = "https://127.0.0.1:8112/load_and_zoom?";
@@ -347,6 +348,10 @@ $(document).ready(function () {
           });
         }
       });
+
+      $(".colour-preview-box").each(function () {
+        $(this).css("background-color", $(this).data("colour"));
+      });
     }
 
     page.unload = function () {