User:Robinr78/common.js: Difference between revisions

From Robin's SM-201 Website
Jump to navigation Jump to search
m (Robinr78 moved page User:Robinr78/Common.js to User:Robinr78/common.js without leaving a redirect)
(Removed redirect to User:Robinr78/common.js)
Tag: Removed redirect
Line 1: Line 1:
/* #REDIRECT */mw.loader.load("http://www.sm-201.org/a/index.php?title=User:Robinr78/common.js\u0026action=raw\u0026ctype=text/javascript");
// Check if we're editing a page.
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
// Add a hook handler.
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
// Configure a new toolbar entry on the given $textarea jQuery object.
$textarea.wikiEditor( 'addToToolbar', {
/* Your code goes here */
} );
} );
}

Revision as of 23:10, 27 December 2022

// Check if we're editing a page.
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
	// Add a hook handler.
	mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
		// Configure a new toolbar entry on the given $textarea jQuery object.
		$textarea.wikiEditor( 'addToToolbar', {
			/* Your code goes here */
		} );
	} );
}