JavaScript zum Rücksetzen der Sidebar

Bearbeiten

function oldSidebar(){

var help = document.createElement('a');
help.href = "/wiki/Wikipedia:Hilfe";
help.appendChild(document.createTextNode("Hilfe"));
var helpli = document.createElement('li');
helpli.id = "help";
helpli.appendChild(help);
var portal = document.createElement('a');
portal.href = "/wiki/Wikipedia:Portal";
portal.appendChild(document.createTextNode("Wikipedia-Portal"));
var portalli = document.createElement('li');
portalli.id = "portal";
portalli.appendChild(portal);
var toolbar = document.getElementById('p-Hilfreiche_Links').getElementsByTagName('ul')[0];
toolbar.insertBefore(portalli,toolbar.firstChild);
toolbar.insertBefore(helpli,toolbar.firstChild);
with(document.getElementById('n-suchen').getElementsByTagName('a')[0]){
   href = "/wiki/Wikipedia:%C3%9Cber_Wikipedia";
   innerHTML = "Über Wikipedia";
}
with(document.getElementById('n-mitmachen').getElementsByTagName('a')[0]){
   href = "/wiki/Portal:Wikipedia_nach_Themen";
   innerHTML = "Themenportale";
} 
with(document.getElementById('n-aboutsite').getElementsByTagName('a')[0]){
   href = "/wiki/Spezial:Allpages";
   innerHTML = "Von A bis Z";
}
with(document.getElementById('n-help').getElementsByTagName('a')[0]){
   href = "/wiki/Spezial:Random";
   innerHTML = "Zufälliger Artikel";
} 

} addOnloadHook(oldSidebar);