r93141 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93140‎ | r93141 | r93142 >
Date:23:04, 25 July 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
Add support for relative-protocol urls in mw.loader.load
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -990,7 +990,7 @@
991991 // Allow calling with an external script or single dependency as a string
992992 if ( typeof modules === 'string' ) {
993993 // Support adding arbitrary external scripts
994 - if ( modules.substr( 0, 7 ) === 'http://' || modules.substr( 0, 8 ) === 'https://' ) {
 994+ if ( modules.substr( 0, 7 ) === 'http://' || modules.substr( 0, 8 ) === 'https://' || modules.substr( 0, 2 ) === '//' ) {
995995 if ( type === 'text/css' ) {
996996 $( 'head' ).append( $( '<link/>', {
997997 rel: 'stylesheet',

Follow-up revisions

RevisionCommit summaryAuthorDate
r93426MFT to REL1_18...hashar20:20, 28 July 2011
r945571.17wmf1: MFT r87099, r90729, r93141, r93517, r93891, r94155, r94277, r94372catrope20:12, 15 August 2011

Comments

#Comment by Catrope (talk | contribs)   23:05, 25 July 2011

Untagging 1.17, which doesn't support protocol-relative URLs anyway. 1.17wmf1 and 1.18 should still get this though.

Status & tagging log