Jump to content

User:Sevastien/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Sevastien (talk | contribs) at 21:55, 6 October 2021. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var mathTags = $('.mwe-math-mathml-a11y');
if (mathTags.length > 0){
  window.MathJax = {
    AuthorInit: function () {
      MathJax.Hub.Register.StartupHook("End",function () {
        MathJax.Hub.Queue(
            function(){
             mathTags.removeClass('mwe-math-mathml-a11y');
             $('.mwe-math-fallback-image-inline').addClass('mwe-math-mathml-a11y');
            }
        );
      });
    }
  };
  mw.loader.load('https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_HTMLorMML-full');
}