Skip to content

Instantly share code, notes, and snippets.

@aolshevskiy
Created January 16, 2012 06:57
Show Gist options
  • Save aolshevskiy/1619487 to your computer and use it in GitHub Desktop.
Save aolshevskiy/1619487 to your computer and use it in GitHub Desktop.
(function() {
try {
prettyPrint();
} catch(e) {
var scriptId = 'prettyPrinter';
if (document.getElementById(scriptId) === null) {
var elem = document.createElement('SCRIPT');
elem.id = scriptId;
elem.onload = function() {
prettyPrint();
}
elem.src = "https://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js";
var theBody = document.getElementsByTagName('body')[0];
theBody.appendChild(elem);
var elem = document.createElement('LINK');
elem.setAttribute("rel", "stylesheet");
elem.href = "https://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css";
var theHead = document.getElementsByTagName('head')[0];
theHead.appendChild(elem);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment