Last active
December 18, 2015 14:28
-
-
Save sir-deenicus/5797094 to your computer and use it in GitHub Desktop.
This is a very simple chrome plugin that allows latex to render in google plus. Installation is (simple). Download the zipped plugin from google drive [1](exactly same, conveniently packaged), go to extensions, check developer mode, unzip to a folder and click Load Unpacked Extenstion to load the folder [1] clickable link is a comment below.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var injectMathJax = document.createElement('script'); | |
var typeSet = document.createElement('script'); | |
var style=document.createElement('style'); | |
//modified: css https://github.com/christianp/mathjax-bookmarklet/blob/master/bookmarklet.js | |
style.innerText = '.MathJax .mn {background: inherit;} .MathJax .mi {color: inherit;} .MathJax .mo {background: inherit;}'; | |
injectMathJax.type = 'text/javascript'; | |
injectMathJax.src = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'; | |
typeSet.innerHTML = 'document.body.addEventListener("keydown",function(e){if(e.ctrlKey && e.shiftKey){MathJax.Hub.Queue(["Typeset",MathJax.Hub]); }});document.body.addEventListener("click",function(e) {if(e.target.nodeName == "SPAN"){MathJax.Hub.Queue(["Typeset",MathJax.Hub]); }});'; | |
(document.head||document.documentElement).appendChild(injectMathJax); | |
(document.head||document.documentElement).appendChild(typeSet); | |
(document.head||document.documentElement).appendChild(style); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Mx", | |
"description": "math jax inject", | |
"version": "1.0", | |
"content_security_policy": "script-src 'self' https://c328740.ssl.cf1.rackcdn.com/mathjax/; object-src 'self'", | |
"web_accessible_resources":["https://c328740.ssl.cf1.rackcdn.com/mathjax/*"], | |
"content_scripts": [{ | |
"js": ["mx.js"], | |
"matches": ["https://plus.google.com/*"] | |
}], | |
"permissions": [ | |
"https://plus.google.com/", | |
"https://c328740.ssl.cf1.rackcdn.com/mathjax/*" | |
] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.google.com/uc?export=download&id=0B0XZybAM9XBAeFlkcTRVU1RrcWc