User:PrelevatedInsider22581/common.js: Difference between revisions
From BetaArchive Wiki
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
} ); | } ); | ||
} ); | } ); | ||
mw.loader.using('mediawiki.widgets').then( function (){ | |||
var config = {}; | |||
var namespaceInput = new mw.widgets.NamespaceInputWidget( config ); | |||
$( '#bodyContent' ).append( namespaceInput.$element ); | |||
}); |
Revision as of 17:53, 17 July 2023
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 ); } ); } ); mw.loader.using('mediawiki.widgets').then( function (){ var config = {}; var namespaceInput = new mw.widgets.NamespaceInputWidget( config ); $( '#bodyContent' ).append( namespaceInput.$element ); });