Photo-Enhancer / theme.js
MegaPotatoAI's picture
Initial release
fab7cea verified
Raw History Blame Contribute Delete
270 Bytes
// Apply ?__theme=light|dark (set by Hugging Face) before the stylesheet paints, so the page does not flash.
(() => {
const t = new URLSearchParams(location.search).get("__theme");
if (t === "dark" || t === "light") document.documentElement.dataset.theme = t;
})();