Wikipedista:Mercy/common.js: Porovnání verzí

Z Wikipedie, otevřené encyklopedie
Smazaný obsah Přidaný obsah
m úprava protokolů
updated scripts, migrated deprecated functions
Řádek 1: Řádek 1:
/*************
/**
* StewardScript extends the user interface for Wikimedia stewards' convenience.
*** StewardScript
*** by [[m:user:Pathoschild]] <https://meta.wikimedia.org/wiki/User:Pathoschild/Scripts/StewardScript>
* @see https://meta.wikimedia.org/wiki/StewardScript
* @update-token [[File:pathoschild/stewardscript.js]]
*************/
*/
importScriptURI('https://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/StewardScript.js&action=raw&ctype=text/javascript');
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js');


/*************
/**
*** Ajax sysop
* Ajax sysop
*** by [[m:user:Pathoschild]] <https://meta.wikimedia.org/wiki/User:Pathoschild/Scripts/Ajax_sysop>
* @see https://github.com/Pathoschild/Wikimedia-contrib#user-scripts
* @update-token [[File:pathoschild/ajaxsysop.js]]
*************/
*/
importScriptURI('//meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Ajax_sysop.js&action=raw&ctype=text/javascript');
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');


// [[:en:User:Lupin/popups.js]]
// [[:en:User:Lupin/popups.js]]

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript');
document.write('<script type="text/javascript" src="'
+ 'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');


//Mass rollback function
//Mass rollback function
Řádek 22: Řádek 22:
//Instructions: Selecting the "rollback all" tab when viewing a user's contributions history
//Instructions: Selecting the "rollback all" tab when viewing a user's contributions history
//will open all rollback links displayed there. (Use with caution)
//will open all rollback links displayed there. (Use with caution)

