add: check for ip bans

This commit is contained in:
trisua 2025-07-25 18:33:16 -04:00
parent 06b0aa0b4c
commit 70adae5b66
9 changed files with 84 additions and 47 deletions

View file

@ -4,8 +4,8 @@ function media_theme_pref() {
if (
window.matchMedia("(prefers-color-scheme: dark)").matches &&
(!window.localStorage.getItem("attobin:theme") ||
window.localStorage.getItem("attobin:theme") === "Auto")
(!window.localStorage.getItem("fluffle:theme") ||
window.localStorage.getItem("fluffle:theme") === "Auto")
) {
document.documentElement.classList.add("dark");
@ -13,16 +13,16 @@ function media_theme_pref() {
document.getElementById("switch_dark").classList.remove("hidden");
} else if (
window.matchMedia("(prefers-color-scheme: light)").matches &&
(!window.localStorage.getItem("attobin:theme") ||
window.localStorage.getItem("attobin:theme") === "Auto")
(!window.localStorage.getItem("fluffle:theme") ||
window.localStorage.getItem("fluffle:theme") === "Auto")
) {
document.documentElement.classList.remove("dark");
document.getElementById("switch_light").classList.remove("hidden");
document.getElementById("switch_dark").classList.add("hidden");
} else if (window.localStorage.getItem("attobin:theme")) {
} else if (window.localStorage.getItem("fluffle:theme")) {
/* restore theme */
const current = window.localStorage.getItem("attobin:theme");
const current = window.localStorage.getItem("fluffle:theme");
document.documentElement.className = current.toLowerCase();
if (current === "Light") {
@ -48,7 +48,7 @@ globalThis.temporary_set_theme = (theme) => {
};
globalThis.set_theme = (theme) => {
window.localStorage.setItem("attobin:theme", theme);
window.localStorage.setItem("fluffle:theme", theme);
document.documentElement.className = theme;
media_theme_pref();
};