markdownload
markdownload copied to clipboard
Uncaught ReferenceError: MathJax is not defined
- Go to https://www.bauhaus.se/sticksag-bosch-universal-saw-18v-100-utan-batteri
- Right click -> MarkDownload -> Copy tab URL as markdown link
Observe that:
- tab URL is actually copied
- Page gets messed up when you perform this
- DevTools console shows:
Uncaught ReferenceError: MathJax is not defined
addLatexToMathJax3 moz-extension://27f8dedc-9407-414d-89c1-3d31b02448e4/contentScript/pageContext.js:3
<anonymous> moz-extension://27f8dedc-9407-414d-89c1-3d31b02448e4/contentScript/pageContext.js:11
[pageContext.js:3:9](moz-extension://27f8dedc-9407-414d-89c1-3d31b02448e4/contentScript/pageContext.js)
The code at fault seems to be:
function addLatexToMathJax3()
{
if (!MathJax?.startup?.document?.math)
return
for (math of MathJax.startup.document.math)
{
math.typesetRoot.setAttribute("markdownload-latex", math.math)
}
}
addLatexToMathJax3()
Using MarkDownload Version 3.4.0 on Firefox 140.
Including the script from here solves it:
https://github.com/mathjax/MathJax