//= require jquery3
//= require jquery_ujs
//= require jquery.timers
-//= require jquery.cookie/jquery.cookie
//= require jquery.throttle-debounce
+//= require js-cookie/src/js.cookie
//= require popper
//= require bootstrap-sprockets
//= require osm
map.getLayersCode(),
map._object);
- $.removeCookie("_osm_location");
- $.cookie("_osm_location", OSM.locationCookie(map), { secure: true, expires: expiry, path: "/" });
+ Cookies.remove("_osm_location");
+ Cookies.set("_osm_location", OSM.locationCookie(map), { secure: true, expires: expiry, path: "/" });
});
- if ($.cookie("_osm_welcome") !== "hide") {
+ if (Cookies.get("_osm_welcome") !== "hide") {
$(".welcome").addClass("visible");
}
$(".welcome .close").on("click", function () {
$(".welcome").removeClass("visible");
- $.cookie("_osm_welcome", "hide", { secure: true, expires: expiry, path: "/" });
+ Cookies.set("_osm_welcome", "hide", { secure: true, expires: expiry, path: "/" });
});
var bannerExpiry = new Date();
$("#banner").hide();
e.preventDefault();
if (cookieId) {
- $.cookie(cookieId, "hide", { secure: true, expires: bannerExpiry, path: "/" });
+ Cookies.set(cookieId, "hide", { secure: true, expires: bannerExpiry, path: "/" });
}
});
}
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: "/" });
getRoute(true, true);
});
mapParams.lon = parseFloat(params.mlon);
mapParams.lat = parseFloat(params.mlat);
mapParams.zoom = parseInt(params.zoom || 12);
- } else if (loc = $.cookie('_osm_location')) {
+ } else if (loc = Cookies.get('_osm_location')) {
loc = loc.split("|");
mapParams.lon = parseFloat(loc[0]);
mapParams.lat = parseFloat(loc[1]);
"bs-custom-file-input": "^1.3.4",
"html5shiv": "^3.7.3",
"jquery-simulate": "^1.0.2",
- "jquery.cookie": "^1.4.1",
+ "js-cookie": "^2.2.1",
"leaflet": "^1.6.0",
"leaflet.locatecontrol": "^0.73.0",
"ohauth": "^1.0.0",
resolved "https://registry.yarnpkg.com/jquery-simulate/-/jquery-simulate-1.0.2.tgz#2174b859b75123a0ac6d8ab3a9a6fb4ad7e82898"
integrity sha512-Bq610fSrwTwvH5d06z5oskYaX/79s0BNrKiJZjZOiXRib3iL4ZkSn/wvLwzhf3P9KeXCEpk9wlIaGui/1arOpQ==
-jquery.cookie@^1.4.1:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/jquery.cookie/-/jquery.cookie-1.4.1.tgz#d63dce209eab691fe63316db08ca9e47e0f9385b"
- integrity sha1-1j3OIJ6raR/mMxbbCMqeR+D5OFs=
+js-cookie@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8"
+ integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==
js-tokens@^4.0.0:
version "4.0.0"