Hide skip button settings when disabled (#321)
* Hide skip button settings when disabled * let's include everyone
This commit is contained in:
parent
af2f61b06c
commit
e732a71de3
@ -435,6 +435,8 @@
|
|||||||
<input id="ClientList" type="hidden" is="emby-input" />
|
<input id="ClientList" type="hidden" is="emby-input" />
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<div id="SkipButtonSettings">
|
||||||
|
|
||||||
<div id="PersistContainer" class="checkboxContainer checkboxContainer-withDescription">
|
<div id="PersistContainer" class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label class="emby-checkbox-label">
|
<label class="emby-checkbox-label">
|
||||||
<input id="PersistSkipButton" type="checkbox" is="emby-checkbox" />
|
<input id="PersistSkipButton" type="checkbox" is="emby-checkbox" />
|
||||||
@ -470,6 +472,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<label class="inputLabel inputLabelUnfocused" for="RemainingSecondsOfIntro">
|
<label class="inputLabel inputLabelUnfocused" for="RemainingSecondsOfIntro">
|
||||||
Intro playback duration (in seconds)
|
Intro playback duration (in seconds)
|
||||||
@ -818,7 +822,9 @@
|
|||||||
var windowHashInterval = 0;
|
var windowHashInterval = 0;
|
||||||
|
|
||||||
var autoSkip = document.querySelector("input#AutoSkip");
|
var autoSkip = document.querySelector("input#AutoSkip");
|
||||||
|
var skipButtonVisible = document.getElementById("SkipButtonVisible");
|
||||||
var skipButtonVisibleLabel = document.getElementById("SkipButtonVisibleLabel");
|
var skipButtonVisibleLabel = document.getElementById("SkipButtonVisibleLabel");
|
||||||
|
var skipButtonSettings = document.getElementById("SkipButtonSettings");
|
||||||
var selectAllLibraries = document.querySelector("input#SelectAllLibraries");
|
var selectAllLibraries = document.querySelector("input#SelectAllLibraries");
|
||||||
var librariesContainer = document.querySelector("div.folderAccessListContainer");
|
var librariesContainer = document.querySelector("div.folderAccessListContainer");
|
||||||
var skipFirstEpisode = document.querySelector("div#divSkipFirstEpisode");
|
var skipFirstEpisode = document.querySelector("div#divSkipFirstEpisode");
|
||||||
@ -829,6 +835,18 @@
|
|||||||
var autoSkipCredits = document.querySelector("input#AutoSkipCredits");
|
var autoSkipCredits = document.querySelector("input#AutoSkipCredits");
|
||||||
var autoSkipCreditsNotificationText = document.querySelector("div#divAutoSkipCreditsNotificationText");
|
var autoSkipCreditsNotificationText = document.querySelector("div#divAutoSkipCreditsNotificationText");
|
||||||
|
|
||||||
|
function skipButtonVisibleChanged() {
|
||||||
|
if (autoSkip.checked && autoSkipCredits.checked) {
|
||||||
|
skipButtonSettings.style.display = 'none';
|
||||||
|
} else if (skipButtonVisible.checked) {
|
||||||
|
skipButtonSettings.style.display = 'unset';
|
||||||
|
} else {
|
||||||
|
skipButtonSettings.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
skipButtonVisible.addEventListener("change", skipButtonVisibleChanged);
|
||||||
|
|
||||||
function skipButtonVisibleText() {
|
function skipButtonVisibleText() {
|
||||||
if (autoSkip.checked && autoSkipCredits.checked) {
|
if (autoSkip.checked && autoSkipCredits.checked) {
|
||||||
autoSkipClientList.style.display = 'none';
|
autoSkipClientList.style.display = 'none';
|
||||||
@ -846,6 +864,7 @@
|
|||||||
autoSkipClientList.style.width = '100%';
|
autoSkipClientList.style.width = '100%';
|
||||||
skipButtonVisibleLabel.textContent = "Show skip intro / credit button";
|
skipButtonVisibleLabel.textContent = "Show skip intro / credit button";
|
||||||
}
|
}
|
||||||
|
skipButtonVisibleChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoSkipChanged() {
|
function autoSkipChanged() {
|
||||||
@ -876,6 +895,8 @@
|
|||||||
|
|
||||||
autoSkipCredits.addEventListener("change", autoSkipCreditsChanged);
|
autoSkipCredits.addEventListener("change", autoSkipCreditsChanged);
|
||||||
|
|
||||||
|
skipButtonVisibleText(); // run once on launch for legacy installs
|
||||||
|
|
||||||
function selectAllLibrariesChanged() {
|
function selectAllLibrariesChanged() {
|
||||||
if (selectAllLibraries.checked) {
|
if (selectAllLibraries.checked) {
|
||||||
librariesContainer.style.display = 'none';
|
librariesContainer.style.display = 'none';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user