User:Emma/common.js: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
(Created page)
 
m (Cleared)
Line 1: Line 1:
var $tplHideCategoryPrefix = $( '#mw-cat-hideprefix' );
 
if ( $tplHideCategoryPrefix.length ) {
        var prefix = $tplHideCategoryPrefix.text();
        if ( $.trim( prefix ) == '' ) {
                prefix = mw.config.get( 'wgTitle' ) + '/';
        }
        $( '#mw-pages' ).find( 'a' ).text( function( i, val ){
                return val.replace( new RegExp( '^' + $.escapeRE( prefix ) ), '' );
        });
}

Revision as of 16:31, November 4, 2011