I am trying to write a browser extension for Firefox and want to use MathJax to show Mathematics in WhatsApp Web using Tex Notation. Whenever I try to load MathJax though, I get the following error:
The Error Code displayed in Firefox
This is the code that I have so far to inject MathJax into the website:
MathJax = {
tex: {
inlineMath:[['$', '$'],['\\(','\\)']]
}
}
const script = document.createElement('script');
script.type = 'text/javascript'
script.src = 'moz-extension://43ecc479-a843-4102-b4dc-afee633fe04a/MathJax/es5/tex-mml-chtml.js';
document.head.appendChild(script);
The Script source is the locally saved MathJax Version. I can not use a CDN because of the same origin policy.
I tried to use a different js File in MathJax, like the tex-chtml.js file but got the same error.