Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mermaid.html « layouts - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: db5c71da29c36df82a513d8c698979b54bd20fdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<script type="text/javascript">
  function loadMermaidJsIfNeeded() {
    if (document.querySelector('.mermaid') === null) {
      return;
     }

    var element = document.createElement("script");
    element.src = "<%= @items['/assets/javascripts/mermaid.min.*'].path %>";
    element.onload = function(){mermaid.init();};
    document.body.appendChild(element);
  }

if (window.addEventListener)
   window.addEventListener("load", loadMermaidJsIfNeeded, false);
else if (window.attachEvent)
   window.attachEvent("onload", loadMermaidJsIfNeeded);
else window.onload = loadMermaidJsIfNeeded;
</script>