From 82d9268002402f4bb3a19d172e63a5f108689cf9 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Thu, 7 Mar 2024 17:43:33 +0000 Subject: [PATCH] Removed basalt and made the sidebar an iframe to make my life easier --- darkmode.js | 14 ++++++++++++++ donate/index.html | 25 +------------------------ halloffame/index.html | 25 +------------------------ hectabitstyles.css | 12 ++++++++++++ index.html | 26 +------------------------- nonfree/donate/index.html | 25 +------------------------ sidebar.html | 29 +++++++++++++++++++++++++++++ sidebar.js | 4 ++-- 8 files changed, 61 insertions(+), 99 deletions(-) create mode 100644 sidebar.html diff --git a/darkmode.js b/darkmode.js index 4bca1a1..f4bc6bb 100644 --- a/darkmode.js +++ b/darkmode.js @@ -1,3 +1,5 @@ + var iframe = document.getElementById('iframe'); + // Check if a dark mode cookie exists, and apply dark mode if it does if (getCookie("darkMode") === "true") { applyDarkMode(); @@ -28,10 +30,22 @@ function applyDarkMode() { document.body.classList.add("dark-mode"); + + iframe.onload = function() { + // The iframe has loaded, now you can access its content + iframe.contentWindow.document.body.classList.add("dark-mode"); + }; + iframe.contentWindow.document.body.classList.add("dark-mode"); } function applyLightMode() { document.body.classList.remove("dark-mode"); + + iframe.onload = function() { + // The iframe has loaded, now you can access its content + iframe.contentWindow.document.body.classList.remove("dark-mode"); + }; + iframe.contentWindow.document.body.classList.remove("dark-mode"); } // Helper functions for handling cookies diff --git a/donate/index.html b/donate/index.html index efd9e18..646e80d 100755 --- a/donate/index.html +++ b/donate/index.html @@ -13,30 +13,7 @@