Skip to content

Commit

Permalink
Update settings.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SchBenedikt authored Feb 12, 2024
1 parent 4032c58 commit eacee77
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit eacee77

Please sign in to comment.