mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
fix body classes changes when changing theme (#2199)
This commit is contained in:
parent
05b5abb856
commit
79f94d5a71
1 changed files with 4 additions and 2 deletions
|
@ -708,12 +708,14 @@ html {{ {font} }}
|
||||||
const body = document.body.classList;
|
const body = document.body.classList;
|
||||||
if ({1 if theme_manager.night_mode else 0}) {{
|
if ({1 if theme_manager.night_mode else 0}) {{
|
||||||
doc.add("night-mode");
|
doc.add("night-mode");
|
||||||
body.add("night-mode");
|
body.add("night_mode");
|
||||||
body.add("nightMode");
|
body.add("nightMode");
|
||||||
|
{"body.add('macos-dark-mode');" if theme_manager.macos_dark_mode() else ""}
|
||||||
}} else {{
|
}} else {{
|
||||||
doc.remove("night-mode");
|
doc.remove("night-mode");
|
||||||
body.remove("night-mode");
|
body.remove("night_mode");
|
||||||
body.remove("nightMode");
|
body.remove("nightMode");
|
||||||
|
body.remove("macos-dark-mode");
|
||||||
}}
|
}}
|
||||||
}})();
|
}})();
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue