migrate to a non-deprecated (and dependency-free) cookie library

This commit is contained in:
Shish
2016-06-18 00:00:02 +01:00
parent dda634b068
commit 7bc9a73357
8 changed files with 165 additions and 57 deletions

View File

@ -21,7 +21,7 @@ $(function() {
$(".shm-zoomer").val(zoom_type);
$.cookie("ui-image-zoom", zoom_type, {path: '/', expires: 365});
Cookies.set("ui-image-zoom", zoom_type, {expires: 365});
}
$(".shm-zoomer").change(function(e) {
@ -29,13 +29,13 @@ $(function() {
});
$(".shm-main-image").click(function(e) {
switch($.cookie("ui-image-zoom")) {
switch(Cookies.get("ui-image-zoom")) {
case "full": zoom("width"); break;
default: zoom("full"); break;
}
});
if($.cookie("ui-image-zoom")) {
zoom($.cookie("ui-image-zoom"));
if(Cookies.get("ui-image-zoom")) {
zoom(Cookies.get("ui-image-zoom"));
}
});