From 15d20a236b29daa55f574519cb1055e619f9de98 Mon Sep 17 00:00:00 2001 From: db-2001 Date: Fri, 27 Oct 2023 10:48:08 -0400 Subject: [PATCH] Added empty
and set stylesheet on Setup(), Added an empty
to mitigate merge conflicts. Running GetSettings in Setup so that the webpage CSS is set up whenever the website runs for the first time and not just when the settings get opened. This shouldn't cause any issues even though setup is called a few times throughout the code. --- Website/index.html | 3 +++ Website/interaction.js | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/Website/index.html b/Website/index.html index ef7a60a..9dc5459 100644 --- a/Website/index.html +++ b/Website/index.html @@ -90,6 +90,9 @@ LunaSea
Configured: ✅❌
+
+
+
diff --git a/Website/interaction.js b/Website/interaction.js index 9d81bc4..673c7be 100644 --- a/Website/interaction.js +++ b/Website/interaction.js @@ -78,6 +78,19 @@ function Setup(){ ResetContent(); UpdateJobs(); + GetSettings().then((json) => { + console.log(json); + settingDownloadLocation.innerText = json.downloadLocation; + settingApiUri.placeholder = apiUri; + console.log(json.styleSheet); + if (json.styleSheet == 'default') { + settingMangaHoverCheckbox.checked = false; + document.getElementById('pagestyle').setAttribute('href', 'styles/style_default.css'); + } else { + settingMangaHoverCheckbox.checked = true; + document.getElementById('pagestyle').setAttribute('href', 'styles/style_mangahover.css'); + } + }); setInterval(() => { UpdateJobs(); }, 1000); @@ -278,6 +291,7 @@ function OpenSettings(){ //console.log(json); settingDownloadLocation.innerText = json.downloadLocation; settingApiUri.placeholder = apiUri; + console.log(json.styleSheet); if (json.styleSheet == 'default') { settingMangaHoverCheckbox.checked = false; document.getElementById('pagestyle').setAttribute('href', 'styles/style_default.css');