User:BabylonAS/common.js

Jump to navigation Jump to search

Documentation may be created at User:BabylonAS/common.js/doc.

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

Google Chrome, Firefox, Microsoft Edge, and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button.
For details and instructions about other browsers, see Wikipedia:Bypass your cache.

$( function() { 
'use strict';

// Add a personal sandbox link to the top panel
mw.util.addPortletLink (
	'p-personal',
	mw.util.getUrl(`User:BabylonAS/Sandbox`),
	'Sandbox',
	'pt-draft',
	'Personal sandbox',
	'd',
	'#pt-preferences'
);

// Add a subpages link to pages
if ( mw.config.get( 'wgArticleId' ) !== 0 ) {
	mw.util.addPortletLink (
		'p-tb',
		'/Special:PrefixIndex/' + mw.config.get( 'wgRelevantPageName' ) + '/',
		'Subpages',
		't-subpages',
		'Subpages of the page'
	);
}

} );