Merge pull request 'Zoom default state set | Zoom on click change' (#2) from t_a/cavepaintingsFork:master into master

Reviewed-on: https://git.snootgame.xyz/Cavemanon/cavepaintings/pulls/2
This commit was merged in pull request #2.
This commit is contained in:
2022-10-05 08:56:18 +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");
}
});