Užívateľ:Wizzard/monobook.js
Poznámka: Aby sa zmeny prejavili, po uložení musíte vymazať vyrovnávaciu pamäť vášho prehliadača.
- Mozilla Firefox / Safari: Držte stlačený Shift a kliknite na Reload alebo stlačte buď Ctrl-F5 alebo Ctrl-R (⌘-R na Mac)
- Google Chrome: Stlačte Ctrl-Shift-R (⌘-Shift-R na Mac)
- Internet Explorer: Držte Ctrl a kliknite na Refresh alebo stlačte Ctrl-F5
- Opera: Stlačte Ctrl-F5.
function addPurge(){
ta['ca-purge'] = ['g', 'Vymaže internú cache pre túto stránku'];
if(!document.getElementById) return;
var x = document.getElementById('ca-history');
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
if(!x) return;
if(x.children) x = x.children[0];
else x = x.childNodes[0];
addlilink(tabs, x.href.replace(/=history/, "=purge"), 'purge', 'ca-purge');
}
function vitajte(){
document.editform.wpSummary.value = 'Vitajte/Welcome ';
var txt = document.editform.wpTextbox1;
if(txt.value.length > 0) txt.value += '\n';
txt.value += '{{Vitaj}}';
txt.focus();
}
function experimenty(){
var dva = prompt("Druhýkrát?");
if(!dva) return;
document.editform.wpSummary.value = '{{Experimenty}}';
var txt = document.editform.wpTextbox1;
if(txt.value.length > 0) txt.value += '\n';
else txt.value += '{{Experimenty}}\n--~~'+'~~';
txt.focus();
}
function addlilink(tabs, url, name, id){
var na = document.createElement('a');
na.href = url;
na.id = id;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
li.appendChild(na);
tabs.appendChild(li);
return li;
}
function morelinks(){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
if(document.title.indexOf("Úprava stránky Diskusia s redaktorom") == 0){
addlilink(tabs, 'javascript:vitajte()', 'vitaj', '');
addlilink(tabs, 'javascript:experimenty()', 'exp', '');
addlilink(tabs, 'javascript:vandalizmus()', 'vandal', '');
}
}
function myLoadFuncs(){
morelinks();
}
if (window.addEventListener)
window.addEventListener("load",myLoadFuncs,false);
else if (window.attachEvent)
window.attachEvent("onload",myLoadFuncs);
else{
window._old_ABCD_onload = window.onload;
window.onload = function(){
window._old_ABCD_onload();
myLoadFuncs();
}
}