]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Rework the routing credit to use a bootstrap class
[rails.git] / app / assets / javascripts / index / directions.js
index a58b0af16abc956471170020435ab0c916a8c508..6fd02a57bd55a39efa7fddb9873359578e964d2d 100644 (file)
@@ -312,7 +312,7 @@ OSM.Directions = function (map) {
         $("#turnbyturn").append(row);
       });
 
-      $("#sidebar_content").append("<p id=\"routing_credit\">" +
+      $("#sidebar_content").append("<p class=\"text-center\">" +
         I18n.t("javascripts.directions.instructions.courtesy", { link: chosenEngine.creditline }) +
         "</p>");
 
@@ -327,14 +327,14 @@ OSM.Directions = function (map) {
   }
 
   var chosenEngineIndex = findEngine("fossgis_osrm_car");
-  if ($.cookie("_osm_directions_engine")) {
-    chosenEngineIndex = findEngine($.cookie("_osm_directions_engine"));
+  if (Cookies.get("_osm_directions_engine")) {
+    chosenEngineIndex = findEngine(Cookies.get("_osm_directions_engine"));
   }
   setEngine(chosenEngineIndex);
 
   select.on("change", function (e) {
     chosenEngine = engines[e.target.selectedIndex];
-    $.cookie("_osm_directions_engine", chosenEngine.id, { secure: true, expires: expiry, path: "/" });
+    Cookies.set("_osm_directions_engine", chosenEngine.id, { secure: true, expires: expiry, path: "/", samesite: "lax" });
     getRoute(true, true);
   });