User:Omegatron/monobook.js/citebookfixer.js

function replacedash { var txt = document.editform.wpTextbox1;

// Convert id = ISBN into isbn = txt.value = txt.value.replace(/id ?= ?ISBN/g, 'isbn = ');

// Add a tag to the summary box var txt = document.editform.wpSummary; var summary = "Updating tag with new fields"; if (txt.value.indexOf(summary) == -1) { if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) { txt.value += " | "; }		txt.value += summary; }

// Press the diff button to check it   document.editform.wpDiff.click }

$(function {    if(document.forms.editform) {        mw.util.addPortletLink('p-cactions', 'javascript:replacedash', '—', 'ca-citebookfixer', 'Fixes cite book formatting', , );    } });