Difference between revisions of "User:Podehaye/common.js"

From Wikibase Personal data
Jump to navigation Jump to search
Line 1: Line 1:
mw.notify( 'Welcome, Paul!' );
+
mw.notify( 'Welcome, Paul, your user script is loading!' );
  
 
mw.loader.using( 'oojs-ui-core' ).done( function () {
 
mw.loader.using( 'oojs-ui-core' ).done( function () {

Revision as of 23:31, 18 April 2019

mw.notify( 'Welcome, Paul, your user script is loading!' );

mw.loader.using( 'oojs-ui-core' ).done( function () {
	$( function () {
		var button = new OO.ui.ButtonWidget( { label: 'Click me!' } );
		button.on( 'click', function () {
			alert( 'You clicked the button!' );
		} );
		$( '#mw-content-text' ).append( button.$element );
	} );
} );