TGViewer
./π‘³π’π’„π’‚π’•π’Šπ’π’ ./π‘³π’π’„π’‚π’•π’Šπ’π’ @locationexecuted Β· 2.05K subscribers
Post #2606 14

Forwarded from TenzXTeam (noryn.)

detect button:
themeBtn.addEventListener("click", () => {

Get main elements in Html:
const root = document.documentElement;

Checking the current theme:
const isDark = root.getAttribute("data-theme") === "dark";

change theme:
root.setAttribute(
"data-theme",
isDark ? "light" : "dark"
);

Add a pause:
setTimeout(() => {
const active = document.querySelector(".nav-btn.active");
if (active) updatePill(active);
}, 100);

Add a CSS:
:root {
--bg: #f5f5f7;
--text: #171717;
--glass: rgba(255, 255, 255, 0.35);
--glass-border: rgba(255, 255, 255, 0.45);
}

:root[data-theme="dark"] {
--bg: #0b0c10;
--text: #f5f5f7;
--glass: rgba(30, 30, 35, 0.45);
--glass-border: rgba(255, 255, 255, 0.15);
}

body {
background: var(--bg);
color: var(--text);
transition: background 0.3s ease, color 0.3s ease;
}

.navbar {
background: var(--glass);
border: 1px solid var(--glass-border);
backdrop-filter: blur(20px) saturate(160%);
-webkit-backdrop-filter: blur(20px) saturate(160%);
}
More from @locationexecuted
  1. Oct 11, 2026t.me/Sller_Viaral_Melayu
  2. Oct 11, 2026t.me/Rafdanzxx
  3. Oct 11, 2026t.me/cesi_store
  4. Oct 11, 2026w blm jink lgi scrl tt tdi
  5. Oct 11, 2026untung gw skolah siang jir
  6. Oct 11, 2026Udh pada bobok jam segini mah
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’