File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
2
< html >
3
3
< head >
4
- < link href ="https://google-code-prettify.googlecode.com/svn/loader/prettify .css " type ="text/css " rel ="stylesheet " />
4
+ < link href ="https://google-code-prettify.googlecode.com/svn/loader/skins/desert .css " type ="text/css " rel ="stylesheet " />
5
5
< script src ="https://google-code-prettify.googlecode.com/svn/loader/prettify.js "> </ script >
6
6
< style type ="text/css ">
7
7
<!- -
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ GithubCodeHighlighter.prototype = {
35
35
var params = this . parseQueryString ( ) ,
36
36
content ;
37
37
38
+ if ( params . lang ) {
39
+ this . lang = " lang-" + params . lang ;
40
+ } else {
41
+ this . lang = "" ;
42
+ }
43
+
38
44
if ( params . url ) {
39
45
this . url = params . url ;
40
46
this . fetchCode ( this . url ) ;
@@ -86,7 +92,7 @@ GithubCodeHighlighter.prototype = {
86
92
document . getElementById ( "codeArea" ) . appendChild ( metaArea ) ;
87
93
88
94
pre . innerHTML = escape ( content ) ;
89
- pre . setAttribute ( "class" , "prettyprint linenums" ) ;
95
+ pre . setAttribute ( "class" , "prettyprint linenums" + this . lang ) ;
90
96
91
97
document . getElementById ( "codeArea" ) . appendChild ( pre ) ;
92
98
} ,
You can’t perform that action at this time.
0 commit comments