From 53a26471bf32a948f16a3431684f0cc0ecf08932 Mon Sep 17 00:00:00 2001 From: Marvin Alexander Krebber Date: Mon, 30 Oct 2023 14:53:41 +0100 Subject: [PATCH] setCheckboxesOfService("Disney"); --- chrome/popup/settings.html | 8 ++++---- chrome/popup/settings.js | 10 +++++----- firefox/popup/settings.html | 8 ++++---- firefox/popup/settings.js | 18 +++++------------- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/chrome/popup/settings.html b/chrome/popup/settings.html index e00bc26b..a472a6f8 100644 --- a/chrome/popup/settings.html +++ b/chrome/popup/settings.html @@ -189,7 +189,7 @@

SharedPageTitle

@@ -225,7 +225,7 @@

SharedPageTitle

@@ -578,14 +578,14 @@

PageSpecificTitle;Disney+

IntroSwitch

CreditsSwitch

diff --git a/chrome/popup/settings.js b/chrome/popup/settings.js index d3efc827..f779fa2b 100644 --- a/chrome/popup/settings.js +++ b/chrome/popup/settings.js @@ -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; @@ -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") { diff --git a/firefox/popup/settings.html b/firefox/popup/settings.html index 3b3ec90e..529aaa16 100644 --- a/firefox/popup/settings.html +++ b/firefox/popup/settings.html @@ -184,7 +184,7 @@

SharedPageTitle

@@ -220,7 +220,7 @@

SharedPageTitle

@@ -573,14 +573,14 @@

PageSpecificTitle;Disney+

IntroSwitch

CreditsSwitch

diff --git a/firefox/popup/settings.js b/firefox/popup/settings.js index a7cac486..2662e381 100644 --- a/firefox/popup/settings.js +++ b/firefox/popup/settings.js @@ -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; @@ -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") {