Skip to content

Commit 5d4dfa8

Browse files
committed
Add method for language checking
1 parent 67649f7 commit 5d4dfa8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

assets/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<script src="/s/pasteclick.js"></script>
1010
<style> a {color:white;} </style>
1111
</head>
12-
<body class='hljs' id="body" onload="initPaste();"><pre id="code">################################################################################
12+
<body class='hljs' id="body" onload="initPaste();"><pre id="code" class="codeType();">
13+
################################################################################
1314
###### ######
1415
### ###
1516
# _ _ _ _ #

assets/s/pasteclick.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ function getPastePre(){
1212
function highlightPre(pastePre){
1313
hljs.highlightBlock(document.body);
1414
hljs.highlightBlock(pastePre);
15-
}
15+
}
1616
function initPaste(){
1717
inPastePre = getPastePre();
1818
highlightPre(inPastePre);
1919
}
20+
function codeType(){
21+
if(window.location.hash){
22+
var lang = window.location.hash.substr(1);
23+
}
24+
return lang;
25+
}

0 commit comments

Comments
 (0)