Uživatel:Reaperman/monobook.js
Poznámka: Po zveřejnění musíte vyprázdnit cache vašeho prohlížeče, jinak změny neuvidíte.
- Firefox / Safari: Při kliknutí na Aktualizovat držte Shift nebo stiskněte Ctrl-F5 nebo Ctrl-R (na Macu ⌘-R)
- Google Chrome: Stiskněte Ctrl-Shift-R (na Macu ⌘-Shift-R)
- Internet Explorer / Edge: Při kliknutí na Aktualizovat držte Ctrl nebo stiskněte Ctrl-F5
- Opera: Stiskněte Ctrl-F5.
/* <pre> */
/* přidaná tlačítka na edit toolbar */
mw.loader.using('mediawiki.action.edit', function () {
var button = {
id: 'button-IPA',
imageFile: '//upload.wikimedia.org/wikipedia/commons/7/77/Button_IPA.png',
speedTip: 'IPA',
tagOpen: '* {{IPA|',
tagClose: '}}',
sampleText: ''
};
mw.toolbar.addButton(
button.imageFile,
button.speedTip,
button.tagOpen,
button.tagClose,
button.sampleText,
button.id,
button.id
);
});
mw.loader.using('mediawiki.action.edit', function () {
var button = {
id: 'button-trans',
imageFile: '//upload.wikimedia.org/wikipedia/commons/6/63/Button_l_en.png',
speedTip: 'překlady',
tagOpen: '{{Překlady\n | významy = ',
tagClose: ' \n | en = \n}}',
sampleText: ''
};
mw.toolbar.addButton(
button.imageFile,
button.speedTip,
button.tagOpen,
button.tagClose,
button.sampleText,
button.id,
button.id
);
});
if( mwCustomEditButtons ) {
//IPA Šablona
mwCustomEditButtons.push({
"imageFile": "//upload.wikimedia.org/wikipedia/commons/7/77/Button_IPA.png",
"speedTip": "IPA Šablona",
"tagOpen": "* {{IPA|",
"tagClose": "}}",
"sampleText": ""
});
//Šablona pro překlad
mwCustomEditButtons.push({
"imageFile": "//upload.wikimedia.org/wikipedia/commons/6/63/Button_l_en.png",
"speedTip": "anglicky",
"tagOpen": "* {{en}}: {{P|en|",
"tagClose": "}}",
"sampleText": ""
});
//Šablona pro překlad
mwCustomEditButtons.push({
"imageFile": "//upload.wikimedia.org/wikipedia/commons/7/7c/Nihongo_button.png",
"speedTip": "japonsky",
"tagOpen": "* {{ja}}: {{P|ja|",
"tagClose": "}}",
"sampleText": ""
});
// Japonská substantiva
mwCustomEditButtons.push({
"imageFile": "//upload.wikimedia.org/wikipedia/commons/1/1d/Bouton_Vandale1.png",
"speedTip": "japonské substantivum",
"tagOpen": "* {{subst:Uživatel:Reaperman/ja-substantivum|",
"tagClose": "|rómadži|překlad}}",
"sampleText": "hiragana"
});
}
function loadScript(url)
{
var e = document.createElement("script");
e.src = url;
e.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(e);
}
//*** moveEditsection: Přesun odkazů [editovat]
/*
* moveEditsection
* Tento skript přesouvá odkazy pro editování jednotlivých sekcí ([editovat]) hned za text nadpisu.
* Skript vyžaduje povolený JavaScript.
*
* Skript je určen pro řešení problému s hromaděním odkazů [editovat] ve Firefoxu. V ostatních
* prohlížečích (například Internet Explorer) nemusí zobrazovat správně.
*
* Tento skript je převzat z německé Wikipedie.
*
* Autorem skriptu je dbenzhuser (de:Benutzer:Dbenzhuser)
*/
$(function() {
if (typeof oldEditsectionLinks != 'undefined' && oldEditsectionLinks) return;
var spans = document.getElementsByTagName("span");
for (var i=0; i<spans.length; i++) {
var span = spans[i];
if (span.className != "editsection") continue;
span.style.fontSize = "x-small";
span.style.fontWeight = "normal";
span.style.cssFloat = "none";
span.style.marginLeft = "0px";
span.parentNode.appendChild(document.createTextNode(" "));
span.parentNode.appendChild(span);
}
});
/**
* Připojí do sidebar menu za položku "Náhodné heslo" položku "Náhodné české heslo"
*
* @author Danny B.
*/
function appendRandomCzechWord() {
var nodLiRandomCzechWord = document.createElement( 'li' );
var nodARandomCzechWord = document.createElement( 'a' );
var nodTextRandomCzechWord = document.createTextNode( 'Náhodné české heslo' );
var nodLiAfterNRandompage = document.getElementById( 'n-randompage' ).nextSibling;
var nodUlPNavigation = nodLiAfterNRandompage.parentNode;
nodLiRandomCzechWord.id = 'n-randomczechword';
nodARandomCzechWord.href = 'http://toolserver.org/~erwin85/randomarticle.php?lang=cs&family=wiktionary&categories=%C4%8Ce%C5%A1tina&subcats=1&d=2';
nodARandomCzechWord.appendChild( nodTextRandomCzechWord );
nodLiRandomCzechWord.appendChild( nodARandomCzechWord );
nodUlPNavigation .insertBefore( nodLiRandomCzechWord, nodLiAfterNRandompage );
}
function customize() {
appendRandomCzechWord();
}
$( customize );
$('#catlinks a[title^="Kategorie:Monitoring:"]').parent().remove();
/* </pre> */