lightmode -> dark mode

This commit is contained in:
Ajay
2022-01-24 23:33:27 -05:00
parent c49ebbe371
commit 8452bfb32a
5 changed files with 10 additions and 10 deletions

View File

@@ -790,8 +790,8 @@
"hideDonationLink": { "hideDonationLink": {
"message": "Hide Donation Link" "message": "Hide Donation Link"
}, },
"lightModeOptionsPage": { "darkModeOptionsPage": {
"message": "Light Mode On Options Page" "message": "Dark Mode On Options Page"
}, },
"helpPageThanksForInstalling": { "helpPageThanksForInstalling": {
"message": "Thanks for installing SponsorBlock." "message": "Thanks for installing SponsorBlock."

View File

@@ -278,14 +278,14 @@
<div class="small-description">__MSG_showTimeWithSkipsDescription__</div> <div class="small-description">__MSG_showTimeWithSkipsDescription__</div>
</div> </div>
<div data-type="toggle" data-sync="lightMode"> <div data-type="toggle" data-sync="darkMode">
<div class="switch-container"> <div class="switch-container">
<label class="switch"> <label class="switch">
<input id="lightMode" type="checkbox" checked> <input id="darkMode" type="checkbox" checked>
<span class="slider round"></span> <span class="slider round"></span>
</label> </label>
<label class="switch-label" for="lightMode"> <label class="switch-label" for="darkMode">
__MSG_lightModeOptionsPage__ __MSG_darkModeOptionsPage__
</label> </label>
</div> </div>
</div> </div>

View File

@@ -52,7 +52,7 @@ interface SBConfig {
}, },
scrollToEditTimeUpdate: boolean, scrollToEditTimeUpdate: boolean,
categoryPillUpdate: boolean, categoryPillUpdate: boolean,
lightMode: boolean, darkMode: boolean,
skipKeybind: Keybind, skipKeybind: Keybind,
startSponsorKeybind: Keybind, startSponsorKeybind: Keybind,
@@ -208,7 +208,7 @@ const Config: SBObject = {
autoSkipOnMusicVideos: false, autoSkipOnMusicVideos: false,
scrollToEditTimeUpdate: false, // false means the tooltip will be shown scrollToEditTimeUpdate: false, // false means the tooltip will be shown
categoryPillUpdate: false, categoryPillUpdate: false,
lightMode: false, darkMode: true,
/** /**
* Default keybinds should not set "code" as that's gonna be different based on the user's locale. They should also only use EITHER ctrl OR alt modifiers (or none). * Default keybinds should not set "code" as that's gonna be different based on the user's locale. They should also only use EITHER ctrl OR alt modifiers (or none).

View File

@@ -11,7 +11,7 @@ async function init() {
await utils.wait(() => Config.config !== null); await utils.wait(() => Config.config !== null);
if (Config.config.lightMode) { if (!Config.config.darkMode) {
document.documentElement.setAttribute("data-theme", "light"); document.documentElement.setAttribute("data-theme", "light");
} }

View File

@@ -50,7 +50,7 @@ async function init() {
await utils.wait(() => Config.config !== null); await utils.wait(() => Config.config !== null);
if (Config.config.lightMode) { if (!Config.config.darkMode) {
document.documentElement.setAttribute("data-theme", "light"); document.documentElement.setAttribute("data-theme", "light");
} }