MCPcopy Create free account
hub / github.com/TruthHun/BookStack / loadHljs

Function loadHljs

static/wangEditor/js/wangEditor.js:5893–5906  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5891
5892 // 加载 highlightjs 代码
5893 function loadHljs() {
5894 if (E.userAgent.indexOf('MSIE 8') > 0) {
5895 // 不支持 IE8
5896 return;
5897 }
5898 if (window.hljs) {
5899 // 不要重复加载
5900 return;
5901 }
5902 var script = document.createElement("script");
5903 script.type = "text/javascript";
5904 script.src = "//cdn.bootcss.com/highlight.js/9.2.0/highlight.min.js";
5905 document.body.appendChild(script);
5906 }
5907
5908
5909 E.createMenu(function (check) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected