fixed load from preset button not working

This commit is contained in:
Jack 2021-04-08 18:45:48 +01:00
parent baba5c656a
commit c7322a6d52
2 changed files with 4 additions and 4 deletions

View file

@ -222,7 +222,7 @@ $(".pageSettings .saveCustomThemeButton").click((e) => {
$(".pageSettings #loadCustomColorsFromPreset").click((e) => {
// previewTheme(Config.theme);
ThemeController.preview(Config.theme);
$("#currentTheme").attr("href", `themes/${Config.theme}.css`);
ThemeController.colorVars.forEach((e) => {
document.documentElement.style.setProperty(e, "");

View file

@ -163,13 +163,13 @@ export function applyCustomBackground() {
}
export function applyCustomBackgroundSize() {
if (Config.customBackgroundSize == "max"){
if (Config.customBackgroundSize == "max") {
$(".customBackground").css({
backgroundSize: "100% 100%" ,
backgroundSize: "100% 100%",
});
} else if (Config.customBackgroundSize != "") {
$(".customBackground").css({
backgroundSize: Config.customBackgroundSize,
});
}
}
}