New Chnages to Switch Theme

This commit is contained in:
2025-12-08 19:36:01 +05:30
parent abb2d581d2
commit cbbb60da53
+2
View File
@@ -154,6 +154,8 @@ const checkBase = "wr:size-4 wr:opacity-0 wr:scale-90 wr:transition";
if (typeof fn === "function") {
try { fn(code); } catch (e) { console.warn("onChange handler threw", e); }
}
window.dispatchEvent(new CustomEvent("wr:language:changed", { detail: { code } }));
}
// initialize from (1) cookie, (2) localStorage, (3) navigator.language, (4) first language prop