MediaWiki:Common.js: Difference between revisions

From Tsadra Commons
((by SublimeText.Mediawiker))
((by SublimeText.Mediawiker))
Line 1: Line 1:
mw.loader.load( 'https://use.fontawesome.com/releases/v5.0.7/js/all.js' );
mw.loader.load( 'https://use.fontawesome.com/releases/v5.0.7/js/all.js' );
 
mw.loader.load( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css' );
 
mw.loader.load( 'https://code.jquery.com/jquery-3.2.1.slim.min.js' );
// OOUI Buttons
mw.loader.load( 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js' );
// Example: A ButtonWidget configured with an icon, label, and styling flag.
mw.loader.load( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js' );
// Create a new ButtonWidget.  
var ooui_button = new OO.ui.ButtonWidget();
 
// Configure the ButtonWidget. In this example, methods are used to configure the
// button's icon, label, and styling flag.  
ooui_button.setIcon( 'info' )
.setLabel( 'Button with icon' )
.setFlags( 'progressive' );
// Append the button to the DOM.
$( '.oo-ui-button' ).append( ooui_button.$element );

Revision as of 16:49, 28 February 2018

mw.loader.load( 'https://use.fontawesome.com/releases/v5.0.7/js/all.js' );
mw.loader.load( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css' );
mw.loader.load( 'https://code.jquery.com/jquery-3.2.1.slim.min.js' );
mw.loader.load( 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js' );
mw.loader.load( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js' );