varAutoEd_baseurl='//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedia:AutoEd/';//Sets variable configurationautoEdTag="Formatting using [[WP:AutoEd|AutoEd]]";//Tweaks edit summaryautoEdLinkName="Format";//Changes the link name at the top of the pageautoEdLinkHover="Run AutoEd to format page";//When user hovers over link//Import individual modules for usemw.loader.load(AutoEd_baseurl+'unicodify.js');// autoEdUnicodify() converts HTML entities to WikiTextmw.loader.load(AutoEd_baseurl+'whitespace.js');// autoEdWhitespace() cleans up whitespacemw.loader.load(AutoEd_baseurl+'wikilinks.js');// autoEdWikilinks() simplifies and shortens wikilinks where appropriatemw.loader.load(AutoEd_baseurl+'htmltowikitext.js');// autoEdHTMLtoWikitext() converts HTML to wikitextmw.loader.load(AutoEd_baseurl+'headlines.js');// autoEdHeadlines() fixes common headline errors and renames some headersmw.loader.load(AutoEd_baseurl+'unicodecontrolchars.js');// autoEdUnicodeControlChars() converts HTML to wikitextmw.loader.load(AutoEd_baseurl+'links.js');// autoEdLinks() cleans up common link errorsfunctionautoEdFunctions(){//Activates individual modules when "auto ed" tab is clickedvar$textbox=$('#wpTextbox1');vartxt=$textbox.textSelection('getContents');txt=autoEdUnicodify(txt);txt=autoEdWhitespace(txt);txt=autoEdWikilinks(txt);txt=autoEdHTMLtoWikitext(txt);txt=autoEdHeadlines(txt);txt=autoEdUnicodeControlChars(txt);txt=autoEdLinks(txt);$textbox.textSelection('setContents',txt);}$.when($.ready,mw.loader.using('jquery.textSelection')).then(function(){mw.loader.load(AutoEd_baseurl+'core.js');//Imports the "framework" script needed to make this function});