From eacee7704b5ef92a6031144ceda33b0849fb5df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20Sch=C3=A4chner?= Date: Mon, 12 Feb 2024 21:08:37 +0100 Subject: [PATCH] Update settings.js --- js/settings.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/js/settings.js b/js/settings.js index ec4caac..e83e0e6 100644 --- a/js/settings.js +++ b/js/settings.js @@ -27,21 +27,6 @@ function applyUnsplash() { unsplashCheckbox.checked = isUnsplashEnabled(); } -function toggleStyle(checked) { - document.cookie = `style_enabled=${checked}; expires=Fri, 31 Dec 9999 23:59:59 GMT;`; -} - -function isStyleEnabled() { - const cookieValue = document.cookie.replace(/(?:(?:^|.*;\s*)style_enabled\s*=\s*([^;]*).*$)|^.*$/, "$1"); - return cookieValue === "true"; -} - -function applyStyle() { - const styleCheckbox = document.getElementById("style"); - styleCheckbox.checked = isStyleEnabled(); - -} - applyBackgroundColor(); applyUnsplash(); applyStyle();