User:Legosock/mtc.js

// Adds Template:MTC] // Created by Legoktm // Adds a tab at the top of the page says "mtc" if((wgAction == 'edit' || wgAction == 'submit') && wgNamespaceNumber == 6) addOnloadHook(function { addPortletLink('p-cactions','javascript:doMtc','mtc','ca-mtc'); }) function doMtc { var txt = document.getElementById('wpTextbox1'); if(!txt) return; txt.value = '{' + '{' + 'mtc}}\n\n' + txt.value; document.getElementById('wpSummary').value += ' automatically tagging {'+'{mtc}}' document.getElementById('wpSave').click; }