From c7322a6d524eb02dd61b5fb3115aaf624d4f4303 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 8 Apr 2021 18:45:48 +0100 Subject: [PATCH] fixed load from preset button not working --- src/js/settings/theme-picker.js | 2 +- src/js/theme-controller.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/settings/theme-picker.js b/src/js/settings/theme-picker.js index cce6d8806..ce442ce17 100644 --- a/src/js/settings/theme-picker.js +++ b/src/js/settings/theme-picker.js @@ -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, ""); diff --git a/src/js/theme-controller.js b/src/js/theme-controller.js index 3600323cf..a5ccb6dc7 100644 --- a/src/js/theme-controller.js +++ b/src/js/theme-controller.js @@ -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, }); } -} \ No newline at end of file +}