"use strict" const THEME_KEY = "data-theme"; function updateTheme() { let theme = localStorage.getItem(THEME_KEY); if (theme != null) { document.documentElement.setAttribute(THEME_KEY, theme) } } function setTheme(theme) { localStorage.setItem(THEME_KEY, theme); updateTheme(); } function setThemeExtend() { document.documentElement.setAttribute("data-extended-theme", "true") } updateTheme();