mediawiki-extensions-WikiEd.../modules/ext.wikiEditor.toolbar.hideSig.js
goibhniu bddd21b300 Peserve jQuery references to avoid conflicts
* Added closures for jQuery where missing.
* Added closures for mediaWiki where missing.
* Using ready( $ ) where possible.
* Removed empty CSS block.

Change-Id: Ifdd4b10063221a4967d812eafd43858623ec5d28
2013-11-06 23:34:46 +01:00

15 lines
608 B
JavaScript

/*
* Remove the signature button if the main namespace is edited.
*/
jQuery( document ).ready( function ( $ ) {
// This module is designed not to depend on ext.wikiEditor or jquery.wikiEditor.
// Removing this dependency fixed various bugs, but it does mean that we have to
// account for the situation where $.wikiEditor is not present
if ( !$.wikiEditor || !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
return;
}
if ( $( 'body' ).hasClass( 'ns-0' ) ) {
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', { 'section': 'main', 'group': 'insert', 'tool': 'signature' } );
}
} );