function rollbackEverythingButton() {
function rollbackEverythingButton() {
var hasRollback = getElementsByClassName(document, "span", "mw-rollback-link");
var hasRollback = $('span.mw-rollback-link').get();
if (hasRollback[0] && (document.title.indexOf("Příspěvky uživatele") != -1) ) {
if (hasRollback[0] && (document.title.indexOf("Příspěvky uživatele") != -1) ) {
addPortletLink('p-cactions', 'javascript:rollbackEverything()', "vrátit vše", "ca-rollbackeverything", "vrátit všechny zde uvedené editace");
mw.util.addPortletLink('p-cactions', 'javascript:rollbackEverything()', "vrátit vše", "ca-rollbackeverything", "vrátit všechny zde uvedené editace");
}
}
}
}
addOnloadHook(rollbackEverythingButton);
$(rollbackEverythingButton);
function rollbackEverything() {
function rollbackEverything() {
for (var i in document.links) {
for (var i in document.links) {
Řádek 39: Řádek 39:


// --------- custom edit toolbar ---------
// --------- custom edit toolbar ---------
$('#wpTextbox1').wikiEditor('addToToolbar', {
if (mwCustomEditButtons) {
section: 'main',
mwCustomEditButtons[mwCustomEditButtons.length] = {
group: 'format',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/3/3a/Button_av-img.png",
tools: {
"speedTip": "Požadavek na obrázek",
'custom-Požadavek na obrázek': {
"tagOpen": "\x7b\x7bPožadavek na obrázek}}",
label: 'Požadavek na obrázek',
"tagClose": "",
type: 'button',
"sampleText": ""};
icon: '//upload.wikimedia.org/wikipedia/commons/3/3a/Button_av-img.png',
mwCustomEditButtons[mwCustomEditButtons.length] = {
action: {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/8/83/Button_biocitas.png",
type: 'encapsulate',
"speedTip": "Pahýl - biografie",
options: {
"tagOpen": "\x7b\x7bPahýl - biografie}}",
pre: '\x7b\x7bPožadavek na obrázek}}',
"tagClose": "",
post: '',
"sampleText": ""};
sampleText: ''
mwCustomEditButtons[mwCustomEditButtons.length] = {
}
"imageFile": "//upload.wikimedia.org/wikipedia/commons/b/b4/Button_category03.png",
}
"speedTip": "Kategorie",
},
"tagOpen": "[[Kategorie:",
'custom-Pahýl - biografie': {
"tagClose": "]]",
label: 'Pahýl - biografie',
"sampleText": ""};
type: 'button',
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/6/6d/Button_exclamation_1.png",
icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Button_biocitas.png',
action: {
"speedTip": "Subpahýl",
type: 'encapsulate',
"tagOpen": "\x7b\x7bsubst:Subpahýl",
options: {
"tagClose": "}}",
pre: '\x7b\x7bPahýl - biografie}}',
"sampleText": ""};
post: '',
mwCustomEditButtons[mwCustomEditButtons.length] = {
sampleText: ''
"imageFile": "//upload.wikimedia.org/wikipedia/commons/3/33/Button_exclamation.png",
}
"speedTip": "Copyvio",
}
"tagOpen": "\x7b\x7bCopyvio|zdroj=",
},
"tagClose": "}}",
'custom-Kategorie': {
"sampleText": ""};
label: 'Kategorie',
mwCustomEditButtons[mwCustomEditButtons.length] = {
type: 'button',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/0/02/Button_fuente_primaria.png",
icon: '//upload.wikimedia.org/wikipedia/commons/b/b4/Button_category03.png',
"speedTip": "Upravit",
action: {
"tagOpen": "\x7b\x7bUpravit",
type: 'encapsulate',
"tagClose": "}}",
options: {
"sampleText": ""};
pre: '[[Kategorie:',
mwCustomEditButtons[mwCustomEditButtons.length] = {
post: ']]',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/2/22/Button_radio_activite.png",
sampleText: ''
"speedTip": "Urgentně upravit",
}
"tagOpen": "\x7b\x7bsubst:Urgentně upravit",
}
"tagClose": "}}",
},
"sampleText": ""};
'custom-Subpahýl': {
mwCustomEditButtons[mwCustomEditButtons.length] = {
label: 'Subpahýl',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/0/0b/Button_fuente.png",
type: 'button',
"speedTip": "Urgentně ověřit",
icon: '//upload.wikimedia.org/wikipedia/commons/6/6d/Button_exclamation_1.png',
"tagOpen": "\x7b\x7bsubst:Urgentně ověřit",
action: {
"tagClose": "}}",
type: 'encapsulate',
"sampleText": ""};
options: {
mwCustomEditButtons[mwCustomEditButtons.length] = {
pre: '\x7b\x7bsubst:Subpahýl',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/3/33/Button_unreferenced.png",
post: '}}',
"speedTip": "Chybí zdroj",
sampleText: ''
"tagOpen": "\x7b\x7bsubst:Fakt",
}
"tagClose": "}}",
}
"sampleText": ""};
},
mwCustomEditButtons[mwCustomEditButtons.length] = {
'custom-Copyvio': {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a9/Button_tournesol.png",
label: 'Copyvio',
"speedTip": "Uvítání",
type: 'button',
"tagOpen": "\x7b\x7bsubst:Vítejte",
icon: '//upload.wikimedia.org/wikipedia/commons/3/33/Button_exclamation.png',
"tagClose": "}} Přeji Vám pěkný den a těším se na Vaše další příspěvky! --\x7E\x7E\x7E\x7E",
action: {
"sampleText": ""};
type: 'encapsulate',
mwCustomEditButtons[mwCustomEditButtons.length] = {
options: {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/e/e3/Button_bienvenido.png",
pre: '\x7b\x7bCopyvio|zdroj=',
"speedTip": "Anonym",
post: '}}',
"tagOpen": "\x7b\x7bsubst:Anon",
sampleText: ''
"tagClose": "}}Přeji Vám pěkný den a těším se na Vaše další příspěvky! --\x7E\x7E\x7E\x7E",
}
"sampleText": ""};
}
mwCustomEditButtons[mwCustomEditButtons.length] = {
},
"imageFile": "//upload.wikimedia.org/wikipedia/commons/c/cb/Button_Nuvola_apps_ksirc.png",
'custom-Upravit': {
"speedTip": "Welcome",
label: 'Upravit',
"tagOpen": "\x7b\x7bsubst:Welcome",
type: 'button',
"tagClose": "}} With kind regards, --\x7E\x7E\x7E\x7E",
icon: '//upload.wikimedia.org/wikipedia/commons/0/02/Button_fuente_primaria.png',
"sampleText": ""};
action: {
mwCustomEditButtons[mwCustomEditButtons.length] = {
type: 'encapsulate',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/4/4b/Button_nbsp.png",
options: {
"speedTip": "Nedělitelná mezera",
pre: '\x7b\x7bUpravit',
"tagOpen": "&nbsp;",
post: '}}',
"tagClose": "",
"sampleText": ""};
sampleText: ''
}
mwCustomEditButtons[mwCustomEditButtons.length] = {
}
"imageFile": "//upload.wikimedia.org/wikipedia/commons/4/42/Buttonsablona.png",
},
"speedTip": "Šablona",
'custom-Urgentně upravit': {
"tagOpen": "\x7b\x7bTl|",
label: 'Urgentně upravit',
"tagClose": "}}",
type: 'button',
"sampleText": ""};
icon: '//upload.wikimedia.org/wikipedia/commons/2/22/Button_radio_activite.png',
mwCustomEditButtons[mwCustomEditButtons.length] = {
action: {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/3/3d/EXPBT0.png",
type: 'encapsulate',
"speedTip": "Experimenty0",
options: {
"tagOpen": "\x7b\x7bExperimenty0}} S přáním pěkného dne --\x7E\x7E\x7E\x7E",
pre: '\x7b\x7bsubst:Urgentně upravit',
"tagClose": "",
post: '}}',
"sampleText": ""};
sampleText: ''
mwCustomEditButtons[mwCustomEditButtons.length] = {
}
"imageFile": "//upload.wikimedia.org/wikipedia/commons/b/b0/EXPBT1.png",
}
"speedTip": "Experimenty",
},
"tagOpen": "\x7b\x7bExperimenty}} --\x7E\x7E\x7E\x7E",
'custom-Urgentně ověřit': {
"tagClose": "",
label: 'Urgentně ověřit',
"sampleText": ""};
type: 'button',
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/a/ae/EXPBT2.png",
icon: '//upload.wikimedia.org/wikipedia/commons/0/0b/Button_fuente.png',
action: {
"speedTip": "Experimenty2",
type: 'encapsulate',
"tagOpen": "\x7b\x7bExperimenty2}} --\x7E\x7E\x7E\x7E",
options: {
"tagClose": "",
pre: '\x7b\x7bsubst:Urgentně ověřit',
"sampleText": ""};
post: '}}',
mwCustomEditButtons[mwCustomEditButtons.length] = {
sampleText: ''
"imageFile": "//upload.wikimedia.org/wikipedia/commons/3/3a/EXPBT2-o.png",
}
"speedTip": "Experimenty2o",
}
"tagOpen": "\x7b\x7bExperimenty2o}} --\x7E\x7E\x7E\x7E",
},
"tagClose": "",
'custom-Chybí zdroj': {
"sampleText": ""};
label: 'Chybí zdroj',
mwCustomEditButtons[mwCustomEditButtons.length] = {
type: 'button',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/e/e5/EXPBT3.png",
icon: '//upload.wikimedia.org/wikipedia/commons/3/33/Button_unreferenced.png',
"speedTip": "Experimenty3",
action: {
"tagOpen": "\x7b\x7bExperimenty3}} --\x7E\x7E\x7E\x7E",
type: 'encapsulate',
"tagClose": "",
options: {
"sampleText": ""};
pre: '\x7b\x7bsubst:Fakt',
mwCustomEditButtons[mwCustomEditButtons.length] = {
post: '}}',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/e/e9/Button_preview.png",
sampleText: ''
"speedTip": "Náhled",
}
"tagOpen": "\x7b\x7bsubst:Náhled}} S přáním pěkného dne --\x7E\x7E\x7E\x7E",
}
"tagClose": "",
},
"sampleText": ""};
'custom-Uvítání': {
mwCustomEditButtons[mwCustomEditButtons.length] = {
label: 'Uvítání',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png",
type: 'button',
"speedTip": "Spam",
icon: '//upload.wikimedia.org/wikipedia/commons/a/a9/Button_tournesol.png',
"tagOpen": "\x7b\x7bsubst:Spam}} S přáním pěkného dne --\x7E\x7E\x7E\x7E",
action: {
"tagClose": "",
type: 'encapsulate',
"sampleText": ""};
options: {
mwCustomEditButtons[mwCustomEditButtons.length] = {
pre: '\x7b\x7bsubst:Vítejte',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/9/9a/Button_references.png",
post: '}} Přeji Vám pěkný den a těším se na Vaše další příspěvky! --\x7E\x7E\x7E\x7E',
"speedTip": "Významnost",
sampleText: ''
"tagOpen": "\x7b\x7bsubst:Významnost",
}
"tagClose": "}}",
}
"sampleText": ""};
},
mwCustomEditButtons [mwCustomEditButtons.length] = {
'custom-Anonym': {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/e/e4/Warn2.png",
label: 'Anonym',
"speedTip": "Komentář POV",
type: 'button',
"tagOpen": "\x7b\x7bsubst:KomentářPOV",
icon: '//upload.wikimedia.org/wikipedia/commons/e/e3/Button_bienvenido.png',
"tagClose": "}} S přáním pěkného dne --\x7e\x7e\x7e\x7e",
action: {
"sampleText": ""};
type: 'encapsulate',
mwCustomEditButtons [mwCustomEditButtons.length] = {
options: {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/8/84/Warn3.png",
pre: '\x7b\x7bsubst:Anon',
"speedTip": "subst:KomentářPOV2",
post: '}}Přeji Vám pěkný den a těším se na Vaše další příspěvky! --\x7E\x7E\x7E\x7E',
"tagOpen": "\x7b\x7bKomentářPOV2",
sampleText: ''
"tagClose": "}} --\x7e\x7e\x7e\x7e",
}
"sampleText": ""};
}
mwCustomEditButtons[mwCustomEditButtons.length] = {
},
"imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2e/Button_broom.png",
'custom-Welcome': {
"speedTip": "Smazaný článek",
label: 'Welcome',
"tagOpen": "\x7b\x7bsubst:Nevýznamné}}--\x7e\x7e\x7e\x7e",
type: 'button',
"tagClose": "",
icon: '//upload.wikimedia.org/wikipedia/commons/c/cb/Button_Nuvola_apps_ksirc.png',
"sampleText": ""};
action: {
mwCustomEditButtons [mwCustomEditButtons.length] = {
type: 'encapsulate',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
options: {
"speedTip": "Vtípek",
"tagOpen": "\x7b\x7bsubst:Vtip}} --\x7e\x7e\x7e\x7e",
pre: '\x7b\x7bsubst:Welcome',
post: '}} With kind regards, --\x7E\x7E\x7E\x7E',
"tagClose": "",
"sampleText": ""};
sampleText: ''
}
mwCustomEditButtons [mwCustomEditButtons.length] = {
}
"imageFile": "//upload.wikimedia.org/wikipedia/commons/9/91/Button_cite_web.png",
},
"speedTip": "Citace elektronické monografie (citace webu, např. Valka.cz, Antika.avonet.cz)",
'custom-Nedělitelná mezera': {
"tagOpen": "\x7b\x7bCitace 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}}",
label: 'Nedělitelná mezera',
"tagClose": "",
type: 'button',
"sampleText": ""};
icon: '//upload.wikimedia.org/wikipedia/commons/4/4b/Button_nbsp.png',
mwCustomEditButtons [mwCustomEditButtons.length] = {
action: {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2c/Button_cite_news.png",
type: 'encapsulate',
"speedTip": "Citace elektronického periodika (citace online zpravodajství, např. Aktuálně.cz, Novinky.cz)",
options: {
"tagOpen": "\x7b\x7bCitace elektronického periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \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 | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}",
pre: '&nbsp;',
"tagClose": "",
post: '',
"sampleText": ""};
sampleText: ''
mwCustomEditButtons [mwCustomEditButtons.length] = {
}
"imageFile": "//upload.wikimedia.org/wikipedia/commons/4/49/Button_cite_journal.png",
}
"speedTip": "Citace periodika (citace novin, časopisu)",
},
"tagOpen": "\x7b\x7bCitace periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | rok = \n | měsíc = \n | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}",
'custom-Šablona': {
"tagClose": "",
label: 'Šablona',
"sampleText": ""};
type: 'button',
mwCustomEditButtons [mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/e/ef/Button_cite_book.png",
icon: '//upload.wikimedia.org/wikipedia/commons/4/42/Buttonsablona.png',
action: {
"speedTip": "Citace monografie (citace knihy)",
type: 'encapsulate',
"tagOpen": "\x7b\x7bCitace monografie\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n | rok = \n | titul = \n | vydavatel = \n | místo = \n | stránky = \n | poznámka = \n | isbn = \n}}",
options: {
"tagClose": "",
pre: '\x7b\x7bTl|',
"sampleText": ""};
post: '}}',
mwCustomEditButtons[mwCustomEditButtons.length] = {
sampleText: ''
"imageFile": "//upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png",
}
"speedTip": "Commons",
}
"tagOpen": "\x7b\x7bCommonscat|",
},
"tagClose": "}}",
'custom-Experimenty0': {
"sampleText": ""};
label: 'Experimenty0',
mwCustomEditButtons[mwCustomEditButtons.length] = {
type: 'button',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/9/9f/Button_defaultsort.png",
icon: '//upload.wikimedia.org/wikipedia/commons/3/3d/EXPBT0.png',
"speedTip": "Defaultsort",
action: {
"tagOpen": "\x7b\x7bDEFAULTSORT:",
type: 'encapsulate',
"tagClose": "}}",
options: {
"sampleText": ""};
pre: '\x7b\x7bExperimenty0}} S přáním pěkného dne --\x7E\x7E\x7E\x7E',
mwCustomEditButtons[mwCustomEditButtons.length] = {
post: '',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/1/16/Button_fairuse.png",
sampleText: ''
"speedTip": "Potvrzení OTRS",
}
"tagOpen": "\x7b\x7bPotvrzení OTRS|otrs=",
}
"tagClose": "|materiál=}}",
},
"sampleText": ""};
'custom-Experimenty': {
mwCustomEditButtons[mwCustomEditButtons.length] = {
label: 'Experimenty',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/9/9a/Button_wiktionary.png",
type: 'button',
"speedTip": "Pískoviště",
icon: '//upload.wikimedia.org/wikipedia/commons/b/b0/EXPBT1.png',
"tagOpen": "\x7b\x7bsubst:Pískoviště",
action: {
"tagClose": "}} --\x7e\x7e\x7e\x7e",
type: 'encapsulate',
"sampleText": ""};
options: {
mwCustomEditButtons[mwCustomEditButtons.length] = {
pre: '\x7b\x7bExperimenty}} --\x7E\x7E\x7E\x7E',
"imageFile": "//upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png",
post: '',
"speedTip": "Pískoviště",
sampleText: ''
"tagOpen": "\x7b\x7bNepodepsáno|",
}
"tagClose": "}}",
}
"sampleText": ""};
},
mwCustomEditButtons[mwCustomEditButtons.length] = {
'custom-Experimenty2': {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/1/1b/Button_hide_wiki_tag.png",
label: 'Experimenty2',
"speedTip": "Skrytý text",
type: 'button',
"tagOpen": "<!--",
icon: '//upload.wikimedia.org/wikipedia/commons/a/ae/EXPBT2.png',
"tagClose": "-->",
action: {
"sampleText": ""};
type: 'encapsulate',
mwCustomEditButtons[mwCustomEditButtons.length] = {
options: {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/4/41/Button_hr_halfwidth.png",
pre: '\x7b\x7bExperimenty2}} --\x7E\x7E\x7E\x7E',
"speedTip": "Pomlčka",
post: '',
"tagOpen": "–",
sampleText: ''
"tagClose": "",
}
"sampleText": ""};
}
mwCustomEditButtons[mwCustomEditButtons.length] = {
},
"imageFile": "//upload.wikimedia.org/wikipedia/commons/2/23/Quotes-Lithuanian.png",
'custom-Experimenty2o': {
"speedTip": "Uvozovky",
label: 'Experimenty2o',
"tagOpen": "\„",
type: 'button',
"tagClose": "\“",
icon: '//upload.wikimedia.org/wikipedia/commons/3/3a/EXPBT2-o.png',
"sampleText": ""};
action: {
};
type: 'encapsulate',
options: {
pre: '\x7b\x7bExperimenty2o}} --\x7E\x7E\x7E\x7E',
post: '',
sampleText: ''
}
}
},
'custom-Experimenty3': {
label: 'Experimenty3',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/e/e5/EXPBT3.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bExperimenty3}} --\x7E\x7E\x7E\x7E',
post: '',
sampleText: ''
}
}
},
'custom-Náhled': {
label: 'Náhled',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/e/e9/Button_preview.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bsubst:Náhled}} S přáním pěkného dne --\x7E\x7E\x7E\x7E',
post: '',
sampleText: ''
}
}
},
'custom-Spam': {
label: 'Spam',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bsubst:Spam}} S přáním pěkného dne --\x7E\x7E\x7E\x7E',
post: '',
sampleText: ''
}
}
},
'custom-Významnost': {
label: 'Významnost',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/9/9a/Button_references.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bsubst:Významnost',
post: '}}',
sampleText: ''
}
}
},
'custom-Komentář POV': {
label: 'Komentář POV',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/e/e4/Warn2.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bsubst:KomentářPOV',
post: '}} S přáním pěkného dne --\x7e\x7e\x7e\x7e',
sampleText: ''
}
}
},
'custom-subst:KomentářPOV2': {
label: 'subst:KomentářPOV2',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/8/84/Warn3.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bKomentářPOV2',
post: '}} --\x7e\x7e\x7e\x7e',
sampleText: ''
}
}
},
'custom-Smazaný článek': {
label: 'Smazaný článek',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/2/2e/Button_broom.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bsubst:Nevýznamné}}--\x7e\x7e\x7e\x7e',
post: '',
sampleText: ''
}
}
},
'custom-Vtípek': {
label: 'Vtípek',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bsubst:Vtip}} --\x7e\x7e\x7e\x7e',
post: '',
sampleText: ''
}
}
},
'custom-Citace elektronické monografie (citace webu, např. Valka.cz, Antika.avonet.cz)': {
label: 'Citace elektronické monografie (citace webu, např. Valka.cz, Antika.avonet.cz)',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/9/91/Button_cite_web.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bCitace 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}}',
post: '',
sampleText: ''
}
}
},
'custom-Citace elektronického periodika (citace online zpravodajství, např. Aktuálně.cz, Novinky.cz)': {
label: 'Citace elektronického periodika (citace online zpravodajství, např. Aktuálně.cz, Novinky.cz)',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/2/2c/Button_cite_news.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bCitace elektronického periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \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 | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}',
post: '',
sampleText: ''
}
}
},
'custom-Citace periodika (citace novin, časopisu)': {
label: 'Citace periodika (citace novin, časopisu)',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/4/49/Button_cite_journal.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bCitace periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | rok = \n | měsíc = \n | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}',
post: '',
sampleText: ''
}
}
},
'custom-Citace monografie (citace knihy)': {
label: 'Citace monografie (citace knihy)',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/e/ef/Button_cite_book.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bCitace monografie\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n | rok = \n | titul = \n | vydavatel = \n | místo = \n | stránky = \n | poznámka = \n | isbn = \n}}',
post: '',
sampleText: ''
}
}
},
'custom-Commons': {
label: 'Commons',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bCommonscat|',
post: '}}',
sampleText: ''
}
}
},
'custom-Defaultsort': {
label: 'Defaultsort',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/9/9f/Button_defaultsort.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bDEFAULTSORT:',
post: '}}',
sampleText: ''
}
}
},
'custom-Potvrzení OTRS': {
label: 'Potvrzení OTRS',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/1/16/Button_fairuse.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bPotvrzení OTRS|otrs=',
post: '|materiál=}}',
sampleText: ''
}
}
},
'custom-Pískoviště': {
label: 'Pískoviště',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/9/9a/Button_wiktionary.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bsubst:Pískoviště',
post: '}} --\x7e\x7e\x7e\x7e',
sampleText: ''
}
}
},
'custom-Pískoviště': {
label: 'Pískoviště',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png',
action: {
type: 'encapsulate',
options: {
pre: '\x7b\x7bNepodepsáno|',
post: '}}',
sampleText: ''
}
}
},
'custom-Skrytý text': {
label: 'Skrytý text',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/1/1b/Button_hide_wiki_tag.png',
action: {
type: 'encapsulate',
options: {
pre: '<!--',
post: '-->',
sampleText: ''
}
}
},
'custom-Pomlčka': {
label: 'Pomlčka',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/4/41/Button_hr_halfwidth.png',
action: {
type: 'encapsulate',
options: {
pre: '–',
post: '',
sampleText: ''
}
}
},
'custom-Uvozovky': {
label: 'Uvozovky',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/2/23/Quotes-Lithuanian.png',
action: {
type: 'encapsulate',
options: {
pre: '\„',
post: '\“',
sampleText: ''
}
}
}
}
});


