Physikerwelt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355798 )

Change subject: Add PNG and MathPlayer fallback for Wikidata user
......................................................................

Add PNG and MathPlayer fallback for Wikidata user

In MathML rendering mode custom javascript is executed
to check if the brower has MathPlayer installed. In addition
it's checked if the browser supports SVG rendering. This
functionality was broken in Wikidata, since the scripts were
loaded as styles and not as JS modules.

Change-Id: I5fd8eafc89e01c6ec10cf0f3b71e885ec3a4399c
---
M MathWikidataHook.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/98/355798/1

diff --git a/MathWikidataHook.php b/MathWikidataHook.php
index cc14635..5f79bdc 100644
--- a/MathWikidataHook.php
+++ b/MathWikidataHook.php
@@ -42,6 +42,7 @@
                        'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
                                global $wgOut;
                                $wgOut->addModuleStyles( [ 'ext.math.styles' ] 
);
+                               $wgOut->addModules( [ 'ext.math.scripts' ] );
                                return new MathFormatter( $format );
                        },
                        'rdf-builder-factory-callback' => function (
@@ -71,6 +72,7 @@
                        'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
                                global $wgOut;
                                $wgOut->addModuleStyles( [ 'ext.math.styles' ] 
);
+                               $wgOut->addModules( [ 'ext.math.scripts' ] );
                                return new MathFormatter( $format );
                        },
                ];

-- 
To view, visit https://gerrit.wikimedia.org/r/355798
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fd8eafc89e01c6ec10cf0f3b71e885ec3a4399c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <w...@physikerwelt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to