From: Krinkle Date: Mon, 25 Jul 2011 23:04:30 +0000 (+0000) Subject: Add support for relative-protocol urls in mw.loader.load X-Git-Tag: 1.31.0-rc.0~28622 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=c3426ac958922b7fcd27a351f1ff5fc32425ce5e;p=lhc%2Fweb%2Fwiklou.git Add support for relative-protocol urls in mw.loader.load --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index e9947bcf33..00b8218c61 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -990,7 +990,7 @@ window.mw = window.mediaWiki = new ( function( $ ) { // Allow calling with an external script or single dependency as a string if ( typeof modules === 'string' ) { // Support adding arbitrary external scripts - if ( modules.substr( 0, 7 ) === 'http://' || modules.substr( 0, 8 ) === 'https://' ) { + if ( modules.substr( 0, 7 ) === 'http://' || modules.substr( 0, 8 ) === 'https://' || modules.substr( 0, 2 ) === '//' ) { if ( type === 'text/css' ) { $( 'head' ).append( $( '', { rel: 'stylesheet',