Difference between revisions of "MediaWiki:Common.js"

From Turmlabor Wiki
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: function waitForMathJax($content) { if (typeof MathJax === 'undefined') { setTimeout(function...")
 
(No difference)

Latest revision as of 20:48, 27 July 2020

/* Any JavaScript here will be loaded for all users on every page load. */

function waitForMathJax($content) {
  if (typeof MathJax === 'undefined') {
    setTimeout(function () { waitForMathJax($content); }, 1000);
  } else {
    MathJax.Hub.Queue(["Typeset", MathJax.Hub, $content[0]]).execute();
  }
}

mw.hook('wikipage.content').add(waitForMathJax);