Fix link to PNG fallback for IE 8 and older

Change-Id: Iffb65af756a8fc53fcc9f484c783f69f8d908690
This commit is contained in:
physikerwelt 2016-01-06 23:12:56 +01:00 committed by Physikerwelt
parent 125b2e003c
commit c085e6952b

View file

@ -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 );