Skip to content

Instantly share code, notes, and snippets.

@lan496
Created September 30, 2019 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lan496/db1dcadee924e02ff14d23f727c68520 to your computer and use it in GitHub Desktop.
Save lan496/db1dcadee924e02ff14d23f727c68520 to your computer and use it in GitHub Desktop.
User script for Tampermonkey that renders TeX symbols
// ==UserScript==
// @name Enable MathJax
// @namespace http://tampermonkey.net/
// @version 0.1
// @description enable MathJax in inoreader pages
// @author lan496
// @match https://www.inoreader.com/*
// @grant none
// ==/UserScript==
window.MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
function renderMathJax() {
window.MathJax.typeset()
};
(function () {
let script = document.createElement('script');
script.type = "text/javascript";
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js';
script.async = true;
document.head.appendChild(script);
setInterval(renderMathJax, 1000)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment