mirror of
https://github.com/welpo/tabi.git
synced 2025-10-10 23:38:53 +02:00
🎨 refactor: format JS with Prettier (#240)
This commit is contained in:
parent
39fc4ece61
commit
b6a89e6370
12 changed files with 93 additions and 62 deletions
|
@ -17,6 +17,9 @@
|
|||
} else {
|
||||
// If no theme is found in local storage and no default theme is set, use user's system preference.
|
||||
const isSystemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
document.documentElement.setAttribute('data-theme', isSystemDark ? 'dark' : 'light');
|
||||
document.documentElement.setAttribute(
|
||||
'data-theme',
|
||||
isSystemDark ? 'dark' : 'light'
|
||||
);
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue