commit af7819023f2dddd97756d05f09e6fa7faf05dcb5
parent 68a0b3026b93890513771e665435c3faed39e5dc
Author: Hunter
Date: Mon, 30 Mar 2026 10:44:42 -0400
remove dynamic css theme discovery, hardcode theme list in state
Diffstat:
3 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/resources/main.js b/resources/main.js
@@ -77,7 +77,6 @@ document.addEventListener('DOMContentLoaded', function() {
});
// Initialize
- getThemesFromCSS();
setInitialTheme();
renderCurrentView();
selectFirstSubtask();
diff --git a/resources/state.js b/resources/state.js
@@ -10,7 +10,7 @@ var state = {
saveTimer: null,
currentThemeIndex: 0,
isF2Pressed: false,
- themes: [],
+ themes: ['gak', 'swamp', 'sunflower', 'harvest', 'medieval', 'woodstove', 'sugar', 'vineyard'],
isInWheelEvent: false,
// Multi-select state
diff --git a/resources/theme.js b/resources/theme.js
@@ -1,19 +1,4 @@
-// Theme: theme detection, cycling, and persistence
-
-function getThemesFromCSS() {
- for (var sheet of document.styleSheets) {
- try {
- for (var rule of sheet.cssRules) {
- var match = rule.selectorText && rule.selectorText.match(/:root\[data-theme="([^"]+)"\]/);
- if (match) {
- state.themes.push(match[1]);
- }
- }
- } catch (e) {
- // Skip cross-origin stylesheets
- }
- }
-}
+// Theme: theme selection, cycling, and persistence
function cycleTheme() {
state.currentThemeIndex = (state.currentThemeIndex + 1) % state.themes.length;