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 (Command-R na Macintosh); Konqueror:: kliknite na tlačidlo Reload alebo stlačte F5; Opera vymazať vyrovnávaciu pamäť prehliadača v ponuke Tools→Preferences; Internet Explorer: držte Ctrl a kliknite na Refresh alebo stlačte Ctrl-F5;

/* Tlačidlá */
var customizeToolbar = function() {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        'sections': {
                'údržba': {
                        'type': 'toolbar',
                        'label': 'Údržba'
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        'section': 'údržba',
        'groups': {
                'upozornenia': {
                        'label': 'Upozornenia'
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        filters: [ 'body.ns-talk' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/9/9d/Buttonbezpodpisu.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bNepodpísal|",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'bez zdroja',
                        filters: [ 'body.ns-0' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/3/33/Button_unreferenced.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bBez zdroja",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'chýba zdroj',
                        filters: [ 'body.ns-0' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/b/b0/Zdroj.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bChýba zdroj",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'na úpravu',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/2/2e/Button_broom.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bNa úpravu",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'urgentne upraviť',
                        filters: [ 'body.ns-0' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/f/f3/Button_broom2.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bUrgentne upraviť|201",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'experimenty',
                        filters: [ 'body.ns-talk' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/3/3d/EXPBT0.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bExperimenty",
                                        post: "}} \x7E\x7E\x7E\x7E"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'experimenty2',
                        filters: [ 'body.ns-talk' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/a/ae/EXPBT2.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bExperimenty2",
                                        post: "}} \x7E\x7E\x7E\x7E"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'upozornenia',
        tools: {
                "comment": {
                        label: 'experimenty3',
                        filters: [ 'body.ns-talk' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/e/e5/EXPBT3.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bExperimenty3",
                                        post: "}} \x7E\x7E\x7E\x7E"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        'section': 'údržba',
        'groups': {
                'šablóny': {
                        'label': 'Šablóny'
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'šablóny',
        tools: {
                "comment": {
                        label: 'Commons',
                        filters: [ 'body.ns-0' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "== Iné projekty =="+
"\n\x7b\x7bProjekt",
                                        peri: "|commons=",
                                        post: "}}"+
"\n",
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'šablóny',
        tools: {
                "comment": {
                        label: 'Minivlajka',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/e/eb/Button_Brazil.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bMinivlajka|",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'šablóny',
        tools: {
                "comment": {
                        label: 'Odkaz na šablónu',
                        filters: [ 'body.ns-talk' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/a/a1/Button_template_tl.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bTl|",
                                        peri: "názov šablóny",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'šablóny',
        tools: {
                "comment": {
                        label: 'Infobox Česká obec',
                        filters: [ 'body.ns-0' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/9/97/Template_button.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bInfobox Stanica pražského metra"+
"\n | názov           = ",
                                        post: 
"\n | pôvodný názov   = "+
"\n | obrázok         = "+
"\n | popis           = "+
"\n | zemepisná šírka = "+
"\n | zemepisná dĺžka = "+
"\n | štvrť           = "+
"\n | ulica           = "+
"\n | typ             = "+
"\n | nástupištia     = "+
"\n | projektant      = "+
"\n | architekt       = "+
"\n | cestujúci       = "+
"\n | roky            = "+
"\n | udalosti        = "+
"\n}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'šablóny',
        tools: {
                "comment": {
                        label: 'Infobox Rakúska obec',
                        filters: [ 'body.ns-0' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/9/97/Template_button.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bInfobox Rakúska obec"+
"\n | názov           = ",
                                        post: 
"\n | typ             = "+
"\n | erb             = "+
"\n | obrázok         = "+
"\n | popis           = "+
"\n | nadmorská výška = "+
"\n | zemepisná šírka = "+
"\n | zemepisná dĺžka = "+
"\n | PSČ             = "+
"\n | kód             = "+
"\n | web             = "+
"\n}}"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'main',
        group: 'format',
        tools: {
                "comment": {
                        label: 'Zvislá čiara',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/3/32/Toolbaricon_vertical_bar.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "|",
                                        post: ""
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        'section': 'údržba',
        'groups': {
                'technické': {
                        'label': 'Technické'
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'nedeliteľná medzera',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/4/4b/Button_nbsp.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: " ",
                                        post: ""
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'skrytý komentár',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/3/3b/Comment-button-bg.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<!-- ",
                                        post: " -->"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'nowiki',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/8/82/Nowiki_icon.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<nowiki>",
                                        post: "</nowiki>"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'noinclude',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/5/5c/Noinclude_button.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<noinclude>",
                                        post: "</noinclude>"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'pre',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/3/3c/Button_pre.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<pre>",
                                        post: "</pre>"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'div',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/d/d4/Button_div.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<div>",
                                        post: "</div>"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'span',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/7/72/Button_span_2.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<span>",
                                        post: "</span>"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'údržba',
        group: 'technické',
        tools: {
                "comment": {
                        label: 'code',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/2/23/Button_code.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<code>",
                                        post: "</code>"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        'sections': {
                'smajlíky': {
                        'type': 'toolbar',
                        'label': 'Smajlíky'
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        'section': 'smajlíky',
        'groups': {
                'úsmevy': {
                        'label': 'Úsmevy'
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'smajlíky',
        group: 'úsmevy',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/7/7a/Gnome-face-cool.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x5b\x5bSúbor:Gnome-face-cool.svg|20px|Úsmev]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'smajlíky',
        group: 'úsmevy',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/9/92/Gnome-face-smile-big.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x5b\x5bSúbor:Gnome-face-smile-big.svg|20px|Úsmev]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'smajlíky',
        group: 'úsmevy',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/a/a0/Gnome-face-laugh.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x5b\x5bSúbor: Gnome-face-laugh.svg|20px|Úsmev]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'smajlíky',
        group: 'úsmevy',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/b/b2/Gnome-face-devilish.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x5b\x5bSúbor:Gnome-face-devilish.svg|20px|Úsmev]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'smajlíky',
        group: 'úsmevy',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/2/2d/Happyface4.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x5b\x5bSúbor:Happyface4.svg|20px|Úsmev]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'smajlíky',
        group: 'úsmevy',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/4/47/Gnome-face-wink.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x5b\x5bSúbor:Gnome-face-wink.svg|20px|Úsmev]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'smajlíky',
        group: 'úsmevy',
        tools: {
                "comment": {
                        label: 'nepodpísal',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/e/e8/Gnome3-glasses.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x5b\x5bSúbor:Gnome3-glasses.svg|20px|Úsmev]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'main',
        group: 'format',
        tools: {
                "comment": {
                        label: 'Presmerovanie',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/7/76/Insert_redirect.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "#PRESMERUJ[[",
                                        peri: "názov stránky",
                                        post: "]]"
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'main',
        group: 'format',
        tools: {
                "comment": {
                        label: 'Rozlišovacia stránka',
                        filters: [ 'body.ns-0' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/3/3d/Toolbar_desambig.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bRozlišovacia stránka",
                                        post: "}}"
                                }
                        }
                }
        }
} );
$('#wpTextbox1').wikiEditor('addToToolbar', {
        section: 'main',
        group: 'format',
        tools: {
                "strikethrough": {
                        label: 'Zmazať lebo',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/9/96/Gnome-edit-delete.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bZL|",
                                        post: "}}"
                                }
                        }
                }
        }
});
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'main',
        group: 'insert',
        tools: {
                "comment": {
                        label: 'lišta1',
                        filters: [ 'body.ns-10' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/e/ec/Gnome-colors-emblem-desktop.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "\x7b\x7bNavigačná lišta"+
"\n|meno   = ",
                                        post: 
"\n|nadpis = "+
"\n"+
"\n|skupina1 = "+
"\n|zoznam1  = "+
"\n* ",
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'main',
        group: 'insert',
        tools: {
                "comment": {
                        label: 'lišta2',
                        filters: [ 'body.ns-10' ],
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/e/e5/Gnome-colors-emblem-desktop3.svg',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "|skupina2 = "+
"\n|zoznam2  = "+
"\n* ",
                                        post: ""
                                }
                        }
                }
        }
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        section: 'main',
        group: 'insert',
        tools: {
                "comment": {
                        label: 'Nový riadok',
                        type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/a/a4/Toolbar_Insert_newline.png',
                        action: {
                                type: 'encapsulate',
                                options: {
                                        pre: "<br />",
                                        post: ""
                                }
                        }
                }
        }
} );
/* Odoberie sekciu Pomocník */
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
        'section': 'help'
});
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
        'section': 'advanced',
        'group': 'format',
        'tool': 'nowiki'
});
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
        'section': 'advanced',
        'group': 'format',
        'tool': 'newline'
});
};
 
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */
if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
        mw.loader.using( 'user.options', function () {
                if ( mw.user.options.get('usebetatoolbar') ) {
                        mw.loader.using( 'ext.wikiEditor', function () {
                                $(document).ready( customizeToolbar );
                        } );
                }
        } );
}
/* Odkazy */
 
( function ( mw, $ ) {
 
	$( document ).ready( function () {
		var conf, title, url;
 
		
	conf1 = {
			subpageName: 'pieskovisko/1',
			portletLabel: '1',
			portletTooltip: 'Choďte na vaše pieskovisko/1'
		};
		title = new mw.Title( 'Special:MyPage/' + conf1.subpageName );

		url = new mw.Uri( title.getUrl() );
 
		mw.util.addPortletLink(
			'p-personal',
			url,
			conf1.portletLabel,
			'pt-mysandbox',
			conf1.portletTooltip,
			null,
			'#pt-preferences'
		);
		conf2 = {
			subpageName: 'pieskovisko/2',
			portletLabel: '2',
			portletTooltip: 'Choďte na vaše pieskovisko/2'
		};
		title = new mw.Title( 'Special:MyPage/' + conf2.subpageName );
 
		url = new mw.Uri( title.getUrl() );
 
		mw.util.addPortletLink(
			'p-personal',
			url,
			conf2.portletLabel,
			'pt-mysandbox',
			conf2.portletTooltip,
			null,
			'#pt-preferences'
		);
		conf3 = {
			subpageName: 'pieskovisko/3',
			portletLabel: '3',
			portletTooltip: 'Choďte na vaše pieskovisko/3'
		};
		title = new mw.Title( 'Special:MyPage/' + conf3.subpageName );
 
		url = new mw.Uri( title.getUrl() );
 
		mw.util.addPortletLink(
			'p-personal',
			url,
			conf3.portletLabel,
			'pt-mysandbox',
			conf3.portletTooltip,
			null,
			'#pt-preferences'
		);
		conf4 = {
			subpageName: 'pieskovisko/4',
			portletLabel: '4',
			portletTooltip: 'Choďte na vaše pieskovisko/4'
		};
		title = new mw.Title( 'Special:MyPage/' + conf4.subpageName );
 
		url = new mw.Uri( title.getUrl() );
 
		mw.util.addPortletLink(
			'p-personal',
			url,
			conf4.portletLabel,
			'pt-mysandbox',
			conf4.portletTooltip,
			null,
			'#pt-preferences'
		);
		conf5 = {
			subpageName: 'pieskovisko/5',
			portletLabel: '5',
			portletTooltip: 'Choďte na vaše pieskovisko/5'
		};
		title = new mw.Title( 'Special:MyPage/' + conf5.subpageName );
 
		url = new mw.Uri( title.getUrl() );
 
		mw.util.addPortletLink(
			'p-personal',
			url,
			conf5.portletLabel,
			'pt-mysandbox',
			conf5.portletTooltip,
			null,
			'#pt-preferences'
		);
		conf6 = {
			portletLabel: 'Commons',
			portletTooltip: 'Vaša stránka na Commons'
		};
		title = new mw.Title( 'commons:Special:Mypage' );
 
		url = new mw.Uri( title.getUrl() );
 
		mw.util.addPortletLink(
			'p-personal',
			url,
			conf6.portletLabel,
			'pt-mysandbox',
			conf6.portletTooltip,
			null,
			'#pt-preferences'
		);
		conf7 = {
			portletLabel: 'TW',
			portletTooltip: 'Vaša stránka na Translatewiki'
		};
 
		mw.util.addPortletLink(
			'p-personal',
			'https://translatewiki.net/wiki/User:Sudo77(new)',
			conf7.portletLabel,
			'pt-mysandbox',
			conf7.portletTooltip,
			null,
			'#pt-preferences'
		);
	});
}( mediaWiki, jQuery ) );

/* Odkaz na GeoLokátor */
mw.util.addPortletLink(
	'p-navigation',
	'http://tools.freeside.sk/geolocator/geolocator.sk.html',
	'Geolokátor',
	't-geoloc',
	'Nástroj pre interaktívne georeferencovanie a geotagging',
	'g',
	'#t-print'
);

/* Odkaz na Vega editor */
mw.util.addPortletLink(
	'p-navigation',
	'http://trifacta.github.io/vega/editor/',
	'Vega editor <graph>',
	't-vega',
	'Nástroj pre vytváranie grafov',
	'h',
	'#t-print'
);




/**
 * iProject (InterProjectLinks)
 */
$( function() { 
	var iwlinks = jQuery( 'div.interProject' );
	if ( iwlinks.length > 0 ) {
		var pproject = jQuery( '#p-tb' ).clone().attr( 'id', 'p-project' ).insertAfter( '#p-tb' );
		pproject.find( 'h3' ).attr( 'id', 'p-project-label' ).text( 'Iné projekty' );
		pproject.find( 'ul' ).addClass( 'interProject' ).empty().append( iwlinks );
		iwlinks.replaceWith( function() {
			return $( '<li></li>' ).addClass( $(this).attr( 'class' ) ).append( $(this).contents() );
		});
	}
});

/**
 * RefToolbar
 *  Former maintainers: [[User:Mr.Z-man]], [[User:Kaldari]]
 */
function initializeRefTools() {
    if ( window.refToolbarInstalled === undefined ) {
        mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-refToolbarBase.js&action=raw&ctype=text/javascript');
 
        if( mw.user.options.get('usebetatoolbar') && mw.user.options.get('usebetatoolbar-cgd') ) {
            // Enhanced editing toolbar is on with dialogs. Load standard refToolbar.
            mw.loader.using( 'ext.wikiEditor', function () {
                importScript('Redaktor:Sudo77(new)/RefToolbar.js');
            });
        } else if( mw.user.options.get('usebetatoolbar') ) { if (navigator.appName != "Microsoft Internet Explorer") {
            // Dialogs are off. Load refToolbar 2.0 without dialogs.
            mw.loader.using( 'ext.wikiEditor', function () {
            importScript('Redaktor:Sudo77(new)/RefToolbarNoDialogs.js');
            });
        }} else { if (navigator.appName != "Microsoft Internet Explorer") {
            // Enhanced editing toolbar is off. Load legacy refToolbar 1.0.
            importScript('Redaktor:Sudo77(new)/RefToolbarLegacy.js');
        }}
        window.refToolbarInstalled = true;
    }
}
 
$( initializeRefTools );

/**
 * install [[User:Cacycle/wikEdDiff]] enhanced diff view using ajax
 */
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js&action=raw&ctype=text/javascript');