"Dantman" posted a comment on MediaWiki.r107464.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/107464#c28596
Commit summary for MediaWiki.r107464:
remove need to add newline at end of input
Dantman's comment:
<source lang=javascript>
if ( "abc".substr(-1, Infinity) !== "c" ) {
// substr does not follow the es3 spec on negative input, fix it
( function() {
var oldSubstr = String.prototype.substr;
String.prototype.substr = function(start, length) {
if ( start < 0 ) {
start = this.length + start;
}
return oldSubstr.call(this, start, length);
};
} )();
}
</source>
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview