Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -1028,9 +1028,11 @@ |
1029 | 1029 | // Support adding arbitrary external scripts |
1030 | 1030 | if ( modules.substr( 0, 7 ) == 'http://' || modules.substr( 0, 8 ) == 'https://' ) { |
1031 | 1031 | if ( type === 'text/css' ) { |
1032 | | - $( 'head' ) |
1033 | | - .append( $( '<link rel="stylesheet" type="text/css" />' ) |
1034 | | - .attr( 'href', modules ) ); |
| 1032 | + $( 'head' ).append( $( '<link />', { |
| 1033 | + rel: 'stylesheet', |
| 1034 | + type: 'text/css', |
| 1035 | + href: modules |
| 1036 | + } ) ); |
1035 | 1037 | return true; |
1036 | 1038 | } else if ( type === 'text/javascript' || typeof type === 'undefined' ) { |
1037 | 1039 | var script = mediaWiki.html.element( 'script', |
— | — | @@ -1206,6 +1208,10 @@ |
1207 | 1209 | |
1208 | 1210 | } )( jQuery ); |
1209 | 1211 | |
| 1212 | +// Alias $j to jQuery for backwards compatibility |
| 1213 | +window.$j = jQuery; |
| 1214 | +window.mw = mediaWiki; |
| 1215 | + |
1210 | 1216 | /* Auto-register from pre-loaded startup scripts */ |
1211 | 1217 | |
1212 | 1218 | if ( $.isFunction( startUp ) ) { |
— | — | @@ -1214,8 +1220,4 @@ |
1215 | 1221 | } |
1216 | 1222 | |
1217 | 1223 | // Add jQuery Cookie to initial payload (used in mediaWiki.user) |
1218 | | -mediaWiki.loader.load( 'jquery.cookie' ); |
1219 | | - |
1220 | | -// Alias $j to jQuery for backwards compatibility |
1221 | | -window.$j = jQuery; |
1222 | | -window.mw = mediaWiki; |
| 1224 | +mw.loader.load( 'jquery.cookie' ); |