mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-11-25 17:43:24 +01:00
[refactor] improve initial page colour when switching to automatic theme style
This commit is contained in:
parent
de7f90bd35
commit
8e952fbd5a
@ -78,6 +78,14 @@ var theme = (function() {
|
||||
}
|
||||
};
|
||||
|
||||
bind.style = {
|
||||
initial: function() {
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", function(event) {
|
||||
mod.style.initial();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var mod = {};
|
||||
|
||||
mod.apply = function(data) {
|
||||
@ -3088,6 +3096,7 @@ var theme = (function() {
|
||||
mod.accent.random();
|
||||
mod.custom.close();
|
||||
bind.accent.cycle.toggle();
|
||||
bind.style.initial();
|
||||
render.font.load.display();
|
||||
render.font.load.ui();
|
||||
render.font.display.name();
|
||||
|
Loading…
Reference in New Issue
Block a user