Użytkownik:Botyzjusz I/monobook.js: Różnice pomiędzy wersjami

Z Nonsensopedii, polskiej encyklopedii humoru
Linia 6: Linia 6:
{
{
if(h2[i].parentNode.getAttribute("id") == "toctitle") continue;
if(h2[i].parentNode.getAttribute("id") == "toctitle") continue;
ul = h2[i].nextSibling;
var ul = h2[i].nextSibling;
if(ul.nodeName == "#text") ul = ul.nextSibling;
if(ul.nodeName == "#text") ul = ul.nextSibling;
ul.style.backgroundColor="red";
var text = "";
}
}
});
});

Wersja z 17:36, 8 lut 2012

addOnloadHook(function(){
    if(wgPageName != "Nonsensopedia:Ankiety/propozycje") return;
    var content = document.getElementById("bodyContent");
    var h2 = content.getElementsByTagName("h2");
    for(i in h2)
    {
        if(h2[i].parentNode.getAttribute("id") == "toctitle") continue;
        var ul = h2[i].nextSibling;
        if(ul.nodeName == "#text") ul = ul.nextSibling; 
        var text = "";
    }
});