|
|
@ -224,11 +224,12 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
|
|
|
|
CheckProgress();
|
|
|
|
CheckProgress();
|
|
|
|
}, 1000);
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
|
|
|
|
// Définissez ce qui se passe si la soumission s'est opérée avec succès
|
|
|
|
|
|
|
|
xhttp.addEventListener("load", function(event) {
|
|
|
|
xhttp.addEventListener("load", function(event) {
|
|
|
|
const json = JSON.parse(event.target.responseText);
|
|
|
|
const json = JSON.parse(event.target.responseText);
|
|
|
|
console.log(json);
|
|
|
|
console.log(json);
|
|
|
|
if (json.error) {
|
|
|
|
if (json.error) {
|
|
|
|
|
|
|
|
clearInterval(progress);
|
|
|
|
|
|
|
|
document.getElementById('progress').innerHTML = '';
|
|
|
|
alert(json.error);
|
|
|
|
alert(json.error);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
const url = json.url;
|
|
|
|
const url = json.url;
|
|
|
@ -250,7 +251,6 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
|
|
|
|
}, 500)
|
|
|
|
}, 500)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Definissez ce qui se passe en cas d'erreur
|
|
|
|
|
|
|
|
xhttp.addEventListener("error", function(event) {
|
|
|
|
xhttp.addEventListener("error", function(event) {
|
|
|
|
clearInterval(progress);
|
|
|
|
clearInterval(progress);
|
|
|
|
document.getElementById('progress').innerHTML = '';
|
|
|
|
document.getElementById('progress').innerHTML = '';
|
|
|
@ -272,6 +272,9 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
xhttp.addEventListener("error", function(event) {
|
|
|
|
xhttp.addEventListener("error", function(event) {
|
|
|
|
|
|
|
|
clearInterval(progress);
|
|
|
|
|
|
|
|
document.getElementById('progress').innerHTML = '';
|
|
|
|
|
|
|
|
alert('whoops, something gone wrong');
|
|
|
|
console.error(event.target.responseText);
|
|
|
|
console.error(event.target.responseText);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|