MediaWiki:Common.js
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Add a "Contributor's guide" button to the WikiEditor toolbar (top-right utility group). */
mw.loader.using( [ 'ext.wikiEditor', 'mediawiki.util' ] ).then( function () {
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
$textarea.wikiEditor( 'addToToolbar', {
section: 'secondary',
group: 'default',
tools: {
contributorsguide: {
label: "Contributor's guide",
type: 'button',
oouiIcon: 'help',
action: {
type: 'callback',
execute: function () {
window.open(
mw.util.getUrl( "TenthFleet:Contributor's guide" ),
'_blank'
);
}
}
}
}
} );
} );
} );