public
Last active

bootstrap syntax highlighting on blogger dynamic views

  • Download Gist
highlight.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// 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);
}
}
})();

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.