8000 Create gitsnippet.html · devlance/googledevdocs.github.io@ab28dae · GitHub
[go: up one dir, main page]

Skip to content

Commit ab28dae

Browse files
Create gitsnippet.html
1 parent d4be003 commit ab28dae

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

_includes/gitsnippet.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script language="javascript">
2+
$(document).ready(function(){
3+
var gitAccount = "{{gitAccount}}";
4+
var gitRepo = "{{gitRepo}}";
5+
var gitFile = "{{gitFile}}";
6+
var gitBranch = "{{gitBranch}}";
7+
var regionTag = "{{regionTag}}";
8+
var lang="{{lang}}";
9+
$.ajax({
10+
url: "https://raw.githubusercontent.com/{{gitAccount}}/{{gitRepo}}/master/{{gitFile}}",
11+
context: document.body
12+
}).done(function(data) {
13+
$("#testSnippet").html(data)
14+
});
15+
});
16+
</script>
17+
<pre class="prettyprint lang-{{lang}}" id="testSnippet"></pre>

0 commit comments

Comments
 (0)
0