From 2381a8913b0bc2c6fce4af19eab3465cb51acbaa Mon Sep 17 00:00:00 2001 From: db-2001 Date: Fri, 27 Oct 2023 11:18:37 -0400 Subject: [PATCH] Changed the style sheet selection logic so the default is actually the default. If the styleSheet property doesn't exist or isn't equal to a valid string, it used to default to the mangahover.css from the else statement. Logically, that means that mangahover was the default instead of the actual default. This has been rectified. --- Website/interaction.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Website/interaction.js b/Website/interaction.js index 673c7be..fea905b 100644 --- a/Website/interaction.js +++ b/Website/interaction.js @@ -83,12 +83,12 @@ function Setup(){ 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 { + if (json.styleSheet == 'hover') { settingMangaHoverCheckbox.checked = true; document.getElementById('pagestyle').setAttribute('href', 'styles/style_mangahover.css'); + } else { + settingMangaHoverCheckbox.checked = false; + document.getElementById('pagestyle').setAttribute('href', 'styles/style_default.css'); } }); setInterval(() => { @@ -292,12 +292,12 @@ function OpenSettings(){ 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 { + if (json.styleSheet == 'hover') { settingMangaHoverCheckbox.checked = true; document.getElementById('pagestyle').setAttribute('href', 'styles/style_mangahover.css'); + } else { + settingMangaHoverCheckbox.checked = false; + document.getElementById('pagestyle').setAttribute('href', 'styles/style_default.css'); } }); GetLibraryConnectors().then((json) => {