diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/js/extra.js | 32 | ||||
-rw-r--r-- | public/js/index.js | 6 | ||||
-rw-r--r-- | public/views/foot.ejs | 2 | ||||
-rw-r--r-- | public/views/index.ejs | 2 | ||||
-rw-r--r-- | public/views/pretty.ejs | 2 | ||||
-rw-r--r-- | public/views/slide.ejs | 2 |
6 files changed, 22 insertions, 24 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index 329aa153..e133a810 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -288,21 +288,25 @@ function finishView(view) { } }); //graphviz - var graphvizs = view.find(".graphviz.raw").removeClass("raw"); - graphvizs.each(function (key, value) { - try { - var $value = $(value); - var $ele = $(value).parent().parent(); - - var graphviz = Viz($value.text()); - $value.html(graphviz); + require.ensure(["viz.js"], function(require) { + var Viz = require("viz.js"); + var graphvizs = view.find(".graphviz.raw").removeClass("raw"); + graphvizs.each(function (key, value) { + try { + var $value = $(value); + var $ele = $(value).parent().parent(); + + var graphviz = Viz($value.text()); + $value.html(graphviz); + + $ele.addClass('graphviz'); + $value.children().unwrap().unwrap(); + } catch (err) { + console.warn(err); + } + }); - $ele.addClass('graphviz'); - $value.children().unwrap().unwrap(); - } catch (err) { - console.warn(err); - } - }); + }) //mermaid var mermaids = view.find(".mermaid.raw").removeClass("raw"); mermaids.each(function (key, value) { diff --git a/public/js/index.js b/public/js/index.js index 4bce2ff0..2d3c2965 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,9 +1,3 @@ -/* include jquery ui */ -require('jquery-ui/ui/widgets/resizable'); -require('jquery-ui/ui/widgets/tooltip'); -require('jquery-ui/ui/widgets/controlgroup'); -require('jquery-ui/ui/widgets/autocomplete'); - /* jquery and jquery plugins */ require('../vendor/showup/showup'); diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 4a9b1756..adab9d15 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -21,7 +21,7 @@ <script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script> <% } %> <script src="<%- url %>/vendor/Idle.Js/build/idle.min.js" defer></script> -<script src="<%- url %>/build/vendor.bundle.js" defer></script> +<script src="<%- url %>/build/vendor.js" defer></script> <!--codemirror--> <script src="<%- url %>/vendor/codemirror/codemirror.min.js" defer></script> <script src="<%- url %>/vendor/inlineAttachment/inline-attachment.js" defer></script> diff --git a/public/views/index.ejs b/public/views/index.ejs index c7bea341..c00623c6 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -185,7 +185,7 @@ <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="<%- url %>/build/vendor.bundle.js" defer></script> + <script src="<%- url %>/build/vendor.js" defer></script> <% if(useCDN) { %> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js" defer></script> <script src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.min.js" defer></script> diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 6f13155a..4cfbdb04 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -90,7 +90,7 @@ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment-with-locales.min.js" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/6.0.0/mermaid.min.js" defer></script> <% } else { %> -<script src="<%- url %>/build/vendor.bundle.js" defer></script> +<script src="<%- url %>/build/vendor.js" defer></script> <script src="<%- url %>/vendor/js-yaml/dist/js-yaml.min.js" defer></script> <script type="text/javascript" src="<%- url %>/vendor/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script> <script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script> diff --git a/public/views/slide.ejs b/public/views/slide.ejs index b0c5ddbc..b3212f44 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -87,7 +87,7 @@ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment-with-locales.min.js" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/6.0.0/mermaid.min.js" defer></script> <% } else { %> - <script src="<%- url %>/build/vendor.bundle.js" defer></script> + <script src="<%- url %>/build/vendor.js" defer></script> <script src="<%- url %>/vendor/reveal.js/lib/js/head.min.js"></script> <script src="<%- url %>/vendor/reveal.js/js/reveal.js"></script> <script src="<%- url %>/vendor/velocity/velocity.min.js" defer></script> |