MediaWiki:Common.js/Toolbox.js

/***** subPagesLink ******** * Adds a link to subpages of current page * (copied from commons:MediaWiki:Common.js and slightly modified) * * JSconfig items: bool JSconfig.subPagesLink * 	(true=enabled (default), false=disabled) ****/ var subPagesLink = {	wo_ns : [NS_MEDIA, NS_SPECIAL, NS_IMAGE, NS_CATEGORY], install: function {		// honor user configuration if( !JSconfig.keys['subPagesLink'] ) return; if ( document.getElementById("p-tb")				&& ! inArray( wgNamespaceNumber, subPagesLink.wo_ns) ) {			addPortletLink( 'p-tb',				Creator.createInternUrl('Special:Prefixindex/' + wgPageName +'/'),				gLang.msg("tb-subpages"), 't-subpages' ); }	} } addOnloadHook( function {	JSconfig.registerKey('subPagesLink', true, gLang.msg("tb-subpages-settings"), 9);	subPagesLink.install; });