// <nowiki>
var customizeToolbar = function () {
// návod https://www.mediawiki.orghttps://wiki386.com/cs/Extension:WikiEditor/Toolbar_customization
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
'section': 'main',
'group': 'insert',
'tool': 'signature'
} );
var addToToolbar = [{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'komentář',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/f/f9/Toolbaricon_regular_S_stroke.png',
action: {
type: 'encapsulate',
options: {
pre: '<!-- ',
peri: 'komentář',
post: ' -->'
}
}
}
}
},
{
section: 'main',
group: 'insert',
tools: {
buttonId: {
label: 'podpis-alt',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a0/WikiFont_signature_icon.svg/22px-WikiFont_signature_icon.svg.png',
action: {
type: 'encapsulate',
options: {
pre: '~~~~'
}
}
}
}
},
{
section: 'main',
group: 'insert',
tools: {
buttonId: {
label: 'vítejte',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/3/33/Toolbar_welcome.png',
action: {
type: 'encapsulate',
options: {
pre: '== Vítejte ==\n{{subst:vítejte}} ~~~~'
}
}
}
}
},
{
section: 'main',
group: 'insert',
tools: {
buttonId: {
label: 'experimenty',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/c/cf/Toolbar_aviso_vec.png',
action: {
type: 'encapsulate',
options: {
pre: '== Experimenty ==\n{{subst:experimenty|',
post: '}} ~~~~'
}
}
}
}
},
{
section: 'main',
group: 'insert',
tools: {
buttonId: {
label: 'vandalismus',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/6/6c/Toolbar_anular_voto.png',
action: {
type: 'encapsulate',
options: {
pre: '== Experimenty ==\n{{subst:experimenty2|',
post: '}} ~~~~'
}
}
}
}
},
{
section: 'main',
group: 'insert',
tools: {
buttonId: {
label: 'zavsekce',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/a/a1/Toolbaricon_insert_reference_plus.png',
action: {
type: 'encapsulate',
options: {
pre: '== Odkazy ==\n=== Reference ===\n<references />\n\n=== Literatura ===\n\n\n=== Související články ===\n* ]\n* ]\n\n=== Externí odkazy ===\n* {{commonscat}}\n* \n\n{{Autoritní data}}\n\n{{Portály|',
post: '}}'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Odkaz',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/b/b7/Interlink_alt.png',
action: {
type: 'encapsulate',
options: {
pre: '[[',
peri: '',
post: ']]'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Uvozovky',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/6/65/Upper_apostrophe_toolbar_symbol.png',
action: {
type: 'encapsulate',
options: {
pre: '„',
peri: '',
post: '“'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Infobox – osoba',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/7/7d/Face_%28CoreUI_Icons_v1.0.0%29.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{infobox - osoba}}\n',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Infobox – české sídlo',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Coat_of_arms_of_the_Czech_Republic.svg/22px-Coat_of_arms_of_the_Czech_Republic.svg.png',
action: {
type: 'encapsulate',
options: {
pre: '{{infobox - české sídlo}}\n',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Infobox – sídlo světa',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/5/55/Toolbar_insert_xlink.png',
action: {
type: 'encapsulate',
options: {
pre: '{{infobox - sídlo světa}}\n',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'PočOb',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/7/70/Button_Answer_to_Life.png',
action: {
type: 'encapsulate',
options: {
pre: 'Ve městě žije {{počet obyvatel}} obyvatel',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Commonscat',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/18px-Commons-logo.svg.png',
action: {
type: 'encapsulate',
options: {
pre: '* {{commonscat}}\n',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Pevná mezera',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/5/55/Button_nbsp_1.png',
action: {
type: 'encapsulate',
options: {
pre: '',
peri: ' ',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Upravit',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/2/2e/Button_broom.png',
action: {
type: 'encapsulate',
options: {
pre: '{{upravit|',
peri: '',
post: '}}'
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Urgentně upravit',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/f/f3/Button_broom2.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Urgentně upravit}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Neověřeno',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/0/0b/Button_fuente.png',
action: {
type: 'encapsulate',
options: {
pre: '{{Neověřeno}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Aktualizovat',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Ambox_outdated_content.svg/22px-Ambox_outdated_content.svg.png',
action: {
type: 'encapsulate',
options: {
pre: '{{Aktualizovat}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Urgentně ověřit',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/b/b8/Bouton_Faut_sourcer.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Urgentně ověřit}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Významnost',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/5/50/Button_tidyman.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Významnost}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Subpahýl',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/a/a5/Button_STUB.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Subpahýl}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Přeložit',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/1/12/Toolbaricon_bold_P.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Přeložit}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Stroják',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/3/3a/Toolbaricon_bold_S.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Strojový překlad}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Fakt?',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/9/94/Button_zdroj.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Fakt}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Copyvio',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/5/58/Button_black_copyright.png',
action: {
type: 'encapsulate',
options: {
pre: '{{copyvio|zdroj=',
peri: '',
post: '}}'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Dlouhodobě polozamčeno',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Button_encrypted.png',
action: {
type: 'encapsulate',
options: {
pre: '{{Polozamčeno}}',
peri: '',
post: ''
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Vyřízeno',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/a/a0/Button_keep.png',
action: {
type: 'encapsulate',
options: {
pre: ': {{Wikipedie:Nástěnka správců/Vyřešeno}} ',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Zamítnuto',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/1/13/Button_delete.png',
action: {
type: 'encapsulate',
options: {
pre: ': {{Wikipedie:Nástěnka správců/Nevyřešeno}} ',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Spam',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/0/00/Warncreate4.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:spam}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Experimenty0',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/3/3d/EXPBT0.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Experimenty0}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Experimenty',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/b/b0/EXPBT1.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Experimenty}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Experimenty2',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/a/ae/EXPBT2.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Experimenty2}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Experimenty3',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/e/e5/EXPBT3.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Experimenty3}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Experimenty2o',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/3/3a/EXPBT2-o.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Experimenty2o}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Experimenty3o',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/c/ca/EXPBT3-o.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Experimenty3o}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Nevýznamná osoba',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Button_biocitas.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Nevýznamná osoba}}',
peri: '',
post: '~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Shrnutí',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/4/48/Deletewarn1.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Shrnutí',
peri: '',
post: '}}~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Náhled',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/b/bb/Seealso.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:Náhled',
peri: '',
post: '}}~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Experimenty na uživatelské stránce',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/4/41/Button_userandarticle.png',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:ExperimentyUP|',
peri: '',
post: '}}~~~~'
}
}
}
}
},
{
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Ping',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/4/49/Button_talk.png',
action: {
type: 'encapsulate',
options: {
pre: '{{Ping|',
peri: '',
post: '|skrýt=ano}}'
}
}
}
}
}];
addToToolbar.forEach( function ( obj ) {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', obj );
} );
};
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( .indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
mw.loader.using( 'user.options' ).then( function () {
// This can be the string "0" if the user disabled the preference (])
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor' ), $.ready
).then( customizeToolbar );
}
} );
}
//pouze pro starý editor, inspirace
mw.loader.using( 'mediawiki.action.edit', function () {
var button = {
id: 'button-comment',
imageFile: 'http://upload.wikimedia.org/wikipedia/commons/9/91/Button_cite_web.png',
speedTip: 'Citace elektronické monografie (webu)',
tagOpen: '<ref>{{Citace elektronické monografie\n | příjmení = \n | jméno = \n | odkaz na autora = \n | titul = \n | url = \n | datum vydání = \n | datum aktualizace = \n | datum přístupu = ' + (y = new Date().getFullYear ()) + '-' + (m = new Date ().getMonth () + 1) + '-' + (d = new Date ().getDate ()) + '\n| vydavatel = \n | místo = \n | jazyk = \n}}</ref>',
tagClose: '',
sampleText: ''
};
mw.toolbar.addButton( button.imageFile, button.speedTip, button.tagOpen, button.tagClose, button.sampleText, button.id, button.id );
} );
// </nowiki>