nessun oggetto della modifica
mNessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 201:
}
if (!thumbs.length) return;
var httpRequest = createRequest();
var id = setTimeout(function() { httpRequest.abort();}, 30000);
var param = "format=xml&action=query&prop=imageinfo&iiprop=url&titles=" + names.join('|');
httpRequest.onreadystatechange = function () { Receive(httpRequest, id
httpRequest.open('POST', wgServer + wgScriptPath + "/api.php", true);
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
httpRequest.setRequestHeader('Content-Length', param.length);
httpRequest.send(param);
return;
function Receive(o, id
if (o.readyState != 4) return;
clearTimeout(id);
Line 221 ⟶ 219:
if (xml.normalize) xml.normalize();
var ii = xml.getElementsByTagName('ii');
for (var I = 0; I < ii.length; I++) {
for (i in thumbs) {
if (ii[I].getAttribute('url').indexOf(names[i]) != -1) thumbs[i] = ii[I].getAttribute('url');
}
}
return;
}
|