mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 15:52:47 +01:00
Prevent saving stale configurations by closing the config window on installation
This commit is contained in:
@@ -546,7 +546,17 @@ window.KefinTweaksConfig = ${JSON.stringify(config, null, 2)};`;
|
||||
|
||||
footer.appendChild(okBtn);
|
||||
|
||||
// Close original KefinTweaksConfiguration Modal if it is open
|
||||
const kefinTweaksConfigurationModals = document.querySelectorAll('[data-modal-id="kefinTweaksConfigModal"]');
|
||||
if (kefinTweaksConfigurationModals.length > 0) {
|
||||
kefinTweaksConfigurationModals.forEach(modal => {
|
||||
modal.remove();
|
||||
});
|
||||
}
|
||||
|
||||
createSimpleModal(SUCCESS_MODAL_ID, `${isInitialInstall ? 'Plugin Installed' : 'Plugin Updated'}`, content, footer);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Open source configuration modal
|
||||
|
||||
Reference in New Issue
Block a user