User:Pcj/GlobalCheckSearch.js

i=0; ws = []; wikis = []; function gNW { if (i == wikis.length) { console.log("done"); return; }	fa = new mw.ForeignApi("//"+wikis[i].wiki_domain+"/api.php"); fa.get({action:"query",list:"search",srsearch:"test"}).done(function(data) {i++; gNW;}).fail(function(code,data) {		if (code == "cirrussearch-backend-error") {			ws.push({wiki:wikis[i].wiki_display_name,url:"https://"+wikis[i].wiki_domain+"/index.php?search=test"});		}		i++;		gNW;	}); } new mw.Api.get({action:"allsites",do:"getSiteStats"}).done(function(data){ wikis= data.data.wikis; gNW; });