Skip to content

Uncaught ReferenceError: MathJax is not defined #377

@valenting

Description

@valenting
  1. Go to https://www.bauhaus.se/sticksag-bosch-universal-saw-18v-100-utan-batteri
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions