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:
parent
8753f84335
commit
da0a255bcc
2 changed files with 1 additions and 7 deletions
|
@ -117,15 +117,10 @@ function onSubtitleModeChange(e) {
|
||||||
|
|
||||||
function onSubtitleBurnInChange(e) {
|
function onSubtitleBurnInChange(e) {
|
||||||
const view = dom.parentWithClass(e.target, 'subtitlesettings');
|
const view = dom.parentWithClass(e.target, 'subtitlesettings');
|
||||||
|
|
||||||
const fieldRenderPgs = view.querySelector('.fldRenderPgs');
|
const fieldRenderPgs = view.querySelector('.fldRenderPgs');
|
||||||
|
|
||||||
// Pgs option is only available if burn-in mode is set to 'auto' (empty string)
|
// Pgs option is only available if burn-in mode is set to 'auto' (empty string)
|
||||||
if (this.value) {
|
fieldRenderPgs.classList.toggle('hide', !!this.value);
|
||||||
fieldRenderPgs.classList.add('hide');
|
|
||||||
} else {
|
|
||||||
fieldRenderPgs.classList.remove('hide');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAppearanceFieldChange(e) {
|
function onAppearanceFieldChange(e) {
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
<label>
|
<label>
|
||||||
<input is="emby-checkbox" type="checkbox" id="chkSubtitleRenderPgs" />
|
<input is="emby-checkbox" type="checkbox" id="chkSubtitleRenderPgs" />
|
||||||
<span>${RenderPgsSubtitle}</span>
|
<span>${RenderPgsSubtitle}</span>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="fieldDescription checkboxFieldDescription">${RenderPgsSubtitleHelp}</div>
|
<div class="fieldDescription checkboxFieldDescription">${RenderPgsSubtitleHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue