mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-12-01 03:17:04 +00:00
7769baa56e
> JQMIGRATE: jQuery.fn.bind() is deprecated > JQMIGRATE: jQuery.fn.size() is deprecated; use the .length property Note that bind() is not removed in v3, merely deprecated. Even after the jQuery Migrate phase, it will continue to work. size() was removed in v3 and works only during the Migrate phase. https://api.jquery.com/size/ https://api.jquery.com/bind/ https://jquery.com/upgrade-guide/3.0/ Bug: T124742 Change-Id: I6bbd8f829ecf987228c6a5abd32c84e4e088a9bd
17 lines
486 B
JavaScript
17 lines
486 B
JavaScript
/*
|
|
* JavaScript for WikiEditor Toolbar
|
|
*/
|
|
jQuery( 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()
|
|
);
|
|
} );
|