User:Vedek Dukat/monobook.js

function newTool(text,desc) { var tool = document.createElement("a"); tool.href = "javascript:inserts('"+text+" ','')"; var toolTxt = document.createTextNode(desc); tool.appendChild(toolTxt); return tool; }

function moreTools { var tools = document.getElementById('moretools'); tools.appendChild(newTool('+','added:')); tools.appendChild(document.createTextNode(" | ")); tools.appendChild(newTool('-','removed:')); tools.appendChild(document.createTextNode(" | ")); tools.appendChild(newTool('actor','actor')); tools.appendChild(document.createTextNode(" | ")); tools.appendChild(newTool('Quotes','quotes placeholder')); tools.appendChild(document.createElement("BR")); } if (window.addEventListener) window.addEventListener("load",moreTools,false); else if (window.attachEvent) window.attachEvent("onload",moreTools);

function inserts(tag, sampleText) { var txtarea = document.editform.wpSummary; txtarea.value = txtarea.value + tag; }