MediaWiki:Common.js: Difference between revisions

From Sandboxgamer
(Blanked the page)
Tag: Blanking
No edit summary
Line 1: Line 1:
 
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
$textarea.wikiEditor( 'addToToolbar', {
section: 'main',
group: 'format',
tools: {
"Underline": {
label: 'Underline',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/f/fd/Button_underline.png',
action: {
type: 'encapsulate',
options: {
pre: "<u>",
post: "</u>"
}
}
}
}
} );
} );
}

Revision as of 11:53, 17 February 2022

if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
	
	mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
		$textarea.wikiEditor( 'addToToolbar', {
			section: 'main',
			group: 'format',
			tools: {
				"Underline": {
					label: 'Underline',
					type: 'button',
					icon: '//upload.wikimedia.org/wikipedia/commons/f/fd/Button_underline.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<u>",
							post: "</u>"
						}
					}
				}
			}
		} );
		
	} );
}