diff --git a/configuration/homeScreen-configuration.js b/configuration/homeScreen-configuration.js index b140bc4..ec43f65 100644 --- a/configuration/homeScreen-configuration.js +++ b/configuration/homeScreen-configuration.js @@ -4021,21 +4021,18 @@ window.KefinTweaksConfig = ${JSON.stringify(configToBackup, null, 2)};`; // Community Collections tab setup setupCommunityCollectionsTab(dialog); - // Export Sections button - const exportSectionsBtn = dialog.querySelector('.export-sections-btn'); - if (exportSectionsBtn) { - exportSectionsBtn.addEventListener('click', () => { + // Import / Export — delegated so buttons survive refreshMainModal content swaps + dialog.addEventListener('click', (e) => { + if (e.target.closest('.export-sections-btn')) { + e.preventDefault(); showExportDialog(); - }); - } - - // Import Sections button - const importSectionsBtn = dialog.querySelector('.import-sections-btn'); - if (importSectionsBtn) { - importSectionsBtn.addEventListener('click', () => { + return; + } + if (e.target.closest('.import-sections-btn')) { + e.preventDefault(); showImportDialog(); - }); - } + } + }); } /** @@ -4618,8 +4615,12 @@ window.KefinTweaksConfig = ${JSON.stringify(configToBackup, null, 2)};`; return; } + const collectionDesc = collection.description + ? `