Skip to content

Commit 1fc9154

Browse files
committed
added lang parameter. change color theme.
1 parent f1a8cbc commit 1fc9154

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

public/html/embed.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!doctype html>
22
<html>
33
<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" />
55
<script src="https://google-code-prettify.googlecode.com/svn/loader/prettify.js"></script>
66
<style type="text/css">
77
<!--

public/js/github-code-highlight.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ GithubCodeHighlighter.prototype = {
3535
var params = this.parseQueryString(),
3636
content;
3737

38+
if (params.lang) {
39+
this.lang = " lang-" + params.lang;
40+
} else {
41+
this.lang = "";
42+
}
43+
3844
if (params.url) {
3945
this.url = params.url;
4046
this.fetchCode(this.url);
@@ -86,7 +92,7 @@ GithubCodeHighlighter.prototype = {
8692
document.getElementById("codeArea").appendChild(metaArea);
8793

8894
pre.innerHTML = escape(content);
89-
pre.setAttribute("class", "prettyprint linenums");
95+
pre.setAttribute("class", "prettyprint linenums" + this.lang);
9096

9197
document.getElementById("codeArea").appendChild(pre);
9298
},

0 commit comments

Comments
 (0)