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

Z Nonsensopedii, polskiej encyklopedii humoru
 
(Nie pokazano 6 pośrednich wersji utworzonych przez tego samego użytkownika)
Linia 1: Linia 1:
/*
addOnloadHook(function(){
addOnloadHook(function(){
if(wgPageName != "Nonsensopedia:Ankiety/propozycje") return;
if(wgPageName != "Nonsensopedia:Ankiety/propozycje") return;
Linia 10: Linia 11:
var text = "";
var text = "";
}
}
});
*/


addOnloadHook(function(){
if(wgPageName.indexOf("Szablon:") != 0) return;
if(wgAction != "edit")
{
location.href+="?action=edit";
return;
}
nowytekst = document.getElementById("wpTextbox1").innerHTML.replace(/(&lt;|<)br clear=\"?all\"?\s*\/?\s*(&gt;|>)\n*/gi, "");
zmienilosie = (document.getElementById("wpTextbox1").innerHTML != nowytekst);
if(!zmienilosie) return;
document.getElementById("wpTextbox1").innerHTML = nowytekst;
document.getElementById("wpSummary").value = "Bot usuwa: <br clear=\"all\">";
document.getElementById("editform").submit();
});
});

Aktualna wersja na dzień 13:59, 4 maj 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 = "";
    }
});
*/


addOnloadHook(function(){
  if(wgPageName.indexOf("Szablon:") != 0) return; 
  if(wgAction != "edit") 
  {
    location.href+="?action=edit";
    return;
  }
  nowytekst = document.getElementById("wpTextbox1").innerHTML.replace(/(&lt;|<)br clear=\"?all\"?\s*\/?\s*(&gt;|>)\n*/gi, "");
  zmienilosie = (document.getElementById("wpTextbox1").innerHTML != nowytekst);
  if(!zmienilosie) return;
  document.getElementById("wpTextbox1").innerHTML = nowytekst;
  document.getElementById("wpSummary").value = "Bot usuwa: <br clear=\"all\">";
  document.getElementById("editform").submit();
});