mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Add live update for dark mode
This commit is contained in:
@@ -126,6 +126,13 @@ async function init() {
|
||||
else
|
||||
document.getElementById("sbDonate").classList.remove("hidden");
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user