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

Z Nonsensopedii, polskiej encyklopedii humoru
M (skoro public domain, to sobie podkradnę :P)
 
M (bardziej wpienia, niż pomaga)
 
Linia 1: Linia 1:
// różne duperele mojego autorstwa, wszystko public domain

function Gra()
{
if(/Strona!/i.test(wgPageName))
{
document.getElementById('wpTextbox1').value += "\n\n[[kategoria:Gra – Multiplayer|"+wgTitle.substring(wgTitle.indexOf("Strona!/")+8, wgTitle.length)+']]';
}
else
{
document.getElementById('wpTextbox1').value += "\n\n[[kategoria:Gra|"+wgTitle.substring(wgTitle.indexOf(' ')+1, wgTitle.length)+']]';
};
};

function User()
{
document.getElementById('wpTextbox1').value = '[[Kategoria:Nonsensopedyści|Tymrym/monobook.js]]';
document.getElementById('wpSummary').value='Kategoryzacja';
};

function Hej()
{
document.getElementById('wpTextbox1').value='== Witaj! ==\n{{witaj}}\nPozdrawiam, {{Tymrym}} 21:39 (UTC) 9 marca 2010\n:Problemy? Pisz na [[User talk:Tymrym|mojej stronie dyskusji]].'+document.getElementById('wpTextbox1').value;
document.getElementById('wpSummary').value='Witamy w Nonsensopedii!';
};

addOnloadHook(function(){

if(wgAction=='edit' || wgAction=='submit')
{
if(wgCanonicalNamespace=='Gra')
{
document.getElementById('editpage-copywarn').innerHTML='<br />'+'<button onclick="Gra();" type="button"> <span style="color:red;">Wstaw kategorię Gry</span></button>'
}
else if(wgCanonicalNamespace=='User')
{
document.getElementById('editpage-copywarn').innerHTML='<br />'+'<button onclick="User();" type="button"> <span style="color:red;">Wstaw kategorię "Nonsensopedyści"</span></button>';
}
else if(wgCanonicalNamespace=='User_talk')
{
document.getElementById('editpage-copywarn').innerHTML='<br />'+'<button onclick="Hej();" type="button"> <span style="color:red;"Witajka</span></button>';
}
}
});

importScript('User:Bart-W/monobook.js');

Aktualna wersja na dzień 11:58, 15 mar 2010