Minecraft Wiki
Advertisement
This is the documentation page. It should be transcluded into the main script page. See Template:Documentation for more information

Makes documentation pages act like their own namespace, adding "doc" and "doc talk" tabs to template, module and user css/js pages.

// [[User:Majr/docTabs.js]]
if ( 
    $.inArray( mw.config.get( 'wgNamespaceNumber' ), [ 10, 11, 828, 829 ] ) > -1 ||
    $.inArray( mw.config.get( 'wgNamespaceNumber' ), [ 2, 3 ] ) > -1 &&
    mw.config.get( 'wgTitle' ).replace( /\/doc$/, '' ).search( /\.(js|css)$/ ) > -1
) {
    importScript( 'User:Majr/docTabs.js' );
}



Advertisement