Merge pull request #1079 from JeLuF/toggle

Don't show lossless WEBP toggle for JPEG on first load
This commit is contained in:
cmdr2 2023-03-30 18:11:09 +05:30 committed by GitHub
commit dc4344043e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -237,7 +237,7 @@
<option value="png">png</option>
<option value="webp">webp</option>
</select>
<span id="output_lossless_container">
<span id="output_lossless_container" class="displayNone">
<input id="output_lossless" name="output_lossless" type="checkbox"><label for="output_lossless">Lossless</label></td></tr>
</span>
</td></tr>

View File

@ -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')
}
}