r81371 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81370‎ | r81371 | r81372 >
Date:02:32, 2 February 2011
Author:dale
Status:deferred
Tags:
Comment:
minor js lint clean up of mwEmbedSuppot
Modified paths:
  • /branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/MwEmbedSupport/mwEmbedSupport.js (modified) (history)
  • /branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/TimedText/TimedText.loader.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/TimedText/TimedText.loader.js
@@ -3,7 +3,7 @@
44 */
55 // Scope everything in "mw" ( keeps the global namespace clean )
66 ( function( mw, $ ) {
7 - debugger;
 7+
88 // Merge in timed text related attributes:
99 mw.mergeConfig( 'EmbedPlayer.SourceAttributes', [
1010 'srclang',
Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/MwEmbedSupport/mwEmbedSupport.js
@@ -282,7 +282,7 @@
283283 return '0:00:00';
284284 }
285285
286 - var tm = mw.seconds2Measurements( sec )
 286+ var tm = mw.seconds2Measurements( sec );
287287
288288 // Round the number of seconds to the required number of significant
289289 // digits
@@ -295,7 +295,7 @@
296296 tm.seconds = '0' + tm.seconds;
297297 }
298298 if( tm.hours == 0 ){
299 - hoursStr = ''
 299+ hoursStr = '';
300300 } else {
301301 if ( tm.minutes < 10 )
302302 tm.minutes = '0' + tm.minutes;
@@ -303,7 +303,7 @@
304304 hoursStr = tm.hours + ":";
305305 }
306306 return hoursStr + tm.minutes + ":" + tm.seconds;
307 - }
 307+ };
308308
309309 /**
310310 * Given seconds return array with 'days', 'hours', 'min', 'seconds'
@@ -313,12 +313,12 @@
314314 */
315315 mw.seconds2Measurements = function ( sec ){
316316 var tm = {};
317 - tm.days = Math.floor( sec / ( 3600 * 24 ) )
 317+ tm.days = Math.floor( sec / ( 3600 * 24 ) );
318318 tm.hours = Math.floor( sec / 3600 );
319319 tm.minutes = Math.floor( ( sec / 60 ) % 60 );
320320 tm.seconds = sec % 60;
321321 return tm;
322 - }
 322+ };
323323
324324 /**
325325 * Take hh:mm:ss,ms or hh:mm:ss.ms input, return the number of seconds
@@ -354,7 +354,7 @@
355355 sec = sec.replace( /,\s?/, '.' );
356356 // Return seconds float
357357 return parseInt( hour * 3600 ) + parseInt( min * 60 ) + parseFloat( sec );
358 - }
 358+ };
359359
360360 /**
361361 * addLoaderDialog small helper for displaying a loading dialog
@@ -371,7 +371,7 @@
372372 .html()
373373 });
374374 return $dialog;
375 - }
 375+ };
376376
377377
378378
@@ -402,7 +402,7 @@
403403 }, options );
404404
405405 if( ! options.title || ! options.content ){
406 - mw.log("Error: mwEmbed addDialog missing required options ( title, content ) ")
 406+ mw.log("Error: mwEmbed addDialog missing required options ( title, content ) ");
407407 return ;
408408 }
409409
@@ -422,7 +422,7 @@
423423 // Build the uiRequest
424424 var uiRequest = [ '$j.ui.dialog' ];
425425 if( options.draggable ){
426 - uiRequest.push( '$j.ui.draggable' )
 426+ uiRequest.push( '$j.ui.draggable' );
427427 }
428428 if( options.resizable ){
429429 uiRequest.push( '$j.ui.resizable' );
@@ -434,7 +434,7 @@
435435 buttons = { };
436436 options.buttons[ buttonMsg ] = function() {
437437 $j( this ).dialog( 'close' );
438 - }
 438+ };
439439 }
440440
441441 // Load the dialog resources
@@ -447,7 +447,7 @@
448448 $j( '#mwTempLoaderDialog' ).dialog( options );
449449 } );
450450 return $j( '#mwTempLoaderDialog' );
451 - }
 451+ };
452452
453453 /**
454454 * Close the loader dialog created with addLoaderDialog
@@ -505,7 +505,7 @@
506506 }
507507
508508 return false;
509 - }
 509+ };
510510
511511 mw.isMobileHTML5 = function(){
512512 // Check for a mobile html5 user agent:
@@ -528,7 +528,7 @@
529529 return true;
530530 }
531531 return false;
532 - }
 532+ };
533533
534534 mw.supportsFlash = function(){
535535 // Check if the client does not have flash and has the video tag

Status & tagging log