From 03b7f0bc25d623c4ecb52502896254eb395afbde Mon Sep 17 00:00:00 2001 From: Mister Rajoy Date: Thu, 13 May 2021 15:50:21 +0200 Subject: [PATCH] Set imports at the start of the string --- .../Configuration/configurationpage.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html b/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html index 0bbd7cf..607c08b 100644 --- a/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html +++ b/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html @@ -415,10 +415,14 @@ var selectors = document.getElementsByClassName("selector"); for (var i = 0; i < selectors.length; i++) { var element = selectors[i] - css += - element.selectedOptions[0].value + - "\n"; - savedHtml += element.outerHTML; + if(checkForImport(element.selectedOptions[0].value)){ + css = element.selectedOptions[0].value + "\n" + css + }else{ + css += + element.selectedOptions[0].value + + "\n"; + savedHtml += element.outerHTML; + } } //process colorPicker @@ -478,6 +482,10 @@ } + function checkForImport(css){ + return css.includes("@import") + } + function generatePlugins() {