// Adds a drop-down menu to the search box to choose the namespace to search in.
// Adds a drop-down menu to the search box to choose the namespace to search in.

addOnloadHook(function () {
$(function () {
var searchGoButton = document.getElementById('searchGoButton');
var searchGoButton = document.getElementById('searchGoButton');
if (!searchGoButton) return;
if (!searchGoButton) return;

var searchNsHidden = document.createElement('input');
var searchNsHidden = document.createElement('input');
searchNsHidden.id = 'searchNsHidden';
searchNsHidden.id = 'searchNsHidden';
Řádek 281: Řádek 551:
searchNsHidden.name = 'ns0';
searchNsHidden.name = 'ns0';
searchNsHidden.value = '1';
searchNsHidden.value = '1';

var searchNsMenu = document.createElement('select');
var searchNsMenu = document.createElement('select');
searchNsMenu.id = 'searchNsMenu';
searchNsMenu.id = 'searchNsMenu';
Řádek 304: Řádek 574:
searchNsMenu.options[searchNsMenu.options.length] = new Option('Portál diskuse', 101);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Portál diskuse', 101);
searchNsMenu.onchange = function () {
searchNsMenu.onchange = function () {
searchNsHidden.name = 'ns' + (this.selectedIndex < 0 ? '0' :
searchNsHidden.name = 'ns' + (this.selectedIndex < 0 ? '0' :
this.options[this.selectedIndex].value);
this.options[this.selectedIndex].value);
};
};
Řádek 317: Řádek 587:
/*
/*
=== Osobní pískoviště ===
=== Osobní pískoviště ===

; autor: [[pl:Wikipedysta:Herr Kriss]]
; autor: [[pl:Wikipedysta:Herr Kriss]]
*/
*/

var disableSandboxLink = 0; // ustawienie tego na 1 lub true w swoim monobook.js pozwoli wyłączyć tę funkcjonalność
var disableSandboxLink = 0; // ustawienie tego na 1 lub true w swoim monobook.js pozwoli wyłączyć tę funkcjonalność

addOnloadHook(function()
$(function()
{
{
if (wgUserName != null && disableSandboxLink == 0)
if (mw.config.get('wgUserName') != null && disableSandboxLink == 0)
{
{
var caption = 'Moje pískoviště'
var caption = 'Moje pískoviště'
if (wgUserLanguage != 'cs')
if (mw.config.get('wgUserLanguage') != 'cs')
caption = 'My sandbox';
caption = 'My sandbox';

addPortletLink('p-personal', wgServer + wgScript + '?title=Wikipedista:Mercy/Pískoviště', caption, 'pt-sandbox', caption, '', document.getElementById('pt-preferences'));
mw.util.addPortletLink('p-personal', mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=Wikipedista:Mercy/Pískoviště', caption, 'pt-sandbox', caption, '', document.getElementById('pt-preferences'));
}
}
});
});

Verze z 25. 3. 2015, 04:28

/**
 * StewardScript extends the user interface for Wikimedia stewards' convenience.
 * @see https://meta.wikimedia.org/wiki/StewardScript
 * @update-token [[File:pathoschild/stewardscript.js]]
 */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js');

/**
 * Ajax sysop
 * @see https://github.com/Pathoschild/Wikimedia-contrib#user-scripts
 * @update-token [[File:pathoschild/ajaxsysop.js]]
 */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');

// [[:en:User:Lupin/popups.js]]

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript');

//Mass rollback function
//Written by John254
//Adapted from User:Mr.Z-man/rollbackSummary.js
//Instructions: Selecting the "rollback all" tab when viewing a user's contributions history
//will open all rollback links displayed there. (Use with caution)

function rollbackEverythingButton() {
  var hasRollback = $('span.mw-rollback-link').get();
  if (hasRollback[0] && (document.title.indexOf("Příspěvky uživatele") != -1) ) {
    mw.util.addPortletLink('p-cactions', 'javascript:rollbackEverything()', "vrátit vše", "ca-rollbackeverything", "vrátit všechny zde uvedené editace");
  }
}
$(rollbackEverythingButton);
function rollbackEverything() {
    for (var i in document.links) {
      if (document.links[i].href.indexOf('action=rollback') != -1) {
        window.open(document.links[i].href);
      }
    }
}

// --------- custom edit toolbar ---------
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'main',
	group: 'format',
	tools: {
		'custom-Požadavek na obrázek': {
			label: 'Požadavek na obrázek',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/3/3a/Button_av-img.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bPožadavek na obrázek}}',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Pahýl - biografie': {
			label: 'Pahýl - biografie',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Button_biocitas.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bPahýl - biografie}}',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Kategorie': {
			label: 'Kategorie',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/b/b4/Button_category03.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[Kategorie:',
					post: ']]',
					sampleText: ''
				}
			}
		},
		'custom-Subpahýl': {
			label: 'Subpahýl',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/6/6d/Button_exclamation_1.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Subpahýl',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Copyvio': {
			label: 'Copyvio',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/3/33/Button_exclamation.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bCopyvio|zdroj=',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Upravit': {
			label: 'Upravit',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/0/02/Button_fuente_primaria.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bUpravit',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Urgentně upravit': {
			label: 'Urgentně upravit',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/2/22/Button_radio_activite.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Urgentně upravit',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Urgentně ověřit': {
			label: 'Urgentně ověřit',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/0/0b/Button_fuente.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Urgentně ověřit',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Chybí zdroj': {
			label: 'Chybí zdroj',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/3/33/Button_unreferenced.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Fakt',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Uvítání': {
			label: 'Uvítání',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/a/a9/Button_tournesol.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Vítejte',
					post: '}} Přeji Vám pěkný den a těším se na Vaše další příspěvky! --\x7E\x7E\x7E\x7E',
					sampleText: ''
				}
			}
		},
		'custom-Anonym': {
			label: 'Anonym',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/e/e3/Button_bienvenido.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Anon',
					post: '}}Přeji Vám pěkný den a těším se na Vaše další příspěvky! --\x7E\x7E\x7E\x7E',
					sampleText: ''
				}
			}
		},
		'custom-Welcome': {
			label: 'Welcome',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/c/cb/Button_Nuvola_apps_ksirc.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Welcome',
					post: '}} With kind regards, --\x7E\x7E\x7E\x7E',
					sampleText: ''
				}
			}
		},
		'custom-Nedělitelná mezera': {
			label: 'Nedělitelná mezera',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/4/4b/Button_nbsp.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '&nbsp;',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Šablona': {
			label: 'Šablona',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/4/42/Buttonsablona.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bTl|',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Experimenty0': {
			label: 'Experimenty0',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/3/3d/EXPBT0.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bExperimenty0}} S přáním pěkného dne --\x7E\x7E\x7E\x7E',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Experimenty': {
			label: 'Experimenty',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/b/b0/EXPBT1.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bExperimenty}} --\x7E\x7E\x7E\x7E',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Experimenty2': {
			label: 'Experimenty2',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/a/ae/EXPBT2.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bExperimenty2}} --\x7E\x7E\x7E\x7E',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Experimenty2o': {
			label: 'Experimenty2o',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/3/3a/EXPBT2-o.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bExperimenty2o}} --\x7E\x7E\x7E\x7E',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Experimenty3': {
			label: 'Experimenty3',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/e/e5/EXPBT3.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bExperimenty3}} --\x7E\x7E\x7E\x7E',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Náhled': {
			label: 'Náhled',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/e/e9/Button_preview.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Náhled}} S přáním pěkného dne --\x7E\x7E\x7E\x7E',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Spam': {
			label: 'Spam',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Spam}} S přáním pěkného dne --\x7E\x7E\x7E\x7E',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Významnost': {
			label: 'Významnost',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/9/9a/Button_references.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Významnost',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Komentář POV': {
			label: 'Komentář POV',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/e/e4/Warn2.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:KomentářPOV',
					post: '}} S přáním pěkného dne --\x7e\x7e\x7e\x7e',
					sampleText: ''
				}
			}
		},
		'custom-subst:KomentářPOV2': {
			label: 'subst:KomentářPOV2',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/8/84/Warn3.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bKomentářPOV2',
					post: '}} --\x7e\x7e\x7e\x7e',
					sampleText: ''
				}
			}
		},
		'custom-Smazaný článek': {
			label: 'Smazaný článek',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/2/2e/Button_broom.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Nevýznamné}}--\x7e\x7e\x7e\x7e',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Vtípek': {
			label: 'Vtípek',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Vtip}} --\x7e\x7e\x7e\x7e',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Citace elektronické monografie (citace webu, např. Valka.cz, Antika.avonet.cz)': {
			label: 'Citace elektronické monografie (citace webu, např. Valka.cz, Antika.avonet.cz)',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/9/91/Button_cite_web.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bCitace 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}}',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Citace elektronického periodika (citace online zpravodajství, např. Aktuálně.cz, Novinky.cz)': {
			label: 'Citace elektronického periodika (citace online zpravodajství, např. Aktuálně.cz, Novinky.cz)',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/2/2c/Button_cite_news.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bCitace elektronického periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \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 | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Citace periodika (citace novin, časopisu)': {
			label: 'Citace periodika (citace novin, časopisu)',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/4/49/Button_cite_journal.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bCitace periodika\n | příjmení = \n | jméno = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | rok = \n | měsíc = \n | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n}}',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Citace monografie (citace knihy)': {
			label: 'Citace monografie (citace knihy)',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/e/ef/Button_cite_book.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bCitace monografie\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n | rok = \n | titul = \n | vydavatel = \n | místo = \n | stránky = \n | poznámka = \n | isbn = \n}}',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Commons': {
			label: 'Commons',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bCommonscat|',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Defaultsort': {
			label: 'Defaultsort',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/9/9f/Button_defaultsort.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bDEFAULTSORT:',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Potvrzení OTRS': {
			label: 'Potvrzení OTRS',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/1/16/Button_fairuse.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bPotvrzení OTRS|otrs=',
					post: '|materiál=}}',
					sampleText: ''
				}
			}
		},
		'custom-Pískoviště': {
			label: 'Pískoviště',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/9/9a/Button_wiktionary.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bsubst:Pískoviště',
					post: '}} --\x7e\x7e\x7e\x7e',
					sampleText: ''
				}
			}
		},
		'custom-Pískoviště': {
			label: 'Pískoviště',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\x7b\x7bNepodepsáno|',
					post: '}}',
					sampleText: ''
				}
			}
		},
		'custom-Skrytý text': {
			label: 'Skrytý text',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/1/1b/Button_hide_wiki_tag.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<!--',
					post: '-->',
					sampleText: ''
				}
			}
		},
		'custom-Pomlčka': {
			label: 'Pomlčka',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/4/41/Button_hr_halfwidth.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '–',
					post: '',
					sampleText: ''
				}
			}
		},
		'custom-Uvozovky': {
			label: 'Uvozovky',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/2/23/Quotes-Lithuanian.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '\„',
					post: '\“',
					sampleText: ''
				}
			}
		}
	}
});

