Benutzer:Nhornung/monobook.js

Aus Piratenwiki Mirror
Zur Navigation springen Zur Suche springen

Hinweis: Leere nach dem Speichern den Browser-Cache, um die Änderungen sehen zu können.

  • Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
  • Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
  • Internet Explorer: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
  • Opera: Gehe zu Menü → Einstellungen (Opera → Einstellungen auf dem Mac) und dann auf Datenschutz & Sicherheit → Browserdaten löschen → Gespeicherte Bilder und Dateien.
 //
 // ab hier functions
 //
 
 function w (was,lurl,linktext,targt,title) {
  if (!title) title=linktext;
  if (!zeigehilfe) title='';
  if (!dropdown) {
   switch (was) {
    case 0 : xxx=xxx+lurl;break;
    case 1 : xxx=xxx+'<a href="'+lurl+'" target="'+targt+'" title="'+title+'">'+linktext+'</a>&nbsp; ';break;
    case 2 : xxx=xxx+'<a href="#" onclick="newtext('+ lurl +')" title="'+title+'">'+linktext+'</a>&nbsp; ';break;
    case 3 : xxx=xxx+'<a href="#" onclick="insertTagsWrapper('+ lurl +')" title="'+title+'">'+linktext+'</a>&nbsp; ';break;
    case 4 : xxx=xxx+'<a href="#" onclick="'+ lurl +'" title="'+title+'">'+linktext+'</a>&nbsp; ';break;
   }
  } //if
  else //
  {
   var ltext='__________'.substr(1,ind)+linktext;
   switch (was) {
    case 0 : if (lurl==br) { xxx = xxx+'<option>'+linktext+'</option>';ind=2; }
             else
             if (lurl==trenner) newdropdown(linktext);
             break;
    case 1 : xxx=xxx+'<option value="1|'+lurl+'">'+ltext+'</option>';break;
    case 2 : xxx=xxx+'<option value="2|'+scrptn+'">'+ltext+'</option>';
             scrpt=scrpt+'case '+scrptn+':newtext('+lurl+');break;';scrptn++;break;
    case 3 : xxx=xxx+'<option value="3|'+scrptn+'">'+ltext+'</option>';
             scrpt=scrpt+'case '+scrptn+':insertTagsWrapper('+lurl+');break;';scrptn++;break;
    case 4 : xxx=xxx+'<option value="4|'+scrptn+'">'+ltext+'</option>';
             scrpt=scrpt+'case '+scrptn+':'+lurl+';break;';scrptn++;break;
   } //switch
  } //else
 } //w
 
 function dodropdown (aktion) {
  var zutun = aktion.split('|');
  var was = Number(zutun[0]);
  var wie = zutun[1];
 
  switch (was) {
   case 1 : window.open (wie); break;
   case 2 : _doopt (Number(wie)); break;
   case 3 : _doopt (Number(wie)); break;
   case 4 : _doopt (Number(wie)); break;
  } //switch
 } //dodropdown
 
 function newdropdown (oname) {
   closedropdown();
   xxx = xxx+'<select size=1 onchange="dodropdown(this.value);" style="width:135px;font-size:9px;">';
   if (oname > '') { xxx = xxx+'<option>'+oname+'</option>'; }
   indropdown = true;
   ind=2;
 }
 
 function closedropdown () {
  if (indropdown) xxx=xxx+'</select>';
  indropdown = false;
 }
 
 function newtext (subj,text,wo)
  {  //wo=1 : Text austauschen
     //wo=2 : Text am Ende anhängen
     //wo=3 : Text vorne Einfügen
 
   if (subj > "") {
      if (document.editform.wpSummary.value > "") document.editform.wpSummary.value += ", ";
      document.editform.wpSummary.value = document.editform.wpSummary.value + subj;
   }
 
   switch (wo) {
       case 1 : document.editform.wpTextbox1.value=text+'\n'; break;
       case 2 : document.editform.wpTextbox1.value=document.editform.wpTextbox1.value+'\n'+text;break;
       case 3 : document.editform.wpTextbox1.value=text+'\n'+document.editform.wpTextbox1.value;break;
   }
   document.editform.wpTextbox1.focus();
  }
 
 function insertTagsWrapper(tagOpen, tagClose, sampleText, subj) {
   if (subj > "") {
      if (document.editform.wpSummary.value > "") document.editform.wpSummary.value += ", ";
      document.editform.wpSummary.value = document.editform.wpSummary.value + subj;
   }
   insertTags(untagEscape(tagOpen), untagEscape(tagClose), untagEscape(sampleText))
 }