MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
}; | }; | ||
*/ | */ | ||
/* 250221 doesn't work either.. | |||
* from https://stackoverflow.com/questions/31891619/mediawiki-removed-mathjax-can-mathjax-be-forced-on-client-side-another-way | |||
var mathTags = $('.mwe-math-mathml-a11y'); | var mathTags = $('.mwe-math-mathml-a11y'); | ||
if (mathTags.length > 0){ //only do something when there's math on the page | if (mathTags.length > 0){ //only do something when there's math on the page | ||
Line 26: | Line 28: | ||
}; | }; | ||
} | } | ||
*/ |
Latest revision as of 02:35, 21 February 2025
/* Any JavaScript here will be loaded for all users on every page load.
* Ignored on mobile devices, see MediaWiki:Mobile.js
*/
mw.loader.load( 'https://wiki.evoludo.org/gwt/evoludoweb/evoludoweb.nocache.js' );
/* 250221 doesn't enable equation numbering... why?
* see https://docs.mathjax.org/en/latest/input/tex/eqnumbers.html
window.MathJax = {
tex: {
tags: 'ams'
}
};
*/
/* 250221 doesn't work either..
* from https://stackoverflow.com/questions/31891619/mediawiki-removed-mathjax-can-mathjax-be-forced-on-client-side-another-way
var mathTags = $('.mwe-math-mathml-a11y');
if (mathTags.length > 0){ //only do something when there's math on the page
window.MathJax = { //hook into MathJax's configuration
AuthorInit: function () {
MathJax.Hub.Register.StartupHook("End",function () { //when MathJax is done...
MathJax.Hub.Queue(
function(){
mathTags.removeClass('mwe-math-mathml-a11y'); // .. make the span around MathML (now MathJax output) visible
$('.mwe-math-fallback-image-inline').addClass('mwe-math-mathml-a11y'); //hide fallback images
}
);
});
}
};
}
*/