bootstrap syntax highlighting on blogger dynamic views
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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