diff --git a/kefinTweaks-plugin.js b/kefinTweaks-plugin.js index 725c9db..d4319d1 100644 --- a/kefinTweaks-plugin.js +++ b/kefinTweaks-plugin.js @@ -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