r110351 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110350‎ | r110351 | r110352 >
Date:01:02, 31 January 2012
Author:mah
Status:ok
Tags:
Comment:
revert r110340 after talking with krinle
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -1137,7 +1137,7 @@
11381138 * "text/javascript"; if no type is provided, text/javascript is assumed.
11391139 */
11401140 load: function ( modules, type ) {
1141 - var filtered, m, reValidURL;
 1141+ var filtered, m;
11421142
11431143 // Validate input
11441144 if ( typeof modules !== 'object' && typeof modules !== 'string' ) {
@@ -1146,8 +1146,7 @@
11471147 // Allow calling with an external url or single dependency as a string
11481148 if ( typeof modules === 'string' ) {
11491149 // Support adding arbitrary external scripts
1150 - reValidURL = new RegExp( '^((https?:)?\\/\\/|' + $.escapeRE( mw.config.get( 'wgScript' ) ) + ')' );
1151 - if ( reValidURL.test( modules ) ) {
 1150+ if ( /^(https?:)?\/\//.test( modules ) ) {
11521151 if ( type === 'text/css' ) {
11531152 $( 'head' ).append( $( '<link>', {
11541153 rel: 'stylesheet',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110340Fixes bug 34036 - [regression] mw.loader.load doesn't works as importScriptUR...mah23:07, 30 January 2012

Status & tagging log