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

Z Nonsensopedii, polskiej encyklopedii humoru
Linia 5: Linia 5:
for(i in h2)
for(i in h2)
{
{
if(h2[i].parentNode.getAttribute("id") == "toctitle") return;
if(h2[i].parentNode.getAttribute("id") == "toctitle") continue;
ul = h2[i].nextSibling.nextSibling; alert(ul)
ul = h2[i].nextSibling.nextSibling; alert(ul)
ul.style.backgroundColor="red"; //alert();
ul.style.backgroundColor="red"; //alert();

Wersja z 17:24, 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;
        ul = h2[i].nextSibling.nextSibling; alert(ul)
        ul.style.backgroundColor="red"; //alert();
    }
});