MediaWiki:Gadget-Subpages.js: Difference between revisions

Want an adless experience? Log in or Create an account.
m
load mediawiki.util
m (update deprecated wg variables to mw.config)
m (load mediawiki.util)
 
Line 4: Line 4:
         if ( document.getElementById( 'p-tb' ) && NSWithoutSubpages.indexOf( mw.config.get('wgNamespaceNumber') ) == -1 ) {
         if ( document.getElementById( 'p-tb' ) && NSWithoutSubpages.indexOf( mw.config.get('wgNamespaceNumber') ) == -1 ) {
                 var subpagesLink = '/wiki/Special:PrefixIndex/' + mw.config.get('wgPageName') + '/';
                 var subpagesLink = '/wiki/Special:PrefixIndex/' + mw.config.get('wgPageName') + '/';
                 mw.util.addPortletLink( 'p-tb', subpagesLink, 'Subpages', 't-subpages', 'Subpages of this page' );
                 mw.loader.using( ['mediawik.util'], function() {
                        mw.util.addPortletLink( 'p-tb', subpagesLink, 'Subpages', 't-subpages', 'Subpages of this page' );
                });
         }
         }
});
});