migrated darkMode feature to js bundle

This commit is contained in:
Aaron Qian 2022-11-11 13:19:44 -08:00 committed by Aaron Qian
parent 67c1f520d8
commit 28fbd7d906
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
10 changed files with 92 additions and 5565 deletions

View file

@ -0,0 +1,22 @@
import { enable, disable, auto } from 'darkreader';
import { darkmode } from "@params";
const {
defaultColorScheme,
theme,
fixes,
} = darkmode.darkreader;
export function setSchemeDark() {
enable(theme, fixes);
}
export function setSchemeLight() {
disable();
}
export function setSchemeSystem() {
auto(theme, fixes);
}
export { defaultColorScheme };