Benutzer:Eneas/OldSidebar
Zur Navigation springen
Zur Suche springen
JavaScript zum Rücksetzen der Sidebar
[Bearbeiten | Quelltext 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);
var alphindex = document.getElementById("n-alphindex"); if (alphindex) alphindex.parentNode.removeChild(alphindex);
var randompage = document.getElementById("n-randompage"); if (randompage) randompage.parentNode.removeChild(randompage); var gemeinschaft = document.getElementById("n-gemeinschaft"); if (gemeinschaft) gemeinschaft.parentNode.removeChild(gemeinschaft);
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);