Użytkownik:Absflg/monobook.js: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
(Ale ze mnie lama, blankuję Nonsensopedię...) |
|||
Linia 1: | Linia 1: | ||
//<nowiki>// |
|||
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|{{subst:PAGENAME}}]]'; |
|||
document.getElementById('wpSummary').value='Kategoryzacja'; |
|||
}; |
|||
function Hej(){ |
|||
document.getElementById('wpTextbox1').value='== Hej! ==\n{{witaj}}\nPozdrawiam, {{Vae}} {{subst:CURRENTTIME}} (UTC) {{subst:CURRENTDAY}} {{subst:CURRENTMONTHNAMEGEN}} {{subst:CURRENTYEAR}}\n:PS W razie problemów lub pytań, [[User talk:Vae|napisz!]]'+document.getElementById('wpTextbox1').value; |
|||
document.getElementById('wpSummary').value='Witamy w Nonsensopedii!'; |
|||
}; |
|||
function a_edit(){ |
|||
switch(wgCanonicalNamespace){ |
|||
case 'Gra': |
|||
Przycisk_gra = '<button onclick="Gra()" type="button"> <span style="color:red;">Wstaw kategorię gry</span></button>'; |
|||
break; |
|||
case 'User': |
|||
Przycisk_gra = '<button onclick="User()" type="button"> <span style="color:red;">Kategoryzuj stronę użytkownika</span></button>'; |
|||
break; |
|||
case 'User_talk': |
|||
Przycisk_gra = '<button onclick="Hej()" type="button"> <span style="color:red;">Powitaj nowicjusza</span></button>'; |
|||
break; |
|||
default: |
|||
Przycisk_gra = ' '; |
|||
}; |
|||
document.getElementById('editpage-copywarn').innerHTML='<br />'+Przycisk_gra; |
|||
SK_przycisk = document.createElement('a'); |
|||
document.getElementById('editOptions').appendChild(SK_przycisk); |
|||
SK_przycisk.innerHTML='SK'; |
|||
SK_przycisk.style.border='1px dotted gray'; |
|||
SK_przycisk.onclick=function(){ |
|||
SK_.start(); |
|||
}; |
|||
SK_formularz = document.createElement('input'); |
|||
document.getElementById('editOptions').appendChild(SK_formularz); |
|||
SK_formularz.type='text'; |
|||
SK_formularz.size=25; |
|||
SK_formularz.id='__SK_formularz'; |
|||
SK_formularz1 = document.createElement('input'); |
|||
document.getElementById('editOptions').appendChild(SK_formularz1); |
|||
SK_formularz1.type='text'; |
|||
SK_formularz1.value='gi'; |
|||
SK_formularz1.size=5; |
|||
SK_formularz1.id='__SK_formularz1'; |
|||
SK_formularz2 = document.createElement('input'); |
|||
document.getElementById('editOptions').appendChild(SK_formularz2); |
|||
SK_formularz2.type='text'; |
|||
SK_formularz2.size=15; |
|||
SK_formularz2.id='__SK_formularz2'; |
|||
SK_przycisk2 = document.createElement('a'); |
|||
document.getElementById('editOptions').appendChild(SK_przycisk2); |
|||
SK_przycisk2.innerHTML='dodaj wyrażenie'; |
|||
SK_przycisk2.style.border='1px dotted gray'; |
|||
SK_przycisk2.onclick=function(){ |
|||
regeksp=new RegExp(document.getElementById("__SK_formularz").value,document.getElementById("__SK_formularz1").value); |
|||
SK_.dodaj(regeksp,document.getElementById("__SK_formularz2").value); |
|||
document.getElementById("__SK_formularz").value=document.getElementById("__SK_formularz2").value=""; |
|||
}; |
|||
return null; |
|||
} |
|||
//</nowiki> |