Skip to content

Instantly share code, notes, and snippets.

@cgranade
Created January 4, 2014 23:48
Show Gist options
  • Save cgranade/8262384 to your computer and use it in GitHub Desktop.
Save cgranade/8262384 to your computer and use it in GitHub Desktop.
Adds MathJax support to GitHub Gists. Useful for working with Markdown documents.
// ==UserScript==
// @name MathJax for Gists
// @include *://gist.github.com/*
// @version 0.1
// @description Adds MathJax support to Gists.
// ==/UserScript==
if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
}
@christopherlovell
Copy link

If this does what it says, it would be incredibly useful... If I knew how to use it

@cyc115
Copy link

cyc115 commented Dec 6, 2016

seem to be a userscript. you need grease monkey or equivalent plugin to run it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment