User:Pcj/GlobalPrefChange.js

a = new mw.Api; var sites; var curWiki; function gNW(w){ curWiki = w;	wiki = sites.data.wikis[w]; if (wiki == undefined) return; fa = new mw.ForeignApi("//"+wiki.wiki_domain+"/api.php"); fa.postWithToken('csrf',{action:"options",optionname:"profile-pref",optionvalue:0}).done(function(data) {		gNW(curWiki+1);	}).fail(function(data){		gNW(curWiki+1);	}); } a.get({action:"allsites","do":"getSiteStats"}).done(function(data){ sites = data; gNW(0);});