Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Forgot parameters to Get()

Cette révision appartient à :
akuma06 2017-05-31 12:39:38 +02:00
Parent 133947df0a
révision b546e6b1d3

Voir le fichier

@ -3,7 +3,6 @@ var Query = {
MaxConsecutingFailing:-1,
Get: function(url, renderer, callback) {
var xhr = new XMLHttpRequest();
console.log(url)
xhr.open('GET', url, true);
xhr.responseType = 'json';
xhr.onload = function(e) {
@ -15,7 +14,7 @@ var Query = {
console.log("Error when refresh")
Query.Failed++;
console.log("Attempt to refresh "+Query.Failed+"...");
if ((Query.MaxConsecutingFailing == -1) || (Query.Failed < Query.MaxConsecutingFailing)) Query.Get();
if ((Query.MaxConsecutingFailing == -1) || (Query.Failed < Query.MaxConsecutingFailing)) Query.Get(url, renderer, callback);
else console.error("Too many attempts, stopping...")
}
};