Jump to content

User:R'n'B/dabcolorizer.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by R'n'B (talk | contribs) at 18:54, 11 April 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// This is still in the testing stage; not ready for general use

importScript("User:Luasóg bot/framework.js");

// wait until framework has been loaded
$("script[src*='bot/framework.js']").load(function(){

	// initialize the bot
	jQuery.bot = new Luasog(mw.config.get(wgServer) + mw.config.get(wgScriptPath) + "/api.php");
	alert( "Bot initialized" );

	// get the list of disambig templates
	jQuery.bot.request(
		{'action':'query', 'maxlag':'5', 'prop':'links',
		 'titles':'MediaWiki:Disambiguationspage', 'plnamespace':'10', 'pllimit':'max'},
		function(data){
			jQuery.botreturnedthis = data;
			alert( "Received list of templates." );
	});
});