"Catrope" changed the status of MediaWiki.r108533 to "ok" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/108533#c29299
Old Status: new
> New Status: ok
Commit summary for MediaWiki.r108533:
[MoodBar] Clean up + minor bug fix
* Declare missing dependency on 'user.tokens'
* Use $ instead of $j (deprecated)
* Use <shorttag> for element creation, and <valid></valid> for parsed snippets.
jQuery uses a regex to detect <shorttag> and does doc.createElement('tag'). For
anything else it uses innerHTML parser which should be given valid html, not
shorthand code.
* Various JSLint/JSHint best practices
* Other code conventions (whitespace: like a space between // and the comment,
no space between function name and arguments list, one space between operators
and their value: `if ( .. ) `, `function ( .. ) `, `for ( .. ) `, and
`someThing( .. )`, etc.)
* Function order
* Fix global variable leakage "$link"
* Fix global variable leakage "$item" (2x)
* Fix global variable leakage "$responseForm"
* CSS: One selector per line and space after colon for readability
* Trim trailing whitespace
Catrope's comment:
<pre>
-jQuery(function( $ ) {
+jQuery( document ).ready( function ( $ ) {
</pre>
Any particular reason why you're doing this?
<pre>
- for ( i = 0; i < len; i++ ) {
+
+ for ( i = 0; i < len; i+= 1 ) {
</pre>
Oh please, I'd really like for this not to become an enforced convention.
There's nothing unclear about using <code>i++</code> by itself in a for loop
like that. It's also spaced incorrectly, BTW.
Marking OK.
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview