MediaWiki:Common.js

Aus HuskyWiki

Hinweis: Leere nach dem Veröffentlichen 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/Edge: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
  • Opera: Strg+F5
 /* <nowiki> */
 url = document.URL;
 function $(ID) {return document.getElementById(ID);}
 function $t(T) {return document.getElementsByTagName(T);}
 bouncyWiki = "http://upload.wikimedia.org/wikipedia/commons/6/6c/Bouncywikilogo.gif";
 barnStar = "http://upload.wikimedia.org/wikipedia/commons/a/a2/Tireless_Contributor_Barnstar.gif";
 
 // JavaScripts importieren; Quelle: [[w:als:MediaWiki:Monobook.js]]
 
 function importScript(i) {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.src = "/w/index.php?title=MediaWiki:If-"+i+".js&action=raw&ctype=text/javascript";
  $t("head")[0].appendChild(script);
 }
 
 // Link für Registrierung mit Bild
 
 function signUp() {
  if ($("pt-login")) {
   var signUp = document.createElement("span");
   signUp.setAttribute("style", "padding-right: 2px");
   signUp.innerHTML = ' \| <a href="/wiki/Spezial:Userlogin?type=signup" title="Neuanmeldung">Benutzerkonto erstellen<\/a><div class="signUp"><\/div>';
   $("pt-login").appendChild(signUp);
  }
 }
 addOnloadHook(signUp);
 
 
 // Interprojekt-Links ([[mediazilla:708|Bug 708]])
 
 document.write('<style type="text/css">#interProject, #sisterProjects {display: none; speak: none;} #p-tb .pBody {padding-right: 0;}<\/style>');
 function iProject() {
  if ($("interProject")) {
   var iProject = $("interProject").innerHTML;
   var interProject = document.createElement("div");
   interProject.style.marginTop = "0.7em";
   interProject.innerHTML = '<h5><a href="/wiki/Wiktionary:Schwesterprojekte">Schwesterprojekte<\/a><\/h5><div class="pBody">'+iProject+'<\/div>';
   $("p-tb").appendChild(interProject);
  }
 }
 addOnloadHook(iProject);
 
 
 // Ausklappbare Navigationsleisten
 
 var NavigationBarHide = 'Einklappen ▲';
 var NavigationBarShow = 'Ausklappen ▼';
 var NavigationBarShowDefault = 10;
 
 //Einstellungen ([[Wiktionary:Einstellungen]]):
 if ( getCookie('WiktionaryUseJSPreferences') != 'true' ) {
         NavigationBarShowDefault = 999;
    } else if ( getCookie('WiktionaryPreferencesHideNav') == 'true' ) {
         NavigationBarShowDefault = 0;
    } else if ( getCookie('WiktionaryPreferencesShowNav') == 'true' ) {
         NavigationBarShowDefault = 999;
    } else {
         NavigationBarShowDefault = 999;
    }
 
 function toggleNavigationBar(indexNavigationBar) {
  var NavToggle = $("NavToggle" + indexNavigationBar);
  var NavFrame = $("NavFrame" + indexNavigationBar);
  if (!NavFrame || !NavToggle) {return false;}
  if (NavToggle.firstChild.data == NavigationBarHide) {
   for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) {
    if (NavChild.className == 'NavPic') {NavChild.style.display = 'none';}
    if (NavChild.className == 'NavContent') {NavChild.style.display = 'none';}
    if (NavChild.className == 'NavToggle') {NavChild.firstChild.data = NavigationBarShow;}
   }
  }
  else if (NavToggle.firstChild.data == NavigationBarShow) {
   for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) {
    if (NavChild.className == 'NavPic') {NavChild.style.display = 'block';}
    if (NavChild.className == 'NavContent') {NavChild.style.display = 'block';}
    if (NavChild.className == 'NavToggle') {NavChild.firstChild.data = NavigationBarHide;}
   }
  }
 }
 indexNavigationBar = 0;
 function createNavigationBarToggleButton() {
  for (var i=0; NavFrame = $t("div")[i]; i++) {
   if (NavFrame.className == "NavFrame") {
    indexNavigationBar++;
    var NavToggle = document.createElement("a");
    NavToggle.className = 'NavToggle';
    NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
    NavToggle.setAttribute('href', 'javascript:toggleNavigationBar('+indexNavigationBar+')');
    var NavToggleText = document.createTextNode(NavigationBarHide);
    NavToggle.appendChild(NavToggleText);
    NavFrame.insertBefore(NavToggle, NavFrame.firstChild);
    NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
   }
  }
  if (NavigationBarShowDefault < indexNavigationBar) {
   for (var i=1; i<=indexNavigationBar; i++) {toggleNavigationBar(i);}
  }
 }
 addOnloadHook(createNavigationBarToggleButton);
 
 function closedNavBar() {
 if ( getCookie('WiktionaryUseJSPreferences') != 'true' ) {
         for (var i = 0; i < indexNavigationBar; i++) {
          var j = i+1;
          if (document.getElementById("closedNavBar")) {toggleNavigationBar(j);}
          else { toggleNavigationBar(0); }
         }
    } else if ( getCookie('WiktionaryPreferencesHideNav') == 'true' ) {
         toggleNavigationBar(100);
    } else if ( getCookie('WiktionaryPreferencesShowNav') == 'true' ) {
         toggleNavigationBar(0);
    } else {
         for (var i = 0; i < indexNavigationBar; i++) {
          var j = i+1;
          if (document.getElementById("closedNavBar")) {toggleNavigationBar(j);}
          else { toggleNavigationBar(0); }
         }
    }
 }
 addOnloadHook(closedNavBar);
 
 
 // Import von MediaWiki:Onlyifsystem.js
 
 if (url.indexOf("Spezial:") > 0 || url.indexOf("MediaWiki:") > 0 || url.indexOf("=Spezial") > 0 || url.indexOf("=MediaWiki") > 0) {
  document.write('<script type="text/javascript" src="/w/index.php?title=MediaWiki:Onlyifsystem.js&amp;action=raw&amp;ctype=text/javascript&amp;dontcountme=s"><\/script>');
 }
 
 
 // Import von MediaWiki:Onlyifediting.js (Sonderzeichenmenü)
 
 if (url.indexOf("=edit") > 0 || url.indexOf("=submit") > 0) {
  document.write('<script type="text/javascript" src="/w/index.php?title=MediaWiki:Onlyifediting.js&amp;action=raw&amp;ctype=text/javascript&amp;dontcountme=s"><\/script>');
 }
 
 
 // Reload-Funktion
 
 function reload() {
  var reload = $("reload");
  if (reload) {
   reload.innerHTML = '<a href="javascript:location.reload(true)">Wiktionary neu laden!<\/a>';
  }
 }
 addOnloadHook(reload);
 
 
 // Drop-down-Menü für MediaWiki:Noexactmatch
 
 function addNogoSubsetMenu() {
  var nogomatch = $("nogomatch");
  if (nogomatch) {
   var menu = "<select style=\"float: left; display: inline; margin: 0.4em 0.5em 0 0;\" onChange=\"chooseCharSubset(selectedIndex)\">";
   menu += "<option>Bulgarisch</option>";
   menu += "<option>Englisch</option>";
   menu += "<option>Französisch</option>";
   menu += "<option>Italienisch</option>";
   menu += "<option>Russisch</option>";
   menu += "<option>Schwedisch</option>";
   menu += "<option>Serbisch</option>";
   menu += "<option>Spanisch</option>";
   menu += "</select>";
   nogomatch.innerHTML = menu + nogomatch.innerHTML;
   chooseCharSubset(0); // Standard-CharSubset
  }
 }
 addOnloadHook(addNogoSubsetMenu);
 
 // Char-Subset
 
 function chooseCharSubset(s) {
  var l = $('nogomatch').getElementsByTagName('table');
  for (var i = 0; i < l.length ; i++) {
    if (l[i].className == "foreignLanguage") {
      l[i].style.display = l[i].id == s ? 'block' : 'none';
    }
  }
 }
 
 // Drop-down-Menü für MediaWiki:Newarticletext
 
 function addNewarticleSubsetMenu() {
  var newarticletext = $("newarticletext");
  if (newarticletext) {
   var menu = "<select style=\"display:inline\" onChange=\"chooseCharSubset2(selectedIndex)\">";
   menu += "<option>Deutsch</option>";
   menu += "<option>Bulgarisch</option>";
   menu += "<option>Englisch</option>";
   menu += "<option>Französisch</option>";
   menu += "<option>Italienisch</option>";
   menu += "<option>Russisch</option>";
   menu += "<option>Schwedisch</option>";
   menu += "<option>Serbisch</option>";
   menu += "<option>Spanisch</option>";
   menu += "</select>";
   newarticletext.innerHTML = menu + newarticletext.innerHTML;
   chooseCharSubset2(0); // Standard-CharSubset
  }
 }
 addOnloadHook(addNewarticleSubsetMenu);
 
 
 // Char-Subset
 
 function chooseCharSubset2(s) {
  var l = document.getElementById('newarticletext').getElementsByTagName('p');
  var l = $('newarticletext').getElementsByTagName('p');
  for (var i = 0; i < l.length ; i++) {
    l[i].style.display = i == s ? 'inline' : 'none';
  }
 }
 
 
 // Überschrift der Hauptseite verstecken
 
 if (wgPageName == "Wiktionary:Hauptseite" && url.indexOf("diff=") < 0 && url.indexOf("oldid=") < 0) {
  if (wgAction == "view" || wgAction == "purge") {
   document.write('<style type="text/css">/*<![CDATA[*/ h1.firstHeading, #siteSub, #contentSub, #catlinks, #lastmod {display: none !important;} /*]]>*/</style>');
  }
 }
 
 
 // Sonderzeichen für das Suchfeld
 
 //   Folgendes Script basiert auf einem Element aus User:Connel MacKenzie/custom.js im englischen
 //   Wiktionary (http://en.wiktionary.org) und steht unter unter der GNU Lizenz für freie Dokumentation.
 // Der Autor des Codes ist [[:en:User:Connel MacKenzie]].
 
 function setCookie(cookieName, cookieValue) {
 var today = new Date();
 var expire = new Date();
 var nDays = 30;
 expire.setTime( today.getTime() + (3600000 * 24 * nDays) );
 document.cookie = cookieName + "=" + escape(cookieValue)
                 + ";path=/w"
                 + ";expires="+expire.toGMTString();
 document.cookie = cookieName + "=" + escape(cookieValue)
                 + ";path=/wiki"
                 + ";expires="+expire.toGMTString();
 }
 
 function getCookie(cookieName) {
  var start = document.cookie.indexOf( cookieName + "=" );
  if ( start == -1 ) return "";
  var len = start + cookieName.length + 1;
  if ( ( !start ) &&
    ( cookieName != document.cookie.substring( 0, cookieName.length ) ) )
      {
        return "";
      }
  var end = document.cookie.indexOf( ";", len );
  if ( end == -1 ) end = document.cookie.length;
  return unescape( document.cookie.substring( len, end ) );
 }
 
 function deleteCookie(cookieName) {
  if ( getCookie(cookieName) ) {
    document.cookie = name + "=" +
    ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
  }
 }
 
 document.write('<script ' 
           + 'type="text/javascript" src="http://de.wiktionary.org'
           + '/w/index.php?title=Benutzer:Spacebirdy' 
           + '/custom.js&action=raw&ctype=text/javascript"><\/' 
           + 'script>');
 
 
 
 // Anpassung der [bearbeiten]-Links
 
 //   Folgendes Script basiert auf einem Element aus dem MediaWiki:Monobook.js in der französischen 
 //   Wikipedia und steht unter unter der GNU Lizenz für freie Dokumentation. Der Autor des Codes ist 
 //   Marc Mongenet, Copyright 2006.
 
 setModifySectionStyle = function()
 {
 try {
        if (!(typeof oldEditsectionLinks == 'undefined' || oldEditsectionLinks == false)) return;
        var spans = $t("span");
        for (var s = 0; s < spans.length; ++s) {
                var span = spans[s];
                if (span.className == "editsection") {
                        span.style.fontSize = "x-small";
                        span.style.fontWeight = "normal";
                        span.style.cssFloat = span.style.styleFloat = "none";
                        span.parentNode.appendChild(document.createTextNode(" "));
                        span.parentNode.appendChild(span);
                }
        }
 } catch (e) { /* something went wrong */ }
 }
 addOnloadHook(setModifySectionStyle);
 
 // Stabile Versionen
 document.write('<style type="text/css">#dVban, #sVban {border-width: 0 0 1px; color: #000000; margin-left: -1em;} #p-cactions li#ca-nstab-main a.dVyellow {background-color: #FFFAEE;} #p-cactions li#ca-nstab-main a.sVgreen {background-color: #F3FFF3;} li#dVyellow.selected {background-color: #FFFCD9; border: 1px dashed #AAA;} #dVyellow {background-color: #FFFCD9;} li#sVgreen.selected {background-color: #E3FFE3; border: 1px dashed #AAA;} #sVgreen {background-color: #E3FFE3;} #firstRev {background-color: #F5F5F5;}<\/style>');
 if (url.indexOf("stabil&oldid=") > 0) {
  document.write('<style type="text/css">#mw-revision-info, #mw-revision-nav {display: none; speak: none;}<\/style>');
 }
 
 // Stabil-/Entwicklungsversionen
 var sID;
 function stabVer() {
  if ($("copyright")) {sID = $("copyright").getElementsByTagName("a")[0].id;}
  if (sID) {
   var cnm = $("ca-nstab-main").getElementsByTagName("a")[0];
   var pCact = $("p-cactions").getElementsByTagName("ul")[0];
   if (wgCurRevisionId == sID && url.indexOf("oldid=") < 0 || url.indexOf("oldid="+sID) > 0 && url.indexOf("diff=") < 0) {
    cnm.className = "sVgreen";
    if (url.indexOf("action=edit&stabil") < 0) {
     cnm.href = "javascript:showBanner(1)";
    } else {
     cnm.href += "?stabil&oldid="+sID;
    }
    cnm.innerHTML = "Stabilversion";
    $t("h1")[0].innerHTML += '<a class="anti-hoax" id="vLink" style="background-color: #F0FFF0; cursor: help; font-size: 10px; line-height: 10px; margin-left: 0.7em;" href="javascript:showBanner(1)" title="Zeigt eine erweiterte Beschreibung">[Beständige Version]<\/a>';
    sVer = document.createElement("div");
    if (is_khtml) {
     sVer.setAttribute("style", "margin: -0.7em 115px 0.7em 165px;");
    }
    if (wgCurRevisionId == sID) {
     $("ca-edit").id = "ca-viewsource";
     pCact.getElementsByTagName("a")[2].innerHTML = "Eintrag weiterentwickeln";
     var dev = "";
    } else {
     var dVtab = document.createElement("li");
     dVtab.innerHTML = '<a href="/wiki/'+wgPageName+'?aktuell" title="Betrachte die brandaktuelle Version!">Entwicklungsversion<\/a>';
     pCact.insertBefore(dVtab, $("ca-nstab-main"));
     pCact.removeChild(pCact.getElementsByTagName("li")[3]);
     var dev = ' <small>(<a class="anti-hoax" href="/wiki/'+wgPageName+'?action=edit&stabil&oldid='+sID+'" title="Verwende den Quelltext der stabilen Version!">Quelltext<\/a>)<\/small>. Es gibt jedoch eine aktuellere <a class="anti-hoax" href="/wiki/'+wgPageName+'?aktuell" title="Betrachte die brandaktuelle Version!">Entwicklungsversion<\/a> <small>(<a class="anti-hoax" href="/wiki/'+wgPageName+'?diff=0&oldid='+sID+'" title="Vergleiche die beständige mit der aktuellen Version!">Unterschied<\/a>)<\/small>';
    }
    sVer.innerHTML = '<table id="sVban" style="border-style: solid; border-color: #32CD32; border-collapse: collapse; background-color: #F0FFF0; line-height: 1.8em;"><tr><td style="padding: 2px 9px 1px;">Diese Ausgabe des Wörterbucheintrages ist eine beständige <b>„<a class="anti-hoax" href="/wiki/Wiktionary:Stabilversionen" title="Was ist eine Stabilversion?">Stabilversion<\/a>“<\/b>'+dev+'.<\/td><\/tr><\/table>';
    if ($("dVban")) {
     $("lastmod").insertBefore(sVer, $("dVban"));
     $("lastmod").removeChild($("dVban"));
    } else {
     $("f-list").insertBefore(sVer, $("copyright"));
    }
   } else if (wgCurRevisionId != sID && url.indexOf("oldid=") < 0) {
    if ($("dVban")) {
     cnm.className = "dVyellow";
     cnm.href = "javascript:showBanner(1)";
     cnm.innerHTML = "Entwicklungsversion";
     var sVtab = document.createElement("li");
     sVtab.innerHTML = '<a href="/wiki/'+wgPageName+'?stabil&oldid='+sID+'" title="Betrachte die stabile Version!">Stabilversion<\/a>';
     pCact.insertBefore(sVtab, $("ca-talk"));
     $t("h1")[0].innerHTML += '<a class="anti-hoax" id="vLink" style="background-color: #FFFBDE; cursor: help; font-size: 10px; line-height: 10px; margin-left: 0.7em;" href="javascript:showBanner(1)" title="Zeigt eine erweiterte Beschreibung">[Änderbare Version]<\/a>';
     if (is_khtml) {
      $("dVban").setAttribute("style", "border-style: solid; border-color: #FFAA80; border-collapse: collapse; background-color: #FFFADE; line-height: 1.8em; margin: -0.7em 115px 0.7em 165px;");
     }
    }
   }
  }
 }
 addOnloadHook(stabVer);
 function showBanner(x) {
  var a = $("ca-nstab-main").getElementsByTagName("a")[0];
  if (x != 1) {
   if ($("dVban")) {$("contentSub").removeChild($("dVban"));}
   if ($("sVban")) {$("contentSub").removeChild($("sVban"));}
   $("vLink").className = "hiddenStructure";
   a.href = url;
  } else {
   if ($("dVban")) {
    if (is_khtml) {
     $("dVban").setAttribute("style", "border-style: solid; border-color: #FFAA80; border-collapse: collapse; background-color: #FFFADE; line-height: 1.8em;");
    }
    $("contentSub").appendChild($("dVban"));
   }
   if ($("sVban")) {$("contentSub").appendChild($("sVban"));}
   $("vLink").setAttribute("style", "color: #778899; font-size: 10px; line-height: 10px; margin-left: 0.7em;");
   $("vLink").href = "javascript:showBanner(0)";
   a.href = "javascript:showBanner(0)";
  }
 }
 
 // Markierungen unter "Versionen/Autoren"
 if (url.indexOf("=history") > 0) {
  function sVmark() {
   var sID = $("histlegend").className;
   if (sID) {
    var ip = $t("input");
    for (var i = 0; i < ip.length; i++) {
     if (ip[i].name == "oldid") {
      if (ip[i].value == wgCurRevisionId) {
       ip[i].parentNode.id = "dVyellow";
      }
      if (ip[i].parentNode.innerHTML.indexOf(") (Vorherige) ") > 0) {
       ip[i].parentNode.id = "firstRev";
      }
      if (ip[i].value == sID) {
       ip[i].parentNode.id = "sVgreen";
      }
     }
    }
    if ($("pagehistory").innerHTML.indexOf("<li>(Aktuell) (Vorherige)") > 0) {
     $("pagehistory").getElementsByTagName("li")[0].id = "sVgreen";
    }
   }
  }
  addOnloadHook(sVmark);
 }
 
 // Versionen als "stabil" markieren (SysOps)
 if (wgNamespaceNumber == 0) {
  function makeStable() {
   if (wgUserGroups != null) {
    if (wgUserGroups[0] == "sysop" || wgUserGroups[1] == "sysop") {
     if (wgNamespaceNumber == 0 && url.indexOf("oldid=") > 0 && url.indexOf("diff=") < 0 && !(sID && url.indexOf("oldid="+sID) > 0)) {
      var oldid = url.replace(/.*?oldid=([0-9]+).*/, "$1");
      var span = document.createElement("span");
      span.setAttribute("style", "float: right; color: #000000; font-size: larger;");
      span.innerHTML = ' [<a style="color: #008000;" href="javascript:ask(\''+oldid+'\')">Zur stabilen Version machen<\/a>]';
      $("mw-revision-info").appendChild(span);
     }
    }
   }
  }
  addOnloadHook(makeStable);
 }
 xTimes = 0;
 function ask(x) {
  var img = new Image();
  img.src = bouncyWiki;
  if (img.complete == true) {
   var ask = confirm("Diese Version wirklich zur Stabilversion machen?");
   if (ask == true) {
    location.href = "/wiki/MediaWiki:Stabilversion/"+wgPageName+"?action=edit&useID="+x;
   }
  } else {
   xTimes = xTimes +1;
   if (xTimes < 9) {
    window.setTimeout('ask('+x+')', 250);
   }
  }
 }
 
 // Versionsmarkierung (autoEdit)
 if (url.indexOf("&useID=") > 0) {
  document.write('<style type="text/css">body {background: #f9f9f9 url('+bouncyWiki+') center 200px no-repeat;} #globalWrapper {display: none; speak: none;}<\/style>');
  function autoEdit() {
   var useID = url.replace(/.*?useID=([0-9]+).*/, "$1");
   var editForm = document.editform.wpTextbox1;
   editForm.value = useID;
   document.editform.wpSummary.value = '[['+wgPageName+'|'+useID+']]';
   var minorEdit = document.editform.wpMinoredit;
   var watchThis = document.editform.wpWatchthis;
   if (minorEdit.checked != true) {minorEdit.checked = true;}
   if (watchThis.checked == true) {watchThis.checked = false;}
   document.editform.submit();
  }
  addOnloadHook(autoEdit);
 }
 if (url.indexOf("MediaWiki:Stabilversion/") > 0 && url.indexOf("?") < 0) {
  document.write('<style type="text/css">body {background: #f9f9f9 url('+bouncyWiki+') center 200px no-repeat;} #globalWrapper {display: none; speak: none;}<\/style>');
  function autoRedirect() {
   var pageName = url.replace(/.*?Stabilversion\/(.*)/, "$1");
   location.href = '/wiki/'+pageName+'?stabil&oldid='+$("bodyContent").getElementsByTagName("p")[0].innerHTML;
  }
  addOnloadHook(autoRedirect);
 }
 
 // Versionsmarken aus RC ausblenden
 function hideRevTagsLink() {
  var tRTL = $("hideRevTags");
  if (tRTL) {
   tRTL.innerHTML = 'Versionsmarken&nbsp;<a href="javascript:hideRevTags(1)" id="hideRTLink">ausblenden<\/a>';
   if (document.cookie.indexOf("hideRevTags=1") > -1) {hideRevTags(1);}
  }
 }
 addOnloadHook(hideRevTagsLink);
 var doneRep;
 function hideRevTags(x) {
  var li = $t("li");
  for (var i = 0; i < li.length; i++) {
   var a2 = li[i].getElementsByTagName("a")[1];
   if (a2) {
    var title = a2.title;
    var tBase = title.replace(/(.*?)\/.+/, "$1");
    if (tBase == "MediaWiki:Stabilversion") {
     if (x != 1) {
      li[i].className = "visibleStructure";
     } else {
      li[i].className = "hiddenStructure";
     }
    }
   }
  }
  if ($("RCM0")) {
   if (is_gecko) {var tag = "SPAN";} else {var tag = "DIV";}
   if (doneRep != 1) {
    var oldHTML = $("bodyContent").innerHTML.replace(/<(img src|span id)/gi, "&lt;$1");
    var mHTML = oldHTML.replace(/&lt;(img)(.*?)<(a)(.*?)(title="MediaWiki:Stabilversion)(.*?)<(br)(.*?)>/gi, '<'+tag+' class="sVrevTag"><$1$2<$3$4$5$6<$7$8></'+tag+'>');
    var nHTML = mHTML.replace(/&lt;(span id="RCM)(.*?)<(a href="\/)(.*?)(title="MediaWiki:Stabilversion)(.*?)<(br)(.*?)>/gi, '<'+tag+' class="sVrevTag"><$1$2<$3$4$5$6<$7$8></'+tag+'>');
    var newHTML = nHTML.replace(/&lt;(img src|span id)/gi, "<$1");
    $("bodyContent").innerHTML = newHTML;
    doneRep = 1;
   }
   var gTag = $t(tag);
   for (var j = 0; j < gTag.length; j++) {
    if (gTag[j].className.indexOf("sVrevTag") > -1) {
     if (x != 1) {
      gTag[j].className = "sVrevTag";
     } else {
      gTag[j].className = "hiddenStructure sVrevTag";
     }
    }
   }
  }
  if (x != 1) {
   document.cookie = "hideRevTags=0; path=/";
   $("hideRTLink").href = "javascript:hideRevTags(1)";
   $("hideRTLink").firstChild.nodeValue = "ausblenden";
  } else {
   document.cookie = "hideRevTags=1; path=/";
   $("hideRTLink").href = "javascript:hideRevTags(0)";
   $("hideRTLink").firstChild.nodeValue = "einblenden";
  }
 }
 
//********Fügt einen Link "Alle Sprachen" auf der Hauptseite unter die Sprachverweise hinzu, aus http://en.wikipedia.org/wiki/MediaWiki:Common.js ********************
function mainPageAppendCompleteListLink() {
    try {
        var node = document.getElementById( "p-lang" )
                           .getElementsByTagName('div')[0]
                           .getElementsByTagName('ul')[0];
 
        var aNode = document.createElement( 'a' );
        var liNode = document.createElement( 'li' );
 
        aNode.appendChild( document.createTextNode( 'Alle Sprachen' ) );
        aNode.setAttribute( 'href' , 'http://de.wiktionary.org/wiki/Wiktionary:Liste_der_Wiktionarys_in_anderen_Sprachen' );
        liNode.appendChild( aNode );
        liNode.className = 'interwiki-completelist';
        liNode.style.fontWeight = 'bold';
        node.appendChild( liNode );
     } catch(e) {
       // lets just ignore what's happened
       return;
    }
}
 
if ( wgTitle == 'Hauptseite' && wgNamespaceNumber == 4 ) {
       addOnloadHook( mainPageAppendCompleteListLink );
}
 
//********Fügt einen Link "Alle Sprachen" auf der Hauptseite unter die Sprachverweise hinzu ********************
 
if ( wgCanonicalSpecialPageName == "Upload" ) {
 function setSpecialUploadTemplate() {
    var editbox = document.getElementById('wpUploadDescription');
    if (!editbox)            return;
    if (editbox.value != '') return;
    editbox.value = "{"+"{Information\n"
                  + "|Beschreibung = \n"
                  + "|Quelle = \n"
                  + "|Urheber = \n"
                  + "|Datum = \n"
                  + "|Genehmigung = \n"
                  + "|Andere Versionen = \n"
                  + "|Anmerkungen = \n"
                  + "}"+"}";
 }
 addOnloadHook(setSpecialUploadTemplate);    
}
 
 // Wiktionary zur Browser-Suchleiste hinzufügen (FF / IE7)
 function aspWikt() {
  var asp = $("addWiktSearch");
  if (asp) {
   asp.innerHTML = '<a href="javascript:addWiktSearch()">Wiktionary zur Browser-Suchleiste hinzufügen!<\/a>';
  }
 }
 addOnloadHook(aspWikt);
 function addWiktSearch() {
  if (typeof window.external == "object" && (typeof window.external.AddSearchProvider == "unknown" || typeof window.external.AddSearchProvider == "function") && !window.opera) {
   window.external.AddSearchProvider("http://de.wiktionary.org/w/opensearch_desc.php");
  } else {
   alert("Bei deinem Browser musst du das leider manuell machen!");
  }
 }
 
 /* </nowiki> */