r87696 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87695‎ | r87696 | r87697 >
Date:20:30, 8 May 2011
Author:krinkle
Status:ok
Tags:
Comment:
Remove second argument in str.substr() in $.ucFirst, not needed, defaults to full length of string
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -11,7 +11,7 @@
1212 '' : str.toString().replace( /\s+$/, '' );
1313 },
1414 ucFirst : function( str ) {
15 - return str.substr( 0, 1 ).toUpperCase() + str.substr( 1, str.length );
 15+ return str.substr( 0, 1 ).toUpperCase() + str.substr( 1 );
1616 },
1717 escapeRE : function( str ) {
1818 return str.replace ( /([\\{}()|.?*+\-^$\[\]])/g, "\\$1" );

Status & tagging log