Użytkownik:Botyzjusz I/monobook.js: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
(ziew) |
|||
Linia 17: | Linia 17: | ||
addOnloadHook(function(){ |
addOnloadHook(function(){ |
||
if(wgPageName.indexOf("Szablon:") != 0) return; |
if(wgPageName.indexOf("Szablon:") != 0) return; |
||
if(wgAction != "edit") |
if(wgAction != "edit") |
||
{ |
|||
location.href+="?action=edit"; |
|||
return; |
|||
} |
|||
document.getElementById("wpTextbox1").innerHTML = document.getElementById("wpTextbox1").innerHTML.replace(/<br clear=\"?all\"?\s*\/?\s*>\n*/); |
|||
document.getElementById("wpSummary").value = "Bot usuwa: <br clear=\"all\">"; |
|||
document.getElementById("editform").submit(); |
|||
}); |
}); |
Wersja z 12:49, 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;
}
document.getElementById("wpTextbox1").innerHTML = document.getElementById("wpTextbox1").innerHTML.replace(/<br clear=\"?all\"?\s*\/?\s*>\n*/);
document.getElementById("wpSummary").value = "Bot usuwa: <br clear=\"all\">";
document.getElementById("editform").submit();
});