diff --git a/src/js/theme-controller.js b/src/js/theme-controller.js index 57cbd6954..cd9ad66cf 100644 --- a/src/js/theme-controller.js +++ b/src/js/theme-controller.js @@ -186,6 +186,20 @@ export function clearRandom() { randomTheme = null; } +export function applyCustomBackgroundSize() { + if (Config.customBackgroundSize == "max") { + $(".customBackground img").css({ + // width: "calc(100%)", + // height: "calc(100%)", + objectFit: "", + }); + } else if (Config.customBackgroundSize != "") { + $(".customBackground img").css({ + objectFit: Config.customBackgroundSize, + }); + } +} + export function applyCustomBackground() { // $(".customBackground").css({ // backgroundImage: `url(${Config.customBackground})`, @@ -204,17 +218,3 @@ export function applyCustomBackground() { applyCustomBackgroundSize(); } } - -export function applyCustomBackgroundSize() { - if (Config.customBackgroundSize == "max") { - $(".customBackground img").css({ - // width: "calc(100%)", - // height: "calc(100%)", - objectFit: "", - }); - } else if (Config.customBackgroundSize != "") { - $(".customBackground img").css({ - objectFit: Config.customBackgroundSize, - }); - } -}