User:Tcncv/twinkle.js

// See http://www.mediawiki.org/wiki/ResourceLoader/Default_modules#mediaWiki.loader // First load morebits.js. When that load is complete, load the rest of the modules. // TODO: Determine if TwinkleInit may be eliminated, since it appears that it is no longer needed due to load sequence enforced below. // : Yep, can be removed, was only there to ensure morebits being loaded before using it. Amalthea, 08:11, 30 March 2011 (UTC)

function twScriptPath(scriptPageName) { return mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=' + scriptPageName + '&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400'; } function twScriptLoad(scriptPageName) { mw.loader.load(twScriptPath(scriptPageName)); }

twScriptLoad('User:AzaToth/morebits.js');

mw.loader.using(twScriptPath('User:AzaToth/morebits.js'), function {   twScriptLoad('User:AzaToth/twinklefluff.js');    twScriptLoad('User:AzaToth/twinklewarn.js');    twScriptLoad('User:AzaToth/twinklearv.js');    twScriptLoad('User:AzaToth/twinklespeedy.js');    twScriptLoad('User:AzaToth/twinklediff.js');    twScriptLoad('User:AzaToth/twinkleprotect.js');    twScriptLoad('User:AzaToth/twinkleprod.js');    twScriptLoad('User:AzaToth/twinklexfd.js');    twScriptLoad('User:AzaToth/twinkleimage.js');    twScriptLoad('User:AzaToth/twinkleunlink.js');    twScriptLoad('User:AzaToth/twinkledelimages.js');    twScriptLoad('User:AzaToth/twinkledeprod.js');    twScriptLoad('User:AzaToth/twinklebatchdelete.js');    twScriptLoad('User:AzaToth/twinklebatchprotect.js');    twScriptLoad('User:AzaToth/twinkleimagetraverse.js');    twScriptLoad('User:AzaToth/twinklebatchundelete.js'); });