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:
@@ -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) {
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
<label>
|
||||
<input is="emby-checkbox" type="checkbox" id="chkSubtitleRenderPgs" />
|
||||
<span>${RenderPgsSubtitle}</span>
|
||||
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${RenderPgsSubtitleHelp}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user