dodatki
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
(function() {
|
||||
try {
|
||||
const saved = localStorage.getItem('theme');
|
||||
const osPref = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
document.documentElement.setAttribute('data-theme', saved || osPref);
|
||||
const saved = localStorage.getItem("theme");
|
||||
const osPref = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
document.documentElement.setAttribute("data-theme", saved || osPref);
|
||||
} catch (e) {
|
||||
document.documentElement.setAttribute('data-theme', 'light');
|
||||
document.documentElement.setAttribute("data-theme", "light");
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user