mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Add live update for dark mode
This commit is contained in:
@@ -126,6 +126,13 @@ async function init() {
|
|||||||
else
|
else
|
||||||
document.getElementById("sbDonate").classList.remove("hidden");
|
document.getElementById("sbDonate").classList.remove("hidden");
|
||||||
break;
|
break;
|
||||||
|
case "darkMode":
|
||||||
|
if (checkbox.checked) {
|
||||||
|
document.documentElement.setAttribute("data-theme", "dark");
|
||||||
|
} else {
|
||||||
|
document.documentElement.setAttribute("data-theme", "light");
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If other options depend on this, hide/show them
|
// If other options depend on this, hide/show them
|
||||||
|
|||||||
Reference in New Issue
Block a user