@@ -2167,6 +2167,16 @@
// No validation needed for default skin dropdown - it only allows valid options
+ // Helper function to prevent click propagation on checkboxes (so they don't toggle details)
+ function setupCheckboxPropagation(checkboxId) {
+ const checkbox = modalInstance.dialogContent.querySelector(checkboxId);
+ if (checkbox) {
+ checkbox.addEventListener('click', (e) => {
+ e.stopPropagation();
+ });
+ }
+ }
+
// Helper function to toggle container visibility
function setupToggleVisibility(checkboxId, containerId) {
const checkbox = modalInstance.dialogContent.querySelector(checkboxId);
@@ -2184,16 +2194,16 @@
}
}
- // Home Screen: Setup all visibility toggles
- setupToggleVisibility('#homeScreen_recentlyReleased_enabled', '#homeScreen_recentlyReleased_container');
- setupToggleVisibility('#homeScreen_trending_enabled', '#homeScreen_trending_container');
- setupToggleVisibility('#homeScreen_popularTVNetworks_enabled', '#homeScreen_popularTVNetworks_container');
- setupToggleVisibility('#homeScreen_watchlist_enabled', '#homeScreen_watchlist_container');
- setupToggleVisibility('#homeScreen_upcoming_enabled', '#homeScreen_upcoming_container');
- setupToggleVisibility('#homeScreen_imdbTop250_enabled', '#homeScreen_imdbTop250_container');
- setupToggleVisibility('#homeScreen_seasonal_enabled', '#homeScreen_seasonal_container');
- setupToggleVisibility('#homeScreen_watchAgain_enabled', '#homeScreen_watchAgain_container');
- setupToggleVisibility('#homeScreen_discovery_enabled', '#homeScreen_discovery_container');
+ // Home Screen: Setup propagation prevention only (don't hide content when disabled)
+ setupCheckboxPropagation('#homeScreen_recentlyReleased_enabled');
+ setupCheckboxPropagation('#homeScreen_trending_enabled');
+ setupCheckboxPropagation('#homeScreen_popularTVNetworks_enabled');
+ setupCheckboxPropagation('#homeScreen_watchlist_enabled');
+ setupCheckboxPropagation('#homeScreen_upcoming_enabled');
+ setupCheckboxPropagation('#homeScreen_imdbTop250_enabled');
+ setupCheckboxPropagation('#homeScreen_seasonal_enabled');
+ setupCheckboxPropagation('#homeScreen_watchAgain_enabled');
+ setupCheckboxPropagation('#homeScreen_discovery_enabled');
// Discovery Sections IsPlayed Toggles
['recentlyReleased_movies', 'recentlyReleased_episodes', 'trending', 'popularTVNetworks', 'upcoming', 'imdbTop250'].forEach(key => {
@@ -2230,10 +2240,15 @@
if (deleteBtn) {
e.preventDefault();
e.stopPropagation();
+ console.log('[KefinTweaks Configuration] Checking for section to delete...');
const prefix = deleteBtn.getAttribute('data-prefix');
const sectionIndexRaw = deleteBtn.getAttribute('data-section-index');
const isSeasonal = deleteBtn.getAttribute('data-is-seasonal') === 'true';
+ console.log('[KefinTweaks Configuration] Prefix:', prefix);
+ console.log('[KefinTweaks Configuration] Section Index Raw:', sectionIndexRaw);
+ console.log('[KefinTweaks Configuration] Is Seasonal:', isSeasonal);
if (prefix && sectionIndexRaw !== null) {
+ console.log('[KefinTweaks Configuration] Deleting section...');
// For seasonal sections, sectionIndex is a compound string like "0_1", don't parse it
const sectionIndex = isSeasonal || sectionIndexRaw.includes('_') ? sectionIndexRaw : parseInt(sectionIndexRaw);
deleteSection(prefix, sectionIndex, isSeasonal);
@@ -2670,6 +2685,7 @@
}
function deleteSection(prefix, sectionIndex, isSeasonalNested) {
+ console.log('[KefinTweaks Configuration] Deleting section:', prefix, sectionIndex, isSeasonalNested);
// Try both string and number comparison for data-section-index
const sectionItem = modalInstance.dialogContent.querySelector(
`.${prefix}_section_item[data-section-index="${sectionIndex}"], .${prefix}_section_item[data-section-index='${sectionIndex}']`