Difference between revisions of "MediaWiki:Common.js"

581 bytes added ,  20:02, 29 November 2010
no edit summary
Line 478: Line 478:




 
// --------------------------------------------------------
// addSubpages
// adds a 'subpages' link to the toolbox bar (excludes File, MediaWiki and Category namespaces)
// --------------------------------------------------------
addOnloadHook(function () {
  var NSWithoutSubpages = new Array(-1, 6, 8, 14);
  if (document.getElementById('p-tb') && NSWithoutSubpages.indexOf(wgNamespaceNumber) == -1)
    {
    var linkSubpages = '/Special:PrefixIndex/' + wgPageName + '/';
    addPortletLink('p-tb', linkSubpages, 'Subpages', 't-subpages', 'Subpages of this page');
    }
});
//


/*</pre>
/*</pre>