mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Feat: Implement download cancellation feature with stop button and progress handling
This commit is contained in:
@@ -13,6 +13,10 @@ function startProgress() {
|
||||
|
||||
speedElement.style.display = "block";
|
||||
speedElement.innerHTML = "0 Mib/s";
|
||||
|
||||
// Show stop button
|
||||
const stopBtn = document.getElementById("stopBtn");
|
||||
if (stopBtn) stopBtn.style.display = "inline-block";
|
||||
}
|
||||
|
||||
function updateProgress(percent) {
|
||||
@@ -28,6 +32,10 @@ function resetProgress() {
|
||||
|
||||
speedElement.textContent = "0 Mib/s";
|
||||
speedElement.style.display = "none";
|
||||
|
||||
// Hide stop button
|
||||
const stopBtn = document.getElementById("stopBtn");
|
||||
if (stopBtn) stopBtn.style.display = "none";
|
||||
}
|
||||
|
||||
// SSE Connexion
|
||||
|
||||
Reference in New Issue
Block a user