r104402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104401‎ | r104402 | r104403 >
Date:06:32, 28 November 2011
Author:dale
Status:ok
Tags:
Comment:
updates per code review comments: http://www.mediawiki.org/wiki/TimedMediaHandler/ReviewNotes#TimedText.loader.js
changed 'return $( embedPlayer ).find( 'track' ).length != 0;' to one line
Modified paths:
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.loader.js (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.loader.js
@@ -29,16 +29,13 @@
3030 // Do a module check for timed Text support ( module must add data property 'SupportsTimedText' )
3131 $( embedPlayer ).trigger( 'SupportsTimedText' );
3232
 33+ // triggers are triggered synchronously, check for data property being updated.
3334 if( $( embedPlayer ).data( 'SupportsTimedText' ) ){
3435 return true;
3536 }
3637
3738 // Check for standard 'track' attribute:
38 - if ( $( embedPlayer ).find( 'track' ).length != 0 ) {
39 - return true;
40 - } else {
41 - return false;
42 - }
 39+ return $( embedPlayer ).find( 'track' ).length != 0 ;
4340 };
4441
4542 } )( window.mediaWiki, window.jQuery );
\ No newline at end of file

Status & tagging log