From d9364d2799a952d018d7ee9ab27beaa7db561482 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Fri, 21 Oct 2022 22:04:10 +0200 Subject: [PATCH] ensure really no cookies --- themes/PaperMod/layouts/partials/footer.html | 6 +++--- update-theme.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/PaperMod/layouts/partials/footer.html b/themes/PaperMod/layouts/partials/footer.html index 52668eb..f5fa818 100644 --- a/themes/PaperMod/layouts/partials/footer.html +++ b/themes/PaperMod/layouts/partials/footer.html @@ -28,7 +28,7 @@ if (menu) { menu.scrollLeft = localStorage.getItem("menu-scroll-position"); menu.onscroll = function () { - localStorage.setItem("menu-scroll-position", menu.scrollLeft); + //localStorage.setItem("menu-scroll-position", menu.scrollLeft); } } @@ -74,10 +74,10 @@ document.getElementById("theme-toggle").addEventListener("click", () => { if (document.body.className.includes("dark")) { document.body.classList.remove('dark'); - localStorage.setItem("pref-theme", 'light'); + //localStorage.setItem("pref-theme", 'light'); } else { document.body.classList.add('dark'); - localStorage.setItem("pref-theme", 'dark'); + //localStorage.setItem("pref-theme", 'dark'); } }) diff --git a/update-theme.sh b/update-theme.sh index e327269..8a433e7 100755 --- a/update-theme.sh +++ b/update-theme.sh @@ -2,4 +2,5 @@ rm -rf themes mkdir themes git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 rm -rf themes/PaperMod/.git* +sed -i s@localStorage.setItem@//localStorage.setItem@g themes/PaperMod/layouts/partials/footer.html git add themes