mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +00:00
Merge "Allow data URLs for toolbar icons"
This commit is contained in:
commit
c36ba4893e
|
@ -196,6 +196,12 @@
|
|||
key = fallbackChain[ i ];
|
||||
if ( icon && hasOwn.call( icon, key ) ) {
|
||||
src = icon[ key ];
|
||||
|
||||
// Return a data URL immediately
|
||||
if ( src.substr( 0, 5 ) === 'data:' ) {
|
||||
return src;
|
||||
}
|
||||
|
||||
// Prepend path if src is not absolute
|
||||
if ( src.substr( 0, 7 ) !== 'http://' && src.substr( 0, 8 ) !== 'https://' && src[ 0 ] !== '/' ) {
|
||||
src = path + src;
|
||||
|
|
Loading…
Reference in a new issue