New Chnages to Switch Theme
This commit is contained in:
@@ -154,6 +154,8 @@ const checkBase = "wr:size-4 wr:opacity-0 wr:scale-90 wr:transition";
|
|||||||
if (typeof fn === "function") {
|
if (typeof fn === "function") {
|
||||||
try { fn(code); } catch (e) { console.warn("onChange handler threw", e); }
|
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
|
// initialize from (1) cookie, (2) localStorage, (3) navigator.language, (4) first language prop
|
||||||
|
|||||||
Reference in New Issue
Block a user