Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -1071,7 +1071,7 @@ |
1072 | 1072 | // Allow calling with an external script or single dependency as a string |
1073 | 1073 | if ( typeof modules === 'string' ) { |
1074 | 1074 | // Support adding arbitrary external scripts |
1075 | | - if ( modules.substr( 0, 7 ) === 'http://' || modules.substr( 0, 8 ) === 'https://' || modules.substr( 0, 2 ) === '//' ) { |
| 1075 | + if ( /^(https?:)?\/\//.test( modules ) ) { |
1076 | 1076 | if ( type === 'text/css' ) { |
1077 | 1077 | $( 'head' ).append( $( '<link/>', { |
1078 | 1078 | rel: 'stylesheet', |