Blog generator, publish manager, share scripts, theme CSS, highlight.js bundles, font, favicon, templates and generated-reference outputs, plus an English installation guide.
32 lines
931 B
JavaScript
32 lines
931 B
JavaScript
<script>
|
|
(function () {
|
|
var codes = document.querySelectorAll("#content pre code:not(.language-mermaid)");
|
|
if (!codes.length) return;
|
|
|
|
function apply() {
|
|
if (!window.hljs) return;
|
|
codes.forEach(function (c) {
|
|
c.classList.add("hljs");
|
|
hljs.highlightElement(c);
|
|
if (window.hljs.lineNumbersBlock) {
|
|
hljs.lineNumbersBlock(c);
|
|
}
|
|
});
|
|
}
|
|
|
|
function loadPlugin() {
|
|
if (window.hljs && window.hljs.lineNumbersBlock) { apply(); return; }
|
|
var s = document.createElement("script");
|
|
s.src = "api/notes/__HLJS_LN_ID__/download";
|
|
s.onload = apply;
|
|
document.head.appendChild(s);
|
|
}
|
|
|
|
if (window.hljs) { loadPlugin(); return; }
|
|
|
|
var s = document.createElement("script");
|
|
s.src = "api/notes/__HLJS_ID__/download";
|
|
s.onload = loadPlugin;
|
|
document.head.appendChild(s);
|
|
})();
|
|
</script> |