User:Btilm/remex.js

function remex { var encode=encodeURIComponent(mw.config.get('wgPageName')) document.location=mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + encode + "&action=edit&remex"; } $(function { mw.util.addPortletLink("p-cactions", "javascript:remex", "-ex", "ca-ex", "Remove example.com.", ""); stub

if (location.href.indexOf('&action=edit&remex') == -1) return; document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace(/\n\* \[http:\/\/www\.example.com\/ example.com\]/gim,""); document.editform.wpSummary.value = 'Removed example.com.'; document.editform.wpMinoredit.checked = false; document.editform.submit; });