diff --git a/extension.json b/extension.json index 91e503146..9c50c0e6d 100644 --- a/extension.json +++ b/extension.json @@ -207,13 +207,6 @@ "mobile" ] }, - "ext.math.scripts": { - "scripts": "ext.math.js", - "targets": [ - "desktop", - "mobile" - ] - }, "ext.math.popup": { "es6": true, "packageFiles": "ext.math.popup.js", diff --git a/modules/ext.math.js b/modules/ext.math.js deleted file mode 100644 index 02b434827..000000000 --- a/modules/ext.math.js +++ /dev/null @@ -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; - } - -}() ); diff --git a/src/HookHandlers/ParserHooksHandler.php b/src/HookHandlers/ParserHooksHandler.php index f730d9d22..d9167c636 100644 --- a/src/HookHandlers/ParserHooksHandler.php +++ b/src/HookHandlers/ParserHooksHandler.php @@ -80,7 +80,6 @@ class ParserHooksHandler implements $parser->getOutput()->addModules( [ 'ext.math.popup' ] ); } if ( $mode == MathConfig::MODE_MATHML ) { - $parser->getOutput()->addModules( [ 'ext.math.scripts' ] ); $marker = Parser::MARKER_PREFIX . '-postMath-' . sprintf( '%08X', $this->mathTagCounter++ ) . Parser::MARKER_SUFFIX; diff --git a/src/MathDataUpdater.php b/src/MathDataUpdater.php index 340ad387f..befd59e20 100644 --- a/src/MathDataUpdater.php +++ b/src/MathDataUpdater.php @@ -53,7 +53,6 @@ class MathDataUpdater implements StatementDataUpdater { */ public function updateParserOutput( ParserOutput $parserOutput ) { if ( $this->hasMath ) { - $parserOutput->addModules( [ 'ext.math.scripts' ] ); $parserOutput->addModuleStyles( [ 'ext.math.styles' ] ); } } diff --git a/tests/phpunit/MathDataUpdaterTest.php b/tests/phpunit/MathDataUpdaterTest.php index 7a31d139a..3708504b3 100644 --- a/tests/phpunit/MathDataUpdaterTest.php +++ b/tests/phpunit/MathDataUpdaterTest.php @@ -43,7 +43,6 @@ class MathDataUpdaterTest extends MediaWikiIntegrationTestCase { 'addModules', 'addModuleStyles', ] )->getMock(); - $parserOutput->expects( $this->never() )->method( 'addModules' ); $parserOutput->expects( $this->never() )->method( 'addModuleStyles' ); /** @var ParserOutput $parserOutput */ $updater->updateParserOutput( $parserOutput ); @@ -58,7 +57,6 @@ class MathDataUpdaterTest extends MediaWikiIntegrationTestCase { 'addModules', 'addModuleStyles', ] )->getMock(); - $parserOutput->expects( $this->once() )->method( 'addModules' ); $parserOutput->expects( $this->once() )->method( 'addModuleStyles' ); /** @var ParserOutput $parserOutput */ $updater->updateParserOutput( $parserOutput );