User:Pcj/CleanupInterwikis.js

badIW = ["acronym","advogato","annotationwiki","arxiv","c2find","cache","corpknowpedia","dictionary","disinfopedia","docbook","doi","drumcorpswiki","dwjwiki","elibre","emacswiki","foldoc","foxwiki","freebsdman","gej","gentoo-wiki","google","googlegroups","hammondwiki","hewikisource","hrwiki","imdb","jargonfile","jspwiki","keiki","kmwiki","linuxwiki","lojban","lqwiki","lugkr","mathsongswiki","meatball","memoryalpha","metawiki","moinmoin","mozillawiki","oeis","openfacts","openwiki","pmeg","pmid","ppr","pythoninfo","rfc","s23wiki","seattlewiki","seattlewireless","senseislibrary","shoutwiki","sourceforge","squeak","susning","svgwiki","tavi","tejo","theopedia","tmbw","tmnet","tmwiki","twiki","uea","uncyclopedia","unreal","usemod","vinismo","webseitzwiki","why","wiki","wikibooks","wikicities","wikidata","wikif1","wikihow","wikinews","wikinfo","wikiquote","wikisource","wikispecies","wikitravel","wikiversity","wikivoyage","wikt","wiktionary","wlug","zwiki","zzz wiki"]; a = new mw.Api; curIW = 0; function deleteIW { if (curIW == badIW.length) { console.log("done"); return; }	a.get({action:"query",meta:"tokens"}).done(function(data){	token = data.query.tokens.csrftoken;		$.post("/index.php?title=Special:Interwiki&action=submit&prefix="+badIW[curIW],{wpInterwikiPrefix:badIW[curIW],wpEditToken:token,wpInterwikiAction:"delete"}).then(function(data) { curIW++; deleteIW; });	}); } deleteIW;