MediaWiki:Common.js

From Tsadra Commons
Revision as of 15:46, 28 February 2018 by Jeremi (talk | contribs) ((by SublimeText.Mediawiker))

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
mw.loader.load( 'https://use.fontawesome.com/releases/v5.0.7/js/all.js' );


// OOUI Buttons
// Example: A ButtonWidget configured with an icon, label, and styling flag.
// 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 );