diff --git a/webui.py b/webui.py index b1fe2b4..e542eac 100644 --- a/webui.py +++ b/webui.py @@ -385,7 +385,9 @@ async function refreshStats() { } catch(e) {} } +let _activeSrc = null; async function doSync(endpoint, label) { + if (_activeSrc) { _activeSrc.close(); _activeSrc = null; } const btn = event.currentTarget; btn.disabled = true; const r = await fetch(endpoint, {method:'POST'}); @@ -400,6 +402,7 @@ async function doSync(endpoint, label) { panel.style.display = 'block'; panel.innerHTML = '