Files
RP2040-Decoder/sphinx/html/_static/dark_mode_js/default_light.js
T
2024-12-23 21:04:46 +00:00

14 lines
331 B
JavaScript

const loadTheme = () => {
let theme = localStorage.getItem('theme');
if (theme !== null) {
if (theme === 'dark')
document.documentElement.setAttribute('data-theme', 'dark');
} else {
localStorage.setItem('theme', 'light');
document.documentElement.setAttribute('data-theme', 'light');
}
};
loadTheme();