(theme)
| 127 | } |
| 128 | |
| 129 | function applyTheme(theme) { |
| 130 | if (theme === 'light' || theme === 'dark') { |
| 131 | document.documentElement.setAttribute('data-share-theme', theme); |
| 132 | } else { |
| 133 | document.documentElement.removeAttribute('data-share-theme'); |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | function updateThemeLabel(storedTheme) { |
| 138 | if (!themeToggleBtn) return; |