more fixes for broken achievements and small bugs

This commit is contained in:
Aaron Qian 2022-11-13 20:51:53 -08:00 committed by Aaron Qian
parent f103dc5c38
commit 9775b97893
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
11 changed files with 39 additions and 26 deletions

View file

@ -1,13 +1,19 @@
import { enable, disable, auto, setFetchMethod } from 'darkreader';
import { darkmode } from "@params";
import * as params from "@params";
const {
defaultColorScheme,
theme,
fixes,
} = darkmode.darkreader;
setFetchMethod(window.fetch)
const darkreader = params?.darkmode?.darkreader || {};
const defaultColorScheme = darkreader.defaultColorScheme || 'system';
const theme = {
brightness: 100,
contrast: 100,
sepia: 0,
...(darkreader.theme || {}),
};
const fixes = {
invert: ['img[src$=".svg"]'],
...(darkreader.fixes || {}),
};
setFetchMethod(window.fetch);
export function setSchemeDark() {
enable(theme, fixes);