User:Cavila/common.js

var customizeToolbar = function { /* Your code goes here. */

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {	'sections': {		'emoticons': {			'type': 'toolbar', // Can also be 'booklet'			'label': 'Emoticons'			// or 'labelMsg': 'section-emoticons-label' for a localized label		}	} } );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'characters',  'pages': {      'emoticons': {         'layout': 'characters',         'label': 'Emoticons',         'characters': [ ':)', ':))', ':(', '<3', ';)' ] }  } } );

};

/* 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.toolbar', function  { $(document).ready( customizeToolbar ); } ); } } ); } // Add the customizations to LiquidThreads' edit toolbar, if available mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );