summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.hideSig.js
blob: 48d30274ce20396f2cf1fc74b6faaa75917f3deb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * 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' } );
	}
} );