MediaWiki:Common.js: Porovnání verzí
Z Franklinova expedice
m test |
m test2 |
||
| Řádek 1: | Řádek 1: | ||
/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */ | /* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */ | ||
alert( | alert(mw.toolbar); | ||
/* Vlastní tlačítka do menu */ | /* Vlastní tlačítka do menu */ | ||
Verze z 23. 6. 2018, 18:22
/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */
alert(mw.toolbar);
/* Vlastní tlačítka do menu */
if ( mw.toolbar ) {
mw.toolbar.addButton( {
imageFile: '/wiki/resources/assets/custom-icons/button-ship.png',
speedTip: 'Loď',
tagOpen: '<span class="name-ship">',
tagClose: '</span>',
sampleText: 'Jméno lodi',
imageId: 'button-ship'
} );
mw.toolbar.addButton( {
imageFile: '/wiki/resources/assets/custom-icons/button-person.png',
speedTip: 'Osoba',
tagOpen: '<span class="name-person">',
tagClose: '</span>',
sampleText: 'Jméno osoby',
imageId: 'button-person'
} );
mw.toolbar.addButton( {
imageFile: '/wiki/resources/assets/custom-icons/button-place.png',
speedTip: 'Místo',
tagOpen: '<span class="name-place">',
tagClose: '</span>',
sampleText: 'Jméno místa',
imageId: 'button-place'
} );
mw.toolbar.addButton( {
imageFile: '/wiki/resources/assets/custom-icons/button-date.png',
speedTip: 'Datum',
tagOpen: '<span class="text-date">',
tagClose: '</span>',
sampleText: 'Datum',
imageId: 'button-date'
} );
mw.toolbar.addButton( {
imageFile: '/wiki/resources/assets/custom-icons/button-en.png',
speedTip: 'English',
tagOpen: '<div lang="en">',
tagClose: '</div>',
sampleText: 'English text',
imageId: 'button-english'
} );
mw.toolbar.addButton( {
imageFile: '/wiki/resources/assets/custom-icons/button-blockquote.png',
speedTip: 'Bloková citace',
tagOpen: '<blockquote>',
tagClose: '</blockquote>',
sampleText: 'Citovaný odstavec',
imageId: 'button-blockquote'
} );
mw.toolbar.addButton( {
imageFile: '/wiki/resources/assets/custom-icons/button-quote.png',
speedTip: 'Řádková citace',
tagOpen: '<q>',
tagClose: '</q>',
sampleText: 'Citovaný text',
imageId: 'button-quote'
} );
}