Skip to content

Instantly share code, notes, and snippets.

@pkra
Created January 10, 2019 13:24
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 pkra/69a6d7582564c5bdc60dd05e794409dc to your computer and use it in GitHub Desktop.
Save pkra/69a6d7582564c5bdc60dd05e794409dc to your computer and use it in GitHub Desktop.
Bookmarklet for injecting mathjax
javascript:(function(){function%20e(e){var%20i=e.createElement('script'),o;i.src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML-full.js';i.type='text/javascript';o='MathJax.Hub.Config({tex2jax:{inlineMath:[[\'$\',\'$\'],[\'\\\\(\',\'\\\\)\']],displayMath:[[\'\\\\[\',\'\\\\]\']],processEscapes:true}});MathJax.Hub.Startup.onload();';%20i.text=o;e.getElementsByTagName('head')[0].appendChild(i)}function%20t(t){if(t.MathJax===undefined){e(t.document)}else{t.MathJax.Hub.Queue(new%20t.Array('Typeset',t.MathJax.Hub))}}var%20a=document.getElementsByTagName('iframe'),n,i;t(window);for(n=0;n<a.length;n++){i=a[n].contentWindow||a[n].contentDocument;if(!i.document)i=i.parentNode;t(i)}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment