mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
fix dark mode secondary color
This commit is contained in:
+13
-8
@@ -681,12 +681,14 @@ function ColorLuminance(hex, lum) {
|
||||
chrome.storage.onChanged.addListener(function (changes) {
|
||||
if (changes.selectedColor) {
|
||||
try {
|
||||
if (DarkMode) {
|
||||
document.documentElement.style.setProperty(
|
||||
"--better-pale",
|
||||
lightenAndPaleColor(changes.selectedColor.newValue),
|
||||
);
|
||||
}
|
||||
chrome.storage.local.get(["DarkMode"], function (result) {
|
||||
if (!result.DarkMode) {
|
||||
document.documentElement.style.setProperty(
|
||||
"--better-pale",
|
||||
lightenAndPaleColor(changes.selectedColor.newValue),
|
||||
);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
@@ -1848,6 +1850,11 @@ function AddBetterSEQTAElements(toggle) {
|
||||
}
|
||||
});
|
||||
|
||||
// Load darkmode state
|
||||
chrome.storage.local.get(["DarkMode"], function (result) {
|
||||
DarkMode = result.DarkMode;
|
||||
});
|
||||
|
||||
var titlebar = document.createElement("div");
|
||||
titlebar.classList.add("titlebar");
|
||||
let container = document.getElementById("content");
|
||||
@@ -2008,7 +2015,6 @@ function AddBetterSEQTAElements(toggle) {
|
||||
document.documentElement.style.removeProperty("--better-pale");
|
||||
} else {
|
||||
LightDarkModeElement.firstChild.innerHTML = "<defs><clipPath id=\"__lottie_element_263\"><rect width=\"24\" height=\"24\" x=\"0\" y=\"0\"></rect></clipPath></defs><g clip-path=\"url(#__lottie_element_263)\"><g style=\"display: block;\" transform=\"matrix(1.5,0,0,1.5,7,12)\" opacity=\"1\"><g opacity=\"1\" transform=\"matrix(1,0,0,1,0,0)\"><path fill-opacity=\"1\" d=\" M0,-4 C-2.2100000381469727,-4 -1.2920000553131104,-2.2100000381469727 -1.2920000553131104,0 C-1.2920000553131104,2.2100000381469727 -2.2100000381469727,4 0,4 C2.2100000381469727,4 4,2.2100000381469727 4,0 C4,-2.2100000381469727 2.2100000381469727,-4 0,-4z\"></path></g></g><g style=\"display: block;\" transform=\"matrix(-1,0,0,-1,12,12)\" opacity=\"1\"><g opacity=\"1\" transform=\"matrix(1,0,0,1,0,0)\"><path fill-opacity=\"1\" d=\" M0,6 C-3.309999942779541,6 -6,3.309999942779541 -6,0 C-6,-3.309999942779541 -3.309999942779541,-6 0,-6 C3.309999942779541,-6 6,-3.309999942779541 6,0 C6,3.309999942779541 3.309999942779541,6 0,6z M8,-3.309999942779541 C8,-3.309999942779541 8,-8 8,-8 C8,-8 3.309999942779541,-8 3.309999942779541,-8 C3.309999942779541,-8 0,-11.3100004196167 0,-11.3100004196167 C0,-11.3100004196167 -3.309999942779541,-8 -3.309999942779541,-8 C-3.309999942779541,-8 -8,-8 -8,-8 C-8,-8 -8,-3.309999942779541 -8,-3.309999942779541 C-8,-3.309999942779541 -11.3100004196167,0 -11.3100004196167,0 C-11.3100004196167,0 -8,3.309999942779541 -8,3.309999942779541 C-8,3.309999942779541 -8,8 -8,8 C-8,8 -3.309999942779541,8 -3.309999942779541,8 C-3.309999942779541,8 0,11.3100004196167 0,11.3100004196167 C0,11.3100004196167 3.309999942779541,8 3.309999942779541,8 C3.309999942779541,8 8,8 8,8 C8,8 8,3.309999942779541 8,3.309999942779541 C8,3.309999942779541 11.3100004196167,0 11.3100004196167,0 C11.3100004196167,0 8,-3.309999942779541 8,-3.309999942779541z\"></path></g></g></g>";
|
||||
console.log("Switching to the Light Side");
|
||||
try {
|
||||
chrome.storage.local.get(null, function (result) {
|
||||
document.documentElement.style.setProperty(
|
||||
@@ -2064,7 +2070,6 @@ function AddBetterSEQTAElements(toggle) {
|
||||
"--text-primary",
|
||||
"black",
|
||||
);
|
||||
console.log("Adding light mode!");
|
||||
try {
|
||||
chrome.storage.local.get(null, function (result) {
|
||||
document.documentElement.style.setProperty(
|
||||
|
||||
@@ -1277,11 +1277,11 @@ blurred {
|
||||
}
|
||||
|
||||
.uiSlidePane > .pane > .header button {
|
||||
color: var(--text-primary) !important;
|
||||
color: var(--text-color) !important;
|
||||
}
|
||||
|
||||
.uiSlidePane > .pane > .header > h1 {
|
||||
color: var(--text-primary) !important;
|
||||
color: var(--text-color) !important;
|
||||
}
|
||||
|
||||
.uiSlidePane > .pane > .header {
|
||||
|
||||
Reference in New Issue
Block a user