diff options
author | Wu Cheng-Han | 2017-03-21 20:44:12 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2017-03-21 20:44:12 +0800 |
commit | b17c2404b1b6c1b7dfc35f424eb047cd080e8e17 (patch) | |
tree | 8afb72f534e6653ada13e3cc02445f6d826ced2d | |
parent | 10a7a9b37e24b8c0499c6152b6213cdf2c0cdeed (diff) |
Fix duplicated loading of reveal markdown plugin
Diffstat (limited to '')
-rw-r--r-- | public/js/slide.js | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/public/js/slide.js b/public/js/slide.js index 84e098c7..9dfda65b 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -1,5 +1,5 @@ /* eslint-env browser, jquery */ -/* global serverurl, Reveal */ +/* global serverurl, Reveal, RevealMarkdown */ require('../css/extra.css') require('../css/site.css') @@ -40,19 +40,6 @@ const deps = [{ return !document.body.classList } }, { - src: `${serverurl}/js/reveal-markdown.js`, - callback () { - const slideOptions = { - separator: '^(\r\n?|\n)---(\r\n?|\n)$', - verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$' - } - const slides = window.RevealMarkdown.slidify(body, slideOptions) - $('.slides').html(slides) - window.RevealMarkdown.initialize() - removeDOMEvents($('.slides')) - $('.slides').show() - } -}, { src: `${serverurl}/build/reveal.js/plugin/notes/notes.js`, async: true, condition () { @@ -60,6 +47,16 @@ const deps = [{ } }] +const slideOptions = { + separator: '^(\r\n?|\n)---(\r\n?|\n)$', + verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$' +} +const slides = RevealMarkdown.slidify(body, slideOptions) +$('.slides').html(slides) +RevealMarkdown.initialize() +removeDOMEvents($('.slides')) +$('.slides').show() + // default options to init reveal.js const defaultOptions = { controls: true, |