Remove MathPlayer

* MathPlayer stopped working around IE8

Bug: T298971
Change-Id: I759a5dc61eaf27a99d952366cf9c4380748f8e82
This commit is contained in:
Moritz Schubotz (physikerwelt) 2023-03-15 09:58:34 +01:00
parent b843a09e92
commit c560ff0cd8
No known key found for this signature in database
GPG key ID: F803DB146DDF36C3
5 changed files with 0 additions and 23 deletions

View file

@ -207,13 +207,6 @@
"mobile" "mobile"
] ]
}, },
"ext.math.scripts": {
"scripts": "ext.math.js",
"targets": [
"desktop",
"mobile"
]
},
"ext.math.popup": { "ext.math.popup": {
"es6": true, "es6": true,
"packageFiles": "ext.math.popup.js", "packageFiles": "ext.math.popup.js",

View file

@ -1,12 +0,0 @@
/* eslint-disable no-jquery/no-global-selector */
( function () {
'use strict';
// If MathPlayer is installed we show the MathML rendering.
if ( navigator.userAgent.indexOf( 'MathPlayer' ) > -1 ) {
$( '.mwe-math-mathml-a11y' ).removeClass( 'mwe-math-mathml-a11y' );
$( '.mwe-math-fallback-image-inline, .mwe-math-fallback-image-display' ).css( 'display', 'none' );
return;
}
}() );

View file

@ -80,7 +80,6 @@ class ParserHooksHandler implements
$parser->getOutput()->addModules( [ 'ext.math.popup' ] ); $parser->getOutput()->addModules( [ 'ext.math.popup' ] );
} }
if ( $mode == MathConfig::MODE_MATHML ) { if ( $mode == MathConfig::MODE_MATHML ) {
$parser->getOutput()->addModules( [ 'ext.math.scripts' ] );
$marker = Parser::MARKER_PREFIX . $marker = Parser::MARKER_PREFIX .
'-postMath-' . sprintf( '%08X', $this->mathTagCounter++ ) . '-postMath-' . sprintf( '%08X', $this->mathTagCounter++ ) .
Parser::MARKER_SUFFIX; Parser::MARKER_SUFFIX;

View file

@ -53,7 +53,6 @@ class MathDataUpdater implements StatementDataUpdater {
*/ */
public function updateParserOutput( ParserOutput $parserOutput ) { public function updateParserOutput( ParserOutput $parserOutput ) {
if ( $this->hasMath ) { if ( $this->hasMath ) {
$parserOutput->addModules( [ 'ext.math.scripts' ] );
$parserOutput->addModuleStyles( [ 'ext.math.styles' ] ); $parserOutput->addModuleStyles( [ 'ext.math.styles' ] );
} }
} }

View file

@ -43,7 +43,6 @@ class MathDataUpdaterTest extends MediaWikiIntegrationTestCase {
'addModules', 'addModules',
'addModuleStyles', 'addModuleStyles',
] )->getMock(); ] )->getMock();
$parserOutput->expects( $this->never() )->method( 'addModules' );
$parserOutput->expects( $this->never() )->method( 'addModuleStyles' ); $parserOutput->expects( $this->never() )->method( 'addModuleStyles' );
/** @var ParserOutput $parserOutput */ /** @var ParserOutput $parserOutput */
$updater->updateParserOutput( $parserOutput ); $updater->updateParserOutput( $parserOutput );
@ -58,7 +57,6 @@ class MathDataUpdaterTest extends MediaWikiIntegrationTestCase {
'addModules', 'addModules',
'addModuleStyles', 'addModuleStyles',
] )->getMock(); ] )->getMock();
$parserOutput->expects( $this->once() )->method( 'addModules' );
$parserOutput->expects( $this->once() )->method( 'addModuleStyles' ); $parserOutput->expects( $this->once() )->method( 'addModuleStyles' );
/** @var ParserOutput $parserOutput */ /** @var ParserOutput $parserOutput */
$updater->updateParserOutput( $parserOutput ); $updater->updateParserOutput( $parserOutput );