User:DodoMan/subpages.js: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
m Justarandomamerican moved page User:Rafdodo/subpages.js to User:DodoMan/subpages.js: Automatically moved page while renaming the user "Rafdodo" to "DodoMan"
m Justarandomamerican moved page User:DodoMan/subpages.js to User:DodoMan~usurped/subpages.js without leaving a redirect: Automatically moved page while renaming the user "DodoMan" to "DodoMan~usurped"
(No difference)

Revision as of 13:04, 1 April 2024

$(document).ready(function () {
  var NSWithoutSubpages = [-1, 6, 8, 14, 104, 105, 113];
  if (document.getElementById('p-tb') && NSWithoutSubpages.indexOf(mw.config.get('wgNamespaceNumber')) == -1)
    {
    var lienSouspages = '/wiki/Special:Index/';
    if (mw.config.get('wgCanonicalNamespace') === 'Index') {
        lienSouspages += 'Page:' + mw.config.get('wgTitle');
    } else {
        lienSouspages += mw.config.get('wgPageName');
    }
    mw.loader.using('mediawiki.util', function() {
      mw.util.addPortletLink('p-tb', lienSouspages + '/', 'Sous-pages', 't-subpages', 'Sous-pages de cette page');	
    });
    }
});