1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Apply suggestions from code review

Removed extra line breaks and using `classList.toggle` instead of `add` and `remove` to simplify code.

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
David Schulte 2024-08-14 19:55:46 +02:00
parent 8753f84335
commit da0a255bcc
2 changed files with 1 additions and 7 deletions

View file

@ -117,15 +117,10 @@ function onSubtitleModeChange(e) {
function onSubtitleBurnInChange(e) {
const view = dom.parentWithClass(e.target, 'subtitlesettings');
const fieldRenderPgs = view.querySelector('.fldRenderPgs');
// Pgs option is only available if burn-in mode is set to 'auto' (empty string)
if (this.value) {
fieldRenderPgs.classList.add('hide');
} else {
fieldRenderPgs.classList.remove('hide');
}
fieldRenderPgs.classList.toggle('hide', !!this.value);
}
function onAppearanceFieldChange(e) {

View file

@ -37,7 +37,6 @@
<label>
<input is="emby-checkbox" type="checkbox" id="chkSubtitleRenderPgs" />
<span>${RenderPgsSubtitle}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${RenderPgsSubtitleHelp}</div>
</div>