.replace( rUnderscoreTrim, '' );
// Process initial colon
- if ( title !== '' && title.charAt( 0 ) === ':' ) {
+ if ( title !== '' && title[0] === ':' ) {
// Initial colon means main namespace instead of specified default
namespace = NS_MAIN;
title = title
}
// Any remaining initial :s are illegal.
- if ( title.charAt( 0 ) === ':' ) {
+ if ( title[0] === ':' ) {
return false;
}
title = $.trim( title.replace( rWhitespace, ' ' ) );
// Process initial colon
- if ( title !== '' && title.charAt( 0 ) === ':' ) {
+ if ( title !== '' && title[0] === ':' ) {
// Initial colon means main namespace instead of specified default
namespace = NS_MAIN;
title = title
getName: function () {
if ( $.inArray( this.namespace, mw.config.get( 'wgCaseSensitiveNamespaces' ) ) !== -1 ) {
return this.title;
- } else {
- return this.title.charAt( 0 ).toUpperCase() + this.title.slice( 1 );
}
+ return this.title[0].toUpperCase() + this.title.slice( 1 );
},
/**