Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d7ad552

Browse files
author
Rah1x
committed
google prettify / Syntax Highlighter
1 parent 6e08609 commit d7ad552

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎Syntax Highlighter.txt‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
////////put at the end of HEAD
2+
3+
<!-- For Syntax Highlighting -->
4+
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
5+
<link rel="stylesheet" type="text/css" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css" />
6+
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script>
7+
<script>
8+
function styleCode()
9+
{
10+
if (typeof disableStyleCode != 'undefined') { return; }
11+
12+
var a = false;
13+
14+
$('code').each(function() {
15+
if (!$(this).hasClass('prettyprint')) {
16+
$(this).addClass('prettyprint');
17+
a = true;
18+
}
19+
});
20+
21+
if (a) { prettyPrint(); }
22+
}
23+
24+
$(function() {styleCode();});
25+
</script>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /