Benutzer:Porthos (MA)/monobook.js: Unterschied zwischen den Versionen
imported>Porthos |
imported>Porthos K |
||
Zeile 14: | Zeile 14: | ||
tools.appendChild(document.createTextNode(" | ")); | tools.appendChild(document.createTextNode(" | ")); | ||
tools.appendChild(newTool('rev','Reverted')); | tools.appendChild(newTool('rev','Reverted')); | ||
+ | tools.appendChild(document.createTextNode(" | ")); | ||
+ | tools.appendChild(newTool('wiki','wikifiziert')); | ||
tools.appendChild(document.createTextNode(" | ")); | tools.appendChild(document.createTextNode(" | ")); | ||
tools.appendChild(newTool('Vandalismus','Vandalismus')); | tools.appendChild(newTool('Vandalismus','Vandalismus')); |
Version vom 2. August 2005, 22:57 Uhr
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('fix','Fixed'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('rev','Reverted'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('wiki','wikifiziert'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('Vandalismus','Vandalismus'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('typo','Typo'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('links','Links'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('kat','Kategorie'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('en','Interwiki en'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('format','Formatierung'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('Bild','Bild'));
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;
}