fix white flashes
This commit is contained in:
1 parent
555bf96c35
commit
77b240d5aa
2 files changed
+24
-3
No files matched your search
@@ -24,6 +24,8 @@
|
||||
root.setAttribute('data-theme', stored);
|
||||
root.style.colorScheme = (stored === 'light') ? 'light' : 'dark';
|
||||
root.style.backgroundColor = bg[stored];
|
||||
// Persist to a cookie so PHP can pre-colour the next page server-side.
|
||||
document.cookie = 'blowdit-theme=' + stored + '; path=/; max-age=31536000; SameSite=Lax';
|
||||
} catch (e) {}
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user