# Difference between revisions of "MediaWiki:Common.js"

From CUGC Wiki

(Enable MathJax typesetting on edit preview pages.) |
(Using $content doesn't seem to work.) |
||

Line 2: | Line 2: | ||

// MathJax typesetting in edit previews | // MathJax typesetting in edit previews | ||

− | mw.hook('wikipage.content').add(function ( | + | mw.hook('wikipage.content').add(function () { |

− | MathJax.Hub.Queue(["Typeset", MathJax.Hub, | + | MathJax.Hub.Queue(["Typeset", MathJax.Hub, "wikiPreview"]); |

}); | }); |

## Revision as of 16:51, 12 March 2019

/* Any JavaScript here will be loaded for all users on every page load. */ // MathJax typesetting in edit previews mw.hook('wikipage.content').add(function () { MathJax.Hub.Queue(["Typeset", MathJax.Hub, "wikiPreview"]); });