Created
March 31, 2013 02:41
-
-
Save watermint/5279281 to your computer and use it in GitHub Desktop.
google-code-prettifyを適用する
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
function sourcecolon(source){ | |
var body = document.documentElement.childNodes[1]; | |
var tag = document.createElement("code"); | |
tag.className = "prettyprint"; | |
tag.innerHTML = source.code; | |
body.appendChild(tag); | |
prettyPrint(); | |
var printed = document.innerHTML; | |
body.removeChild(tag); | |
return printed; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment