Difference between revisions 261822 and 261826 on ptwikibooks

/**
 * Add some extra buttons to enhanced edit toolbar
 * @author: [[User:Helder.wiki]]
 * @tracking: [[Special:GlobalUsage/User:Helder.wiki/Tools/Botões extras.js]] ([[File:User:Helder.wiki/Tools/Botões extras.js]])
 */
/*jslint browser: true, white: true, regexp: true*/
/*global jQuery, mediaWiki */
( function ( $, mw ) {
(contracted; show full) 
/* Check if we are in edit mode and the required modules are available and 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 () {
				$( customizeToolbar );
			
		} );
		}
	} );
}
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );
			} );
		}
	} );
}

}( jQuery, mediaWiki ) );