analytics question mark

This commit is contained in:
sky
2025-10-19 13:46:12 -04:00
parent b0681ff009
commit a043621fff
8 changed files with 186 additions and 12 deletions

View File

@ -35,8 +35,22 @@ function cursor() {
}
function themes() {
document.body.setAttribute("theme", localStorage.getItem("selenite.theme") || "")
if(document.body.getAttribute("theme") == "custom") {
setTheme(JSON.parse(localStorage.getItem("selenite.customTheme")))
}
}
function setTheme(arg) {
let theme = arg;
document.body.setAttribute("style", `
--text-color: ${theme["text-color"]};
--bg-1: ${theme["bg-1"]};
--bg-2: ${theme["bg-2"]};
--color-1: ${theme["color-1"]};
--color-2: ${theme["color-2"]};
--color-3: ${theme["color-3"]};
--color-4: ${theme["color-4"]};
`)
}
document.addEventListener("DOMContentLoaded", ()=>{
if(!(localStorage.getItem("selenite.fast-mode") == 'true')) {
setBackground();
@ -55,7 +69,6 @@ document.addEventListener("scroll", ()=>{
// var interval;
// document.addEventListener("DOMContentLoaded", function () {
// if (localStorage.getItem("theme")) {