fix: wowmine site

This commit is contained in:
2026-11-17 20:28:58 +00:00
parent cd3e215b4d
commit 393a8cc6f5
8 changed files with 59 additions and 71 deletions
@@ -1,22 +1,5 @@
// @ts-check
const root = document.documentElement;
const darkPreference = window.matchMedia("(prefers-color-scheme: dark)");
document.querySelectorAll("[data-theme-toggle]").forEach((button) => {
button.addEventListener("click", () => {
const dark = root.dataset.theme
? root.dataset.theme === "dark"
: darkPreference.matches;
root.dataset.theme = dark ? "light" : "dark";
button.setAttribute(
"aria-label",
dark ? "Включить тёмную тему" : "Включить светлую тему",
);
button.setAttribute("title", button.getAttribute("aria-label") ?? "");
});
});
document.querySelectorAll("[data-copy-address]").forEach((button) => {
button.addEventListener("click", async () => {
const address = document.getElementById("server-address");