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/darkMode.js b/src/contentScripts/communityConsole/darkTheme/darkTheme.js
similarity index 79%
rename from src/contentScripts/communityConsole/darkMode.js
rename to src/contentScripts/communityConsole/darkTheme/darkTheme.js
index 1b6c751..7bd4ba6 100644
--- a/src/contentScripts/communityConsole/darkMode.js
+++ b/src/contentScripts/communityConsole/darkTheme/darkTheme.js
@@ -1,18 +1,18 @@
 import {MDCTooltip} from '@material/tooltip';
 
-import {createPlainTooltip} from '../../common/tooltip.js';
+import {createPlainTooltip} from '../../../common/tooltip.js';
+import {createExtBadge} from '../utils/common.js';
 
-import {createExtBadge} from './utils/common.js';
 
-export function injectDarkModeButton(rightControl, previousDarkModeOption) {
+export function injectDarkThemeButton(rightControl, previousDarkThemeOption) {
   var darkThemeSwitch = document.createElement('material-button');
   darkThemeSwitch.classList.add('TWPT-dark-theme', 'TWPT-btn--with-badge');
   darkThemeSwitch.setAttribute('button', '');
 
-  darkThemeSwitch.addEventListener('click', e => {
+  darkThemeSwitch.addEventListener('click', () => {
     chrome.storage.sync.get(null, currentOptions => {
-      currentOptions.ccdarktheme_switch_status = !previousDarkModeOption;
-      chrome.storage.sync.set(currentOptions, _ => {
+      currentOptions.ccdarktheme_switch_status = !previousDarkThemeOption;
+      chrome.storage.sync.set(currentOptions, () => {
         location.reload();
       });
     });
diff --git a/src/contentScripts/communityConsole/unifiedProfiles.js b/src/contentScripts/communityConsole/darkTheme/unifiedProfiles.js
similarity index 100%
rename from src/contentScripts/communityConsole/unifiedProfiles.js
rename to src/contentScripts/communityConsole/darkTheme/unifiedProfiles.js
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);
       }
     }