try #7
This commit is contained in:
parent
0f1a6b8360
commit
df6e2893f6
@ -18,6 +18,7 @@
|
|||||||
<SCRIPT TYPE="application/javascript">window.onload = window.initializesheets;</SCRIPT>
|
<SCRIPT TYPE="application/javascript">window.onload = window.initializesheets;</SCRIPT>
|
||||||
<SCRIPT TYPE="application/javascript">
|
<SCRIPT TYPE="application/javascript">
|
||||||
window.is_hljs_here = 0;
|
window.is_hljs_here = 0;
|
||||||
|
window.is_highlighted = [];
|
||||||
window.load_highlighting = function(language){
|
window.load_highlighting = function(language){
|
||||||
var script;
|
var script;
|
||||||
if(!window.is_hljs_here){
|
if(!window.is_hljs_here){
|
||||||
@ -26,9 +27,12 @@ window.load_highlighting = function(language){
|
|||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
window.is_hljs_here = 1;
|
window.is_hljs_here = 1;
|
||||||
}
|
}
|
||||||
|
if(window.ishighlighted.indexOf(language) == -1){
|
||||||
script = document.createElement('script');
|
script = document.createElement('script');
|
||||||
script.src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/languages/" + language + ".min.js";
|
script.src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/languages/" + language + ".min.js";
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
window.ishighlighted.push(language);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</SCRIPT>
|
</SCRIPT>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user