Open main menu

CUGC Wiki β

Changes

MediaWiki:Common.js

54 bytes removed, 16:45, 12 March 2019
Get element from $content.
mw.hook('wikipage.content').add(function ($content) {
console.log($content);
console.log(typeof $content[0]); var element = $content[0];
var observer = new MutationObserver(function(mutations) {
if (document.contains($contentelement)) {
console.log("It's in the DOM!");
// using $content directly throws errors MathJax.Hub.Queue(["Typeset", MathJax.Hub, document.getElementById("wikiPreview")element]).execute();
observer.disconnect();
} else {