Benutzer:Plasmarelais/wikia.js: Unterschied zwischen den Versionen
imported>Plasmarelais K (neu angelegt) |
imported>Plasmarelais K |
||
Zeile 4: | Zeile 4: | ||
var toolTxt = document.createTextNode(desc); | var toolTxt = document.createTextNode(desc); | ||
tool.appendChild(toolTxt); | tool.appendChild(toolTxt); | ||
− | return tool; | + | return tool;} |
− | } | ||
− | |||
function moreTools() { | function moreTools() { | ||
var tools = document.getElementById('moretools'); | var tools = document.getElementById('moretools'); | ||
Zeile 40: | Zeile 38: | ||
tools.appendChild(newTool('+nl','nl ')); | tools.appendChild(newTool('+nl','nl ')); | ||
tools.appendChild(newTool('+sv','sv')); | tools.appendChild(newTool('+sv','sv')); | ||
− | + | tools.appendChild(document.createElement("BR"));} | |
− | tools.appendChild(document.createElement("BR")); | ||
− | } | ||
if (window.addEventListener) window.addEventListener("load",moreTools,false); | if (window.addEventListener) window.addEventListener("load",moreTools,false); | ||
else if (window.attachEvent) window.attachEvent("onload",moreTools); | else if (window.attachEvent) window.attachEvent("onload",moreTools); | ||
− | |||
function inserts(tag, sampleText) { | function inserts(tag, sampleText) { | ||
var txtarea = document.editform.wpSummary; | var txtarea = document.editform.wpSummary; | ||
− | txtarea.value = txtarea.value + tag; | + | txtarea.value = txtarea.value + tag;} |
− | } |
Version vom 22. April 2011, 00:17 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('Reverted','Reverted'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('Typo(s)','Typo(s)'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('Link(s)','Link(s)'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('Kategorie','Kategorie'));
tools.appendChild(document.createTextNode(" ("));
tools.appendChild(newTool('Sortierschlüssel Kategorie','Sortierung'));
tools.appendChild(document.createTextNode(") | "));
tools.appendChild(newTool('Format','Formatierung'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('an MA-Stil angepasst','MA-Stil'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('Vorlage','Vorlage'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('/* TEXT */','Abschnitt'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('[[Memory Alpha:Point of View|POV]]','POV'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('Bild(er)','Bild(er)'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('-{{stub}}','-Stub'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('erweitert','erweitert'));
tools.appendChild(document.createTextNode(" | "));
tools.appendChild(newTool('+de','de '));
tools.appendChild(newTool('+en','en '));
tools.appendChild(newTool('+fr','fr '));
tools.appendChild(newTool('+nl','nl '));
tools.appendChild(newTool('+sv','sv'));
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;}