Last active
February 22, 2018 10:41
-
-
Save ksauzz/5545499 to your computer and use it in GitHub Desktop.
tumblr syntax highlighting. original source is http://snippets-of-code.tumblr.com/post/6027484416/adding-syntax-highlighting-into-tumblr
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
<!-- For Syntax Highlighting --> | |
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css"></link> | |
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script> | |
<script> | |
function styleCode() { | |
if (typeof disableStyleCode != 'undefined') { return; } | |
var a = false; | |
$('code').each(function() { | |
if (!$(this).hasClass('prettyprint')) { | |
$(this).addClass('prettyprint'); | |
a = true; | |
} | |
}); | |
if (a) { prettyPrint(); } | |
} | |
$(function() {styleCode();}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Broken links.