Last updated: 9 May 2017
This is an offshoot of ChatJax, which enables MathJax along with mhchem on chat.
CopyIn order to enable MathJax in chat, please follow the textfollowing instructions (courtesy of mhchem's answer below):
- Copy this code into your clipboard
javascript:(function(){if(window.MathJax===undefined){var%20script=documentvar script=document.createElement("script");script.type="text/javascript";script.src="https://d3eoax9i5htok0cdnjs.cloudfrontcloudflare.netcom/ajax/libs/mathjax/latest2.7.1/MathJax.js?config=TeX-AMS_HTML";var config='MathJax.Ajax.config.path["mhchem"]="https://cdnjs.cloudflare.com/ajax/libs/mathjax-mhchem/3.2.0";MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunkextensions: (MathJax.Hub.Browser["tex2jax.isMobile ? 10 : 50) }js"],tex2jax: { inlineMath: [ ["$", "$[["$","$"], ["\\\\["\\\\\\\\\\\\(","\\\\"\\\\\\\\\\\\)"] ]"]], displayMath: [ ["[["$$","$$"], ["\\["["\\\\[", "\\]"] ]"\\\\]"]], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" },TeX: { extensions: ["mhchem["[mhchem]/mhchem.js"], noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE"js", mathsize: "90%25" } } "cancel.js"]},messageStylejax: "none"["input/TeX","output/HTML-CSS"]}); '+'MathJax;MathJax.Hub.Startup.onload();';if(window.opera){script.innerHTML=config}else{script.text=config}document.getElementsByTagName("head")[0].appendChild(script)}else;window.setInterval(function(){MathJax.Hub.Queue(["Typeset",MathJax.Hub]);}$('html').ajaxComplete(function(,1000);}else{MathJax.Hub.Queue(["Typeset",MathJax.Hub]);})})();
Then simply create a bookmark or bookmarklet with the copied text as the "Location".
Once installed, activating the bookmark or bookmarklet (choosing it from a menu or clicking on its button) will render most $\LaTeX$ on the current page. Rendering is now automatic, so if new $\LaTeX$ appears on the chat page, the bookmark does not need to be activated again. Note that refreshing the page will lose the code, so the bookmark will need to be reactivated after refreshing.
Enjoy!
- Create a bookmark with this (Chrome: Menu > Bookmarks > Bookmark manager > right click > Add page > ...)
- Whenever you are on a chat page, click the bookmark.