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

15
js/all.min.js vendored
View File

@ -0,0 +1,15 @@
// this is a test
function loadAnalytics() {};
loadAnalytics.unami = function() {
// <script defer src="https://cloud.umami.is/script.js" data-website-id="cdb79ddd-06a6-478f-b726-be39b502d6a5"></script>
let script = document.createElement("script");
script.setAttribute("defer", "");
script.setAttribute("src", "https://cloud.umami.is/script.js");
script.setAttribute("data-website-id", "cdb79ddd-06a6-478f-b726-be39b502d6a5");
document.head.appendChild(script);
};
document.addEventListener("DOMContentLoaded", () => {
loadAnalytics.unami();
})

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")) {