r76738 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76737‎ | r76738 | r76739 >
Date:23:33, 15 November 2010
Author:dale
Status:deferred
Tags:
Comment:
* Adds a small timeout to let the player build out for chrome which gets ahead of itself in the domready fire event running before the code at the end of the current js file
Modified paths:
  • /branches/MwEmbedStandAlone/mwEmbed.js (modified) (history)
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/mwEmbed.js
@@ -95,7 +95,8 @@
9696 }
9797 // Check if we should "merge" the config
9898 if( typeof value == 'object' && typeof mwConfig[ name ] == 'object' ) {
99 - if ( value.constructor.toString().indexOf("Array") == -1 ){
 99+ if ( value.constructor.toString().indexOf("Array") != -1 &&
 100+ mwConfig[ name ].constructor.toString().indexOf("Array") != -1 ){
100101 // merge in the array
101102 mwConfig[ name ] = mwConfig[ name ].concat( value );
102103 } else {
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -4,7 +4,7 @@
55 */
66 var urlparts = getRemoteEmbedPath();
77 var mwEmbedHostPath = urlparts[0];
8 -var mwRemoteVersion = 'r173';
 8+var mwRemoteVersion = 'r174';
99 var mwUseScriptLoader = true;
1010
1111 // Log the mwRemote version makes it easy to debug cache issues
@@ -575,17 +575,20 @@
576576 // Add full window binding if embedplayer flag set:
577577 if( mwReqParam['embedplayer'] == 'yes' ){
578578 $j('#loadingPlayer').remove();
579 - $j('body').css('overflow', 'hidden');
580 - $j( '#mwe_' + vidId ).get(0).resizePlayer({
581 - 'width' : $j(window).width(),
582 - 'height' : $j(window).height()
583 - });
584 - $j(window).unbind().resize(function(){
 579+ $j('body').css('overflow', 'hidden');
 580+ // Add a small timeout chrome runs things out of order sometimes
 581+ setTimeout( function(){
585582 $j( '#mwe_' + vidId ).get(0).resizePlayer({
586583 'width' : $j(window).width(),
587584 'height' : $j(window).height()
588 - });
589 - });
 585+ });
 586+ $j(window).unbind().resize(function(){
 587+ $j( '#mwe_' + vidId ).get(0).resizePlayer({
 588+ 'width' : $j(window).width(),
 589+ 'height' : $j(window).height()
 590+ });
 591+ });
 592+ }, 10);
590593 }
591594
592595 // Issue an async request to rewrite the next clip

Status & tagging log