mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
Fix link to PNG fallback for IE 8 and older
Change-Id: Iffb65af756a8fc53fcc9f484c783f69f8d908690
This commit is contained in:
parent
125b2e003c
commit
c085e6952b
|
@ -16,7 +16,7 @@
|
||||||
// Create a new PNG image to use as the fallback.
|
// Create a new PNG image to use as the fallback.
|
||||||
img = document.createElement( 'img' );
|
img = document.createElement( 'img' );
|
||||||
url = this.style.backgroundImage.match( /url\('?([^']*)'?\)/ )[ 1 ];
|
url = this.style.backgroundImage.match( /url\('?([^']*)'?\)/ )[ 1 ];
|
||||||
img.setAttribute( 'src', url.replace( 'mode=' + 'mathml', 'mode=' + 'png' ) );
|
img.setAttribute( 'src', url.replace( 'media/math/render/svg/', 'media/math/render/png/' ) );
|
||||||
img.setAttribute( 'class', 'tex mwe-math-fallback-image-' + ( $( this ).hasClass( 'mwe-math-fallback-image-inline' ) ? 'inline' : 'display' ) );
|
img.setAttribute( 'class', 'tex mwe-math-fallback-image-' + ( $( this ).hasClass( 'mwe-math-fallback-image-inline' ) ? 'inline' : 'display' ) );
|
||||||
img.setAttribute( 'aria-hidden', 'true' );
|
img.setAttribute( 'aria-hidden', 'true' );
|
||||||
this.parentNode.insertBefore( img, this );
|
this.parentNode.insertBefore( img, this );
|
||||||
|
|
Loading…
Reference in a new issue