Skip to content

Commit

Permalink
setCheckboxesOfService("Disney");
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Oct 30, 2023
1 parent ac6f645 commit 53a2647
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
8 changes: 4 additions & 4 deletions chrome/popup/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h2 i18n>SharedPageTitle</h2>
</td>
<td>
<label class="switch">
<input type="checkbox" id="DisneyIntro" />
<input type="checkbox" id="DisneySkipIntro" />
<span class="slider round"></span>
</label>
</td>
Expand Down Expand Up @@ -225,7 +225,7 @@ <h2 i18n>SharedPageTitle</h2>
</td>
<td>
<label class="switch">
<input type="checkbox" id="DisneyCredits" />
<input type="checkbox" id="DisneySkipCredits" />
<span class="slider round"></span>
</label>
</td>
Expand Down Expand Up @@ -578,14 +578,14 @@ <h2 i18n>PageSpecificTitle;Disney+</h2>
<div class="line flex">
<p i18n>IntroSwitch</p>
<label class="switch">
<input type="checkbox" id="DisneyIntro" />
<input type="checkbox" id="DisneySkipIntro" />
<span class="slider round"></span>
</label>
</div>
<div class="line flex">
<p i18n>CreditsSwitch</p>
<label class="switch">
<input type="checkbox" id="DisneyCredits" />
<input type="checkbox" id="DisneySkipCredits" />
<span class="slider round"></span>
</label>
</div>
Expand Down
10 changes: 5 additions & 5 deletions chrome/popup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ function setCheckboxesToSettings() {
button.style.display = "block";
}
// ------------- Disney ---------------------------------------
button = document.querySelector("#DisneyIntro");
button = document.querySelector("#DisneySkipIntro");
if (button) button.checked = settings?.Disney.skipIntro;
button = document.querySelector("#DisneyCredits");
button = document.querySelector("#DisneySkipCredits");
if (button) button.checked = settings?.Disney.skipCredits;
button = document.querySelector("#DisneyWatchCredits");
if (button) button.checked = settings?.Disney.watchCredits;
Expand Down Expand Up @@ -392,10 +392,10 @@ function listenForClicks() {
else if (e.target.id === "DisneySkips") {
// const DisneySkips = !settings?.Disney.skipIntro;
// settings.Disney.skipIntro = DisneySkips;
// } else if (e.target.id === "DisneyIntro") {
// } else if (e.target.id === "DisneySkipIntro") {
// settings.Disney.skipIntro = !settings.Disney.skipIntro;
} else if (e.target.id === "DisneyIntro") settings.Disney.skipIntro = !settings.Disney.skipIntro;
else if (e.target.id === "DisneyCredits") {
} else if (e.target.id === "DisneySkipIntro") settings.Disney.skipIntro = !settings.Disney.skipIntro;
else if (e.target.id === "DisneySkipCredits") {
settings.Disney.skipCredits = !settings.Disney.skipCredits;
if (settings.Disney.skipCredits) settings.Disney.watchCredits = false;
} else if (e.target.id === "DisneyWatchCredits") {
Expand Down
8 changes: 4 additions & 4 deletions firefox/popup/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ <h2 i18n>SharedPageTitle</h2>
</td>
<td>
<label class="switch">
<input type="checkbox" id="DisneyIntro" />
<input type="checkbox" id="DisneySkipIntro" />
<span class="slider round"></span>
</label>
</td>
Expand Down Expand Up @@ -220,7 +220,7 @@ <h2 i18n>SharedPageTitle</h2>
</td>
<td>
<label class="switch">
<input type="checkbox" id="DisneyCredits" />
<input type="checkbox" id="DisneySkipCredits" />
<span class="slider round"></span>
</label>
</td>
Expand Down Expand Up @@ -573,14 +573,14 @@ <h2 i18n>PageSpecificTitle;Disney+</h2>
<div class="line flex">
<p i18n>IntroSwitch</p>
<label class="switch">
<input type="checkbox" id="DisneyIntro" />
<input type="checkbox" id="DisneySkipIntro" />
<span class="slider round"></span>
</label>
</div>
<div class="line flex">
<p i18n>CreditsSwitch</p>
<label class="switch">
<input type="checkbox" id="DisneyCredits" />
<input type="checkbox" id="DisneySkipCredits" />
<span class="slider round"></span>
</label>
</div>
Expand Down
18 changes: 5 additions & 13 deletions firefox/popup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,9 @@ function setCheckboxesToSettings() {
button.style.display = "block";
}
// ------------- Disney ---------------------------------------
button = document.querySelector("#DisneyIntro");
setCheckboxesOfService("Disney");
button = document.querySelector("#DisneySkipIntro");
if (button) button.checked = settings?.Disney.skipIntro;
button = document.querySelector("#DisneyCredits");
if (button) button.checked = settings?.Disney.skipCredits;
button = document.querySelector("#DisneyWatchCredits");
if (button) button.checked = settings?.Disney.watchCredits;
button = document.querySelector("#DisneySpeedSlider");
if (button) button.checked = settings?.Disney.speedSlider;
button = document.querySelector("#DisneyShowRating");
if (button) button.checked = settings?.Disney.showRating;

// ------------- Slider Options ---------------------------------------
button = document.querySelector("#SliderSteps");
if (button) button.value = settings?.General.sliderSteps;
Expand Down Expand Up @@ -390,10 +382,10 @@ function listenForClicks() {
else if (e.target.id === "DisneySkips") {
// const DisneySkips = !settings?.Disney.skipIntro;
// settings.Disney.skipIntro = DisneySkips;
// } else if (e.target.id === "DisneyIntro") {
// } else if (e.target.id === "DisneySkipIntro") {
// settings.Disney.skipIntro = !settings.Disney.skipIntro;
} else if (e.target.id === "DisneyIntro") settings.Disney.skipIntro = !settings.Disney.skipIntro;
else if (e.target.id === "DisneyCredits") {
} else if (e.target.id === "DisneySkipIntro") settings.Disney.skipIntro = !settings.Disney.skipIntro;
else if (e.target.id === "DisneySkipCredits") {
settings.Disney.skipCredits = !settings.Disney.skipCredits;
if (settings.Disney.skipCredits) settings.Disney.watchCredits = false;
} else if (e.target.id === "DisneyWatchCredits") {
Expand Down

0 comments on commit 53a2647

Please sign in to comment.