r89935 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89934‎ | r89935 | r89936 >
Date:19:31, 12 June 2011
Author:dale
Status:deferred
Tags:
Comment:
jquery 1.6.1 . keeps object properties and real attributes separated, use object access method for custom properties
Modified paths:
  • /trunk/extensions/MwEmbedSupport/.project (modified) (history)
  • /trunk/extensions/MwEmbedSupport/MwEmbedModules/MediaWikiSupport/resources/mw.MediaWikiPlayerSupport.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MwEmbedSupport/.project
@@ -1,6 +1,6 @@
22 <?xml version="1.0" encoding="UTF-8"?>
33 <projectDescription>
4 - <name>MwEmbed</name>
 4+ <name>MwEmbedSupport</name>
55 <comment></comment>
66 <projects>
77 </projects>
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MediaWikiSupport/resources/mw.MediaWikiPlayerSupport.js
@@ -1,6 +1,4 @@
2 -
32 ( function( mw, $ ) {
4 -
53 /**
64 * Merge in the default video attributes supported by embedPlayer:
75 */
@@ -21,17 +19,16 @@
2220 * Closure function wraps mediaWiki embedPlayer bindings
2321 */
2422 mw.addMediaWikiPlayerSupport = function( embedPlayer ){
25 -
2623 // Set some local variables:
27 - if( ! $( embedPlayer).attr( 'data-mwtitle' ) ){
 24+ if( ! embedPlayer['data-mwtitle'] ){
2825 return false;
2926 } else {
30 - var apiTitleKey = $( embedPlayer).attr( 'data-mwtitle');
 27+ var apiTitleKey = embedPlayer['data-mwtitle'];
3128 // legacy support ( set as attribute )
3229 embedPlayer.apiTitleKey = apiTitleKey;
3330 }
3431 // Set local apiProvider via config if not defined
35 - var apiProvider = $( embedPlayer ).attr('data-mwprovider');
 32+ var apiProvider = embedPlayer['data-mwprovider'];
3633 if( !apiProvider ){
3734 apiProvider = mw.getConfig( 'EmbedPlayer.ApiProvider' );
3835 }
@@ -228,7 +225,6 @@
229226 callback( true );
230227 } );
231228 };
232 -
233229 /**
234230 * Adds embedPlayer Bindings
235231 */

Status & tagging log