acarapetis / mathjax-for-reddit Goto Github PK
View Code? Open in Web Editor NEWA userscript for rendering LaTeX on reddit using MathJax
License: MIT License
A userscript for rendering LaTeX on reddit using MathJax
License: MIT License
In the browser console, I see this error appear about once every second, exactly on any Reddit page, exactly when the user script is enabled.
Uncaught ReferenceError: $ is not defined
doMathJax MathJax for Reddit.user.js:24
r helpers.js:74
setTimeout handler*./node_modules/ vendors~Chat~Governance~Reddit.679ce754890c451d4393.js:1
doMathJax MathJax for Reddit.user.js:22
r helpers.js:74
setTimeout handler*./node_modules/ vendors~Chat~Governance~Reddit.679ce754890c451d4393.js:1
doMathJax MathJax for Reddit.user.js:22
r helpers.js:74
setTimeout handler*./node_modules/ vendors~Chat~Governance~Reddit.679ce754890c451d4393.js:1
doMathJax MathJax for Reddit.user.js:22
r helpers.js:74
setTimeout handler*./node_modules/ vendors~Chat~Governance~Reddit.679ce754890c451d4393.js:1
doMathJax MathJax for Reddit.user.js:22
setTimeout handler*doMathJax MathJax for Reddit.user.js:22
VMin026crv9r7 MathJax for Reddit.user.js:25
VMin026crv9r7 MathJax for Reddit.user.js:30
a injected-web.js:1
v injected-web.js:1
set injected-web.js:1
<anonymous> MathJax for Reddit.user.js:1
c injected-web.js:1
ScriptData injected-web.js:1
onHandle injected-web.js:1
c injected-web.js:1
line 1 > injectedScript:24:9
doMathJax MathJax for Reddit.user.js:24
r helpers.js:74
(Async: setTimeout handler)
_wrapTimeFunction trycatch.js:28
doMathJax MathJax for Reddit.user.js:22
r helpers.js:74
(Async: setTimeout handler)
_wrapTimeFunction trycatch.js:28
doMathJax MathJax for Reddit.user.js:22
r helpers.js:74
(Async: setTimeout handler)
_wrapTimeFunction trycatch.js:28
doMathJax MathJax for Reddit.user.js:22
r helpers.js:74
(Async: setTimeout handler)
_wrapTimeFunction trycatch.js:28
doMathJax MathJax for Reddit.user.js:22
(Async: setTimeout handler)
doMathJax MathJax for Reddit.user.js:22
VMin026crv9r7 MathJax for Reddit.user.js:25
VMin026crv9r7 MathJax for Reddit.user.js:30
a injected-web.js:1
v injected-web.js:1
set injected-web.js:1
<anonymous> MathJax for Reddit.user.js:1
v injected.js:1
g injected.js:1
k injected.js:1
onHandle injected.js:1
s injected.js:1
c injected-web.js:1
ScriptData injected-web.js:1
onHandle injected-web.js:1
c injected-web.js:1
s injected.js:1
O injected.js:1
forEach self-hosted:205
b injected.js:1
O injected.js:1
forEach self-hosted:205
b injected.js:1
O injected.js:1
h injected.js:1
(Async: EventListener.handleEvent)
h injected.js:1
<anonymous> injected.js:1
AsyncFunctionNext self-hosted:692
(Async: async)
<anonymous> injected.js:1
<anonymous> injected.js:1
n injected.js:1
<anonymous> injected.js:1
<anonymous> injected.js:1
n injected.js:1
<anonymous> injected.js:1
<anonymous> injected.js:1
inject ExtensionContent.jsm:575
AsyncFunctionNext self-hosted:692
I am on a recent Firefox with Violentmonkey user script extension.
See example here. I checked on both new and old Reddit in Firefox. The equation [; \sum_{n=1}^{\infty}{ \frac{1}{n^2} } = \frac{\pi^2}{6} ;]
is displayed as LaTeX only when it is put into a code block. If it is put in plain text, the carets get interpreted as Reddit's markup and turned into <sup>
tags.
One possible way to solve this is to rewrite all <sup>
tags found between the LaTeX delimiters back to LaTeX notation they are supposed to be.
The cheap way to go about it is to simply ask everyone to put their equations into code blocks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.