From 40598c28af8d20dfb775e4224e24c97505e29f59 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Wed, 29 Mar 2023 00:46:13 +0200 Subject: [PATCH] Don't show lossless WEBP toggle for JPEG on first load https://discord.com/channels/1014774730907209781/1021695193499582494/1090402304173277266 --- ui/index.html | 2 +- ui/media/js/main.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/index.html b/ui/index.html index 0bf90733..f7dcf114 100644 --- a/ui/index.html +++ b/ui/index.html @@ -237,7 +237,7 @@ - + diff --git a/ui/media/js/main.js b/ui/media/js/main.js index e254956b..49707f59 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -1557,19 +1557,19 @@ updateOutputQuality() function updateOutputQualityVisibility() { if (outputFormatField.value === 'webp') { - outputLosslessContainer.style.display = 'unset' + outputLosslessContainer.classList.remove('displayNone') if (outputLosslessField.checked) { - outputQualityRow.style.display='none' + outputQualityRow.classList.add('displayNone') } else { - outputQualityRow.style.display='table-row' + outputQualityRow.classList.remove('displayNone') } } else if (outputFormatField.value === 'png') { - outputQualityRow.style.display='none' - outputLosslessContainer.style.display = 'none' + outputQualityRow.classList.add('displayNone') + outputLosslessContainer.classList.add('displayNone') } else { - outputQualityRow.style.display='table-row' - outputLosslessContainer.style.display = 'none' + outputQualityRow.classList.remove('displayNone') + outputLosslessContainer.classList.add('displayNone') } }