Jump to content

User:Maathavan/AutoEd/complete.js

From Wikipedia, the free encyclopedia
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.
//<source lang=javascript>
var AutoEd_baseurl = 'http://ta.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=user:Maathavan/AutoEd/';
if (location.protocol === 'https:') {
    AutoEd_baseurl = 'https://ta.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=user:Maathavan/AutoEd/';
}
mw.loader.load(AutoEd_baseurl + 'core.js'); //Imports the "framework" script needed to make this function
 
//Import individual modules for use
mw.loader.load(AutoEd_baseurl + 'templates.js'); // autoEdTemplates() cleans up templates

function autoEdFunctions() { //Activates individual modules when "auto ed" tab is clicked
    var txt = document.editform.wpTextbox1;
    txt.value = autoEdTemplates(txt.value);
}

//</source>