Skip to content

Instantly share code, notes, and snippets.

@adavidzh
Last active August 20, 2017 13:08
Show Gist options
  • Save adavidzh/9c9392a45c69825bacc0 to your computer and use it in GitHub Desktop.
Save adavidzh/9c9392a45c69825bacc0 to your computer and use it in GitHub Desktop.
Module for Minimalist for Everyhing that adds MathJax to feedly.com
{
"version": "0.7.0",
"preferences": {
"isEnabled": true
},
"modules": [
{
"name": "Load MathJax on feedly.com",
"author": "Andre David <andre.david@gmail.com>",
"includes": "*feedly.com*",
"version": "3.0.0",
"isEnabled": false,
"options": [
{
"description": "",
"isEnabled": true,
"fields": [],
"tab": "",
"section": ""
},
{
"description": "Load Mathjax",
"isEnabled": true,
"tab": "General",
"section": "General",
"type": "checkbox",
"fields": [],
"head": {
"js": [
"if (window.MathJax === undefined) { ",
" var script = document.createElement(\"script\"); ",
" script.type = \"text/javascript\"; ",
" script.src = \"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML\"; ",
" var config = 'MathJax.Hub.Config({ ' + 'extensions: [\"tex2jax.js\"], ' + 'tex2jax: { skipTags: [\"script\",\"noscript\",\"style\",\"textarea\"],inlineMath: [ [\"[;\", \";]\"], [\"$\",\"$\"] ], displayMath: [[\"[(;\",\";)]\"]], processEscapes: true }, ' + 'jax: [\"input/TeX\", \"output/HTML-CSS\"] ' + ' }); ' + 'MathJax.Hub.Startup.onload(); '; ",
" if (window.opera) { ",
" script.innerHTML = config;",
" } else { ",
" script.text = config;",
" } ",
" document.getElementsByTagName(\"head\")[0].appendChild(script); ",
" (doMathJax = function () { ",
" window.setTimeout(doMathJax, 1000); ",
" MathJax.Hub.Queue([\"Typeset\", MathJax.Hub]); ",
" })();",
"",
"} else {",
" MathJax.Hub.Queue([\"Typeset\", MathJax.Hub]); ",
"} "
]
},
"load": {}
}
],
"index": 1
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment