Open main menu

CUGC Wiki β

Changes

MediaWiki:Common.js

276 bytes added, 16:22, 12 March 2019
Wait for MathJax; debugging.
// MathJax typesetting in edit previews
mw.hookfunction mathJaxTypeset() { function waitForMathJax() { if (typeof MathJax === 'wikipage.contentundefined'){ setTimeout(waitForMathJax, 1000); console.add(function log('Waiting for MathJax.') ; } else { MathJax.Hub.Queue(["Typeset", MathJax.Hub, "wikiPreview"]).execute(); alert('Found MathJax; typeset done.'); } } waitForMathJax();}mw.hook('wikipage.content').add(mathJaxTypeset);