MediaWiki:Common.js: Difference between revisions

From titipi
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: var customizeToolbar = function () { console.log('ciao'); }; if ( [ 'edit', 'submit' ].indexOf(...")
 
No edit summary
Line 15: Line 15:
} );
} );
}
}
*/

Revision as of 12:22, 30 September 2021

/* Any JavaScript here will be loaded for all users on every page load. */

var customizeToolbar = function () {
	console.log('ciao');
};


if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
	mw.loader.using( 'user.options' ).then( function () {
		if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
			$.when(
				mw.loader.using( 'ext.wikiEditor' ), $.ready
			).then( customizeToolbar );
		}
	} );
}
*/