Difference between revisions of "User:Podehaye/button.js"
Jump to navigation
Jump to search
| Line 4: | Line 4: | ||
var button = new OO.ui.ButtonWidget( { label: 'Click me!' } ); | var button = new OO.ui.ButtonWidget( { label: 'Click me!' } ); | ||
button.on( 'click', function () { | button.on( 'click', function () { | ||
| − | alert( ' | + | alert( 'You clicked the button defined https://wiki.personaldata.io/w/index.php?title=User:Podehaye/button.js' ); |
} ); | } ); | ||
$( '#mw-content-text' ).prepend( button.$element ); | $( '#mw-content-text' ).prepend( button.$element ); | ||
} ); | } ); | ||
} ); | } ); | ||
Latest revision as of 00:05, 20 April 2019
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 defined https://wiki.personaldata.io/w/index.php?title=User:Podehaye/button.js' );
} );
$( '#mw-content-text' ).prepend( button.$element );
} );
} );