diff options
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/loads.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/assets/js/loads.js b/assets/js/loads.js new file mode 100644 index 0000000..71e0173 --- /dev/null +++ b/assets/js/loads.js @@ -0,0 +1,14 @@ +function load_js(url) { + let link = document.createElement("link"); + link.rel = "stylesheet"; + link.type = "text/css"; + link.href = url; + let head = document.getElementsByTagName("head")[0]; + head.appendChild(link); +} + +addEventListener("load", function () { + if (document.querySelector(".highlight .chroma")) { + load_js("/css/syntax.css"); + } +}); |