Improve status detection

This commit is contained in:
Kumi 2019-03-08 16:00:39 +00:00
parent 9a5f6d1d27
commit 24cfa48988

View file

@ -11,13 +11,13 @@ function urlStatus(url, cb){
} }
function checkDownload(url){ function checkDownload(url){
document.buildingfw = true;
urlStatus(url, function(status) { urlStatus(url, function(status) {
if (status === 200){ if (status === 200){
document.buildingfw = false; document.buildingfw = false;
document.getElementById("download").src=url; document.getElementById("download").src=url;
} }
else { else {
document.buildingfw = true;
checkDownload(url); checkDownload(url);
} }
}); });