Zoom default state set | Zoom on click change #2

Merged
MichaelYick merged 2 commits from t_a/cavepaintingsFork:master into master 2022-10-05 08:56:21 +00:00
+13 -4
View File
@@ -37,14 +37,23 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
$("img.shm-main-image").click(function(e) {
switch(Cookies.get("ui-image-zoom")) {
case "full": zoom("width"); break;
default: zoom("full"); break;
$("img.shm-main-image").click(function(e)
{
switch(Cookies.get("ui-image-zoom"))
{
case "full": zoom("both"); break;
case "both": zoom("full"); break;
default: zoom("both"); break;
}
});
if(Cookies.get("ui-image-zoom")) {
zoom(Cookies.get("ui-image-zoom"));
}
if(Cookies.get("ui-image-zoom") === undefined)
{
zoom("both");
}
});