r104118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104117‎ | r104118 | r104119 >
Date:00:34, 24 November 2011
Author:rmoen
Status:ok
Tags:
Comment:
resolve jsLint complaints in regards to fbProps already defined
Modified paths:
  • /trunk/extensions/MoodBar/modules/jquery.moodBar/jquery.moodBar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/jquery.moodBar/jquery.moodBar.js
@@ -19,25 +19,25 @@
2020 */
2121 'submit': function( fbProps ) {
2222 var clientData = $.client.profile(),
23 - fbProps = $.extend( {
 23+ fb = $.extend( {
2424 'page': mw.config.get( 'wgPageName' ),
2525 'editmode': mw.config.get( 'wgAction' ) == 'edit' ? 1 : 0
2626 }, fbProps ),
2727 apiRequest = {
2828 'action': 'moodbar',
29 - 'page': fbProps.page,
30 - 'comment': fbProps.comment,
31 - 'anonymize': fbProps.anonymize,
 29+ 'page': fb.page,
 30+ 'comment': fb.comment,
 31+ 'anonymize': fb.anonymize,
3232 'useragent': clientData.name + '/' + clientData.versionNumber,
3333 'system': clientData.platform,
34 - 'bucket': fbProps.bucket,
35 - 'type': fbProps.type,
 34+ 'bucket': fb.bucket,
 35+ 'type': fb.type,
3636 'token': mw.config.get('mbEditToken'),
3737 'format': 'json'
3838 };
3939
4040 // API treats any value as true.
41 - if ( fbProps.editmode ) {
 41+ if ( fb.editmode ) {
4242 apiRequest.editmode = true;
4343 }
4444
@@ -45,7 +45,7 @@
4646 type: 'post',
4747 url: mw.util.wikiScript( 'api' ),
4848 data: apiRequest,
49 - success: fbProps.callback,
 49+ success: fb.callback,
5050 dataType: 'json'
5151 } );
5252 }

Status & tagging log