refactor(cc-dark-theme): minor improvements
- All the logic related to the dark theme has been placed in one folder
- "Dark mode" has been renamed to "dark theme" for consistency.
Change-Id: I8cd3a97609447d428601e61a25b55e0d4cc31e10
diff --git a/src/contentScripts/communityConsole/main.js b/src/contentScripts/communityConsole/main.js
index af69cbe..4381b86 100644
--- a/src/contentScripts/communityConsole/main.js
+++ b/src/contentScripts/communityConsole/main.js
@@ -5,7 +5,8 @@
import AvatarsHandler from './avatars.js';
import {batchLock} from './batchLock.js';
-import {injectDarkModeButton, isDarkThemeOn} from './darkMode.js';
+import {injectDarkThemeButton, isDarkThemeOn} from './darkTheme/darkTheme.js';
+import {unifiedProfilesFix} from './darkTheme/unifiedProfiles.js';
// #!if ['chromium', 'chromium_mv3'].includes(browser_target)
import {applyDragAndDropFixIfEnabled} from './dragAndDropFix.js';
// #!endif
@@ -13,7 +14,6 @@
import InfiniteScroll from './infiniteScroll.js';
import {kRepliesSectionSelector} from './threadToolbar/constants.js';
import ThreadToolbar from './threadToolbar/threadToolbar.js';
-import {unifiedProfilesFix} from './unifiedProfiles.js';
import Workflows from './workflows/workflows.js';
var mutationObserver, options, avatars, infiniteScroll, workflows,
@@ -94,7 +94,8 @@
if (options.ccdarktheme && options.ccdarktheme_mode == 'switch') {
var rightControl = node.querySelector('header .right-control');
if (rightControl !== null)
- injectDarkModeButton(rightControl, options.ccdarktheme_switch_status);
+ injectDarkThemeButton(
+ rightControl, options.ccdarktheme_switch_status);
}
}