MediaWiki:Gadget-Subpages.js: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
mNo edit summary
(addPortletLink -> mw.util.addPortletLink)
Line 4: Line 4:
         if ( document.getElementById( 'p-tb' ) && NSWithoutSubpages.indexOf( wgNamespaceNumber ) == -1 ) {
         if ( document.getElementById( 'p-tb' ) && NSWithoutSubpages.indexOf( wgNamespaceNumber ) == -1 ) {
                 var subpagesLink = '/wiki/Special:PrefixIndex/' + wgPageName + '/';
                 var subpagesLink = '/wiki/Special:PrefixIndex/' + wgPageName + '/';
                 addPortletLink( 'p-tb', subpagesLink, 'Subpages', 't-subpages', 'Subpages of this page' );
                 mw.util.addPortletLink( 'p-tb', subpagesLink, 'Subpages', 't-subpages', 'Subpages of this page' );
         }
         }
});
});

Revision as of 03:16, January 26, 2017

/** subpages **/
$( function() {
        var NSWithoutSubpages = new Array( -1, 6, 8, 14);
        if ( document.getElementById( 'p-tb' ) && NSWithoutSubpages.indexOf( wgNamespaceNumber ) == -1 ) {
                var subpagesLink = '/wiki/Special:PrefixIndex/' + wgPageName + '/';
                mw.util.addPortletLink( 'p-tb', subpagesLink, 'Subpages', 't-subpages', 'Subpages of this page' );
        }
});