http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88614
Revision: 88614 Author: krinkle Date: 2011-05-22 22:50:51 +0000 (Sun, 22 May 2011) Log Message: ----------- Optimization jquery.spinner.js: * In prototype functions this refers to the main object (hence 'return this;' at the end), no need to initialize a jQuery object ike ( this ); * Using .length instead of casting a boolean (which may not work as expected) Modified Paths: -------------- trunk/extensions/UploadWizard/resources/jquery/jquery.spinner.js Modified: trunk/extensions/UploadWizard/resources/jquery/jquery.spinner.js =================================================================== --- trunk/extensions/UploadWizard/resources/jquery/jquery.spinner.js 2011-05-22 22:46:01 UTC (rev 88613) +++ trunk/extensions/UploadWizard/resources/jquery/jquery.spinner.js 2011-05-22 22:50:51 UTC (rev 88614) @@ -3,10 +3,9 @@ * Set a given selector html to the loading spinner: */ $.fn.loadingSpinner = function( ) { - if ( this ) { - $j( this ).html( - $j( '<div />' ) - .addClass( "loadingSpinner" ) + if ( this.length ) { + this.html( + $j( '<div />' ).addClass( 'loadingSpinner' ) ); } return this; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs