Skip to content

Instantly share code, notes, and snippets.

@aconrad
Created December 27, 2011 06:48
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aconrad/1522901 to your computer and use it in GitHub Desktop.
bootstrap syntax highlighting on blogger dynamic views
// Read instructions here: http://www.alexconrad.org/2011/12/highlight-code-with-bloggers-dynamic.html
(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);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment