From bb1c2a25f773b8ab10838e326b83fcd828911e1a Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Sat, 14 Feb 2026 22:01:48 -0500 Subject: [PATCH] Prevent saving stale configurations by closing the config window on installation --- kefinTweaks-plugin.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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