User:Pcj/GlobalSearchForExtension.js

a = new mw.Api; var sites; var curWiki; var s1 = []; function gNW(w){ curWiki = w;	wiki = sites.data.wikis[w]; if (wiki == undefined) { console.log("Done"); return; }	fa = new mw.ForeignApi("//"+wiki.wiki_domain+"/api.php"); fa.get({action:"query",meta:"siteinfo",siprop:"extensions"}).done(function(data) {		if (data.query != undefined) {			if (data.query.extensions != undefined) {				extensions = data.query.extensions;				smwFound = false;				cargoFound = false;				fvFound = false;				for (e in extensions) {					if (extensions[e].name=="Semantic MediaWiki") smwFound = true;				}				if (smwFound) s1.push({name:sites.data.wikis[curWiki].wiki_display_name,url:"https://"+sites.data.wikis[curWiki].wiki_domain});			}		}		gNW(curWiki+1);	}).fail(function(data){		gNW(curWiki+1);	}); } a.get({action:"allsites","do":"getSiteStats"}).done(function(data){ sites = data; gNW(0);});