mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-12 09:57:16 +00:00
bddd21b300
* Added closures for jQuery where missing. * Added closures for mediaWiki where missing. * Using ready( $ ) where possible. * Removed empty CSS block. Change-Id: Ifdd4b10063221a4967d812eafd43858623ec5d28
17 lines
504 B
JavaScript
17 lines
504 B
JavaScript
/*
|
|
* JavaScript for WikiEditor Toolbar
|
|
*/
|
|
jQuery( document ).ready( function ( $ ) {
|
|
if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
|
|
$( '.wikiEditor-oldToolbar' ).show();
|
|
return;
|
|
}
|
|
// The old toolbar is still in place and needs to be removed so there aren't two toolbars
|
|
$( '#toolbar' ).remove();
|
|
// Add toolbar module
|
|
// TODO: Implement .wikiEditor( 'remove' )
|
|
$( '#wpTextbox1' ).wikiEditor(
|
|
'addModule', $.wikiEditor.modules.toolbar.config.getDefaultConfig()
|
|
);
|
|
} );
|