Delete '.fuse_hidden00011c5c0000004a'
parent
fb74d10d6d
commit
2b9f6ba268
@ -1,19 +0,0 @@
|
||||
function detectTheme() {
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// Dark mode
|
||||
console.log("Dark mode detected");
|
||||
// Add your dark mode styles or trigger a CSS class change here
|
||||
document.body.classList.add('dark-mode');
|
||||
} else {
|
||||
// Light mode
|
||||
console.log("Light mode detected");
|
||||
// Add your light mode styles or trigger a CSS class change here
|
||||
document.body.classList.add('light-mode');
|
||||
}
|
||||
}
|
||||
|
||||
// Call the function to detect the initial theme
|
||||
detectTheme();
|
||||
|
||||
// Listen for changes in the system preference
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', detectTheme);
|
Loading…
Reference in New Issue