Skip to content

Instantly share code, notes, and snippets.

@cgranade
Created January 4, 2014 23:48
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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);
}
@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