window.MathJax 在 Firefox 中未定义,适用于 Chrome 扩展
window.MathJax is undefined in Firefox, works in Chrome extension
我正在尝试在注入 MathJax 3.0.1 into arbitrary web pages, Green Pi 中编写一个 Chrome/Firefox 扩展。它在 Chrome 上运行良好,但我在使用 Firefox 时遇到问题。
content_script.js
是
MathJax = {
chtml: {
fontURL: chrome.runtime.getURL("fonts"),
},
};
require("mathjax-full/components/src/tex-chtml/tex-chtml.js");
// This paints pages green
// require("green.js");
// // cat green.js == document.body.style.backgroundColor = "green";
(当用户选择某些页面的 in/out 时会涉及更多,但这与此处无关。)
现在,如代码中所述,上述代码在 Chrome 中运行良好,但在 Firefox 中失败并出现 MathJax 错误
MathJax(?): window.MathJax is undefined
我没有看到任何其他警告或错误。关于这里可能出了什么问题的任何提示?
这毕竟是一个 MathJax 错误,请参见。 https://github.com/mathjax/MathJax/issues/2399.
我正在尝试在注入 MathJax 3.0.1 into arbitrary web pages, Green Pi 中编写一个 Chrome/Firefox 扩展。它在 Chrome 上运行良好,但我在使用 Firefox 时遇到问题。
content_script.js
是
MathJax = {
chtml: {
fontURL: chrome.runtime.getURL("fonts"),
},
};
require("mathjax-full/components/src/tex-chtml/tex-chtml.js");
// This paints pages green
// require("green.js");
// // cat green.js == document.body.style.backgroundColor = "green";
(当用户选择某些页面的 in/out 时会涉及更多,但这与此处无关。)
现在,如代码中所述,上述代码在 Chrome 中运行良好,但在 Firefox 中失败并出现 MathJax 错误
MathJax(?): window.MathJax is undefined
我没有看到任何其他警告或错误。关于这里可能出了什么问题的任何提示?
这毕竟是一个 MathJax 错误,请参见。 https://github.com/mathjax/MathJax/issues/2399.