(theme)
| 1114 | } |
| 1115 | |
| 1116 | function setTheme(theme) { |
| 1117 | document.documentElement.setAttribute("data-theme", theme); |
| 1118 | localStorage.setItem("theme", theme); |
| 1119 | if (themeIcon) { |
| 1120 | themeIcon.textContent = theme === "dark" ? "☀️" : "🌙"; |
| 1121 | } |
| 1122 | syncEmbeddedToolTheme(theme); |
| 1123 | refreshEmbeddedToolHrefs(); |
| 1124 | } |
| 1125 | |
| 1126 | function toggleTheme() { |
| 1127 | const currentTheme = getTheme(); |
no test coverage detected