Created
September 9, 2021 19:32
-
-
Save J3698/445ecaedd0535ef25b47f6e8f503e40c to your computer and use it in GitHub Desktop.
Typeset all over again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addReTypesetHandler() { | |
var script = document.createElement("script"); | |
script.innerHTML = ` | |
last = "1"; | |
setInterval(function() { | |
var tag = document.getElementsByClassName("invisible")[0]; | |
if (tag.innerHTML != last) { | |
MathJax.Hub.Queue(["Typeset", MathJax.Hub]); | |
last = tag.innerHTML; | |
} | |
}, 50); | |
` | |
document.body.appendChild(script); | |
var updateTag = document.createElement("span"); | |
updateTag.classList.add("invisible"); | |
document.body.appendChild(updateTag); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment