User:Moondyne/AUDfixes.js

// function AUDfixes { var	txt=document.editform.wpTextbox1;

txt.value=txt.value.replace(/{{AUD\|([^}]+)}}/, ''); txt.value=txt.value.replace(/\[\[Australian\sdollar\|AU\$\]\]/gi, ''); txt.value=txt.value.replace(/AU\$/gi, 'A\$');

} function run_AUDfixes { AUDfixes; var txt=document.editform.wpSummary;   // Update the summary box var summary = "WP:$ AUD fixes"; if (txt.value.indexOf(summary) == -1) { if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) { txt.value += " | "; }		txt.value += summary; } document.editform.wpDiff.click; }

$(function { if(document.forms.editform) {  mw.util.addPortletLink('p-tb', 'javascript:run_AUDfixes', 'AUDfixes', 't-addmetric', 'Fixes', , );  } }); //