
dale at svn
Nov 7, 2009, 5:56 AM
Post #1 of 1
(20 views)
Permalink
|
|
SVN: [58707] trunk/phase3/js2
|
|
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/58707 Revision: 58707 Author: dale Date: 2009-11-07 13:56:20 +0000 (Sat, 07 Nov 2009) Log Message: ----------- * uses url for title key Modified Paths: -------------- trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js trunk/phase3/js2/remoteMwEmbed.js Modified: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js =================================================================== --- trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js 2009-11-07 13:52:41 UTC (rev 58706) +++ trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js 2009-11-07 13:56:20 UTC (rev 58707) @@ -335,7 +335,7 @@ } } //update duration from hit if present: - if(this.durationHint) + if( this.durationHint ) this.duration = this.durationHint; Modified: trunk/phase3/js2/remoteMwEmbed.js =================================================================== --- trunk/phase3/js2/remoteMwEmbed.js 2009-11-07 13:52:41 UTC (rev 58706) +++ trunk/phase3/js2/remoteMwEmbed.js 2009-11-07 13:56:20 UTC (rev 58707) @@ -63,7 +63,10 @@ // will be depreciated in favor of updates to OggHandler function rewrite_for_OggHandler( vidIdList ){ function procVidId( vidId ){ - js_log('vidIdList length: ' + vidIdList.length + ' left in the set: ' + vidIdList ); + //don't proccess empty vids + if(!vidId) + return ; + js_log('vidIdList on: ' + vidId +' length: ' + vidIdList.length + ' left in the set: ' + vidIdList ); // Grab the thumbnail and src of the video var pimg = $j( '#' + vidId + ' img' ); @@ -85,7 +88,8 @@ // Parsed values: var src = ''; var duration_attr = ''; - var wikiTitleKey = $j( '#'+vidId + ' img').filter(':first').attr('alt').replace(/ /g, '_'); + var wikiTitleKey = $j( '#'+vidId + ' img').filter(':first').attr('src').split('/'); + wikiTitleKey = unescape( wikiTitleKey[ wikiTitleKey.length - 2 ] ); var re = new RegExp( /videoUrl(":?\s*)*([^&]*)/ ); src = re.exec( $j( '#'+vidId ).html() )[2]; @@ -122,8 +126,7 @@ } rewrite_by_id( 'mwe_' + vidId, function(){ - if(vidIdList.length != 0){ - alert('did first rewite now doing another'); + if( vidIdList.length != 0 ){ setTimeout( function(){ procVidId( vidIdList.pop() ) }, 1); @@ -131,9 +134,7 @@ }); }; //process each item in the vidIdList (with setTimeout to avoid locking) - setTimeout( function(){ - procVidId( vidIdList.pop() ) - }, 1); + procVidId( vidIdList.pop() ); } function getRemoteEmbedPath() { for( var i = 0; i < document.getElementsByTagName( 'script' ).length; i++ ) { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS[at]lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
|