Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/TimedText.loader.js |
— | — | @@ -29,16 +29,13 @@ |
30 | 30 | // Do a module check for timed Text support ( module must add data property 'SupportsTimedText' ) |
31 | 31 | $( embedPlayer ).trigger( 'SupportsTimedText' ); |
32 | 32 | |
| 33 | + // triggers are triggered synchronously, check for data property being updated. |
33 | 34 | if( $( embedPlayer ).data( 'SupportsTimedText' ) ){ |
34 | 35 | return true; |
35 | 36 | } |
36 | 37 | |
37 | 38 | // 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 ; |
43 | 40 | }; |
44 | 41 | |
45 | 42 | } )( window.mediaWiki, window.jQuery ); |
\ No newline at end of file |