// Adds a drop-down menu to the search box to choose the namespace to search in.

 $(function () {
     var searchGoButton = document.getElementById('searchGoButton');
     if (!searchGoButton) return;

     var searchNsHidden = document.createElement('input');
     searchNsHidden.id = 'searchNsHidden';
     searchNsHidden.type = 'hidden';
     searchNsHidden.name = 'ns0';
     searchNsHidden.value = '1';

     var searchNsMenu = document.createElement('select');
     searchNsMenu.id = 'searchNsMenu';
     searchNsMenu.name = 'ns';
     searchNsMenu.options[searchNsMenu.options.length] = new Option('(Hlavní)', 0);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Diskuse', 1);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedista', 2);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedista diskuse', 3);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedie', 4);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedie diskuse', 5);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Soubor', 6);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Soubor diskuse', 7);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('MediaWiki', 8);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('MediaWiki diskuse', 9);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Šablona', 10);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Šablona diskuse', 11);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Nápověda', 12);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Nápověda diskuse', 13);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Kategorie', 14);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Kategorie diskuse', 15);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Portál', 100);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Portál diskuse', 101);
     searchNsMenu.onchange = function () {
         searchNsHidden.name = 'ns' + (this.selectedIndex < 0 ? '0' :
 this.options[this.selectedIndex].value);
     };
     // From /skins-1.5/monobook/main.css?5:
     searchNsMenu.style.width = '10.9em';
     searchNsMenu.style.margin = '0';
     searchNsMenu.style.fontSize = '95%';
     searchGoButton.parentNode.insertBefore(searchNsHidden, searchGoButton);
     searchGoButton.parentNode.insertBefore(searchNsMenu, searchGoButton);
 });

/*
=== Osobní pískoviště ===

; autor: [[pl:Wikipedysta:Herr Kriss]]
*/

var disableSandboxLink = 0;	// ustawienie tego na 1 lub true w swoim monobook.js pozwoli wyłączyć tę funkcjonalność

$(function()
{
	if (mw.config.get('wgUserName') != null && disableSandboxLink == 0)
	{
		var caption = 'Moje pískoviště'
		if (mw.config.get('wgUserLanguage') != 'cs')
			caption = 'My sandbox';

		mw.util.addPortletLink('p-personal', mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=Wikipedista:Mercy/Pískoviště', caption, 'pt-sandbox', caption, '', document.getElementById('pt-preferences'));
	}
});