MediaWiki:Common.js: Porovnání verzí

Z Gewiki
Bez shrnutí editace
Bez shrnutí editace
Řádek 4: Řádek 4:
//importScriptURI('resources/wikEd.js');
//importScriptURI('resources/wikEd.js');


if ( mw.toolbar ) {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
    mw.toolbar.addButton( {
'section': 'emoticons',
        imageFile: 'http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png',
'group': 'faces',
        speedTip: 'Comment visible only for editors',
'tools': {
        tagOpen: '<!-- ',
'smile': {
        tagClose: ' -->',
label: 'Smile!', // or use labelMsg for a localized label, see above
        sampleText: 'Insert comment here',
type: 'button',
        imageId: 'button-comment'
icon: 'http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png',
    } );
action: {
}
type: 'encapsulate',
options: {
pre: ":)" // text to be inserted
}
}
}
}
} );

Verze z 31. 1. 2015, 12:49

/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */

// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor
//importScriptURI('resources/wikEd.js');

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'section': 'emoticons',
	'group': 'faces',
	'tools': {
		'smile': {
			label: 'Smile!', // or use labelMsg for a localized label, see above
			type: 'button',
			icon: 'http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: ":)" // text to be inserted
				}
			}
		}
	}
} );