Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page.
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.
/* Uploaded from https://github.com/WPAFC/afch-rewrite, commit: ad5eaed0d41a1a14f4d4b05cbebc58a4137f9e80 (master) *///<nowiki>(function($,mw){varsubscriptToLoad=false,pageName=mw.config.get('wgPageName').replace(/_/g,' '),// `loadMap` determines which scripts should be loaded// on each page. Each key is a subscript name and// its value is a list of page prefixes on which it// should be loaded.loadMap={// `submissions.js` is for reviewing textual// Articles for Creation submissions.submissions:['Wikipedia:Articles for creation/','Wikipedia talk:Articles for creation/','User:','Draft:']};$.each(loadMap,function(script,prefixes){$.each(prefixes,function(_,prefix){if(pageName.indexOf(prefix)===0){subscriptToLoad=script;returnfalse;}});// Return false and break out of the loop if already foundreturn!!subscriptToLoad;});if(subscriptToLoad){// Initialize the AFCH objectwindow.AFCH={};// Set up constantsAFCH.consts={};// Master version dataAFCH.consts.version='0.9';AFCH.consts.versionName='Hatted Hamster';// FIXME: Change when moving into productionAFCH.consts.beta=true;AFCH.consts.scriptpath=mw.config.get('wgServer')+mw.config.get('wgScript');AFCH.consts.baseurl=AFCH.consts.scriptpath+'?action=raw&ctype=text/javascript&title=User:Theopolisme/afch-rewrite.js';$.getScript(AFCH.consts.baseurl+'/core.js').done(function(){varloaded=AFCH.load(subscriptToLoad);if(!loaded){mw.notify('AFCH could not be loaded: '+(AFCH.error||'unknown error'),{title:'AFCH error'});}});}}(jQuery,mediaWiki));//</nowiki>