diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/js/extra.js | 14 | ||||
-rw-r--r-- | public/js/index.js | 3 | ||||
-rw-r--r-- | public/js/pretty.js | 1 | ||||
-rw-r--r-- | public/js/slide.js | 17 | ||||
-rw-r--r-- | public/views/foot.ejs | 1 | ||||
-rw-r--r-- | public/views/pretty.ejs | 1 | ||||
-rw-r--r-- | public/views/slide.ejs | 1 |
7 files changed, 10 insertions, 28 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index 24d53fe7..1a1caf8a 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -5,9 +5,9 @@ var saveAs = require('file-saver').saveAs; require('../vendor/md-toc'); //auto update last change -var createtime = null; -var lastchangetime = null; -var lastchangeui = { +window.createtime = null; +window.lastchangetime = null; +window.lastchangeui = { status: $(".ui-status-lastchange"), time: $(".ui-lastchange"), user: $(".ui-lastchangeuser"), @@ -30,8 +30,8 @@ function updateLastChange() { } setInterval(updateLastChange, 60000); -var lastchangeuser = null; -var lastchangeuserprofile = null; +window.lastchangeuser = null; +window.lastchangeuserprofile = null; function updateLastChangeUser() { if (lastchangeui) { if (lastchangeuser && lastchangeuserprofile) { @@ -1070,11 +1070,7 @@ md.use(pdfPlugin); module.exports = { md: md, - createtime: createtime, - lastchangetime: lastchangetime, updateLastChange: updateLastChange, - lastchangeui: lastchangeui, - lastchangeuser: lastchangeuser, postProcess: postProcess, finishView: finishView, autoLinkify: autoLinkify, diff --git a/public/js/index.js b/public/js/index.js index 20a76ff1..82d3cedb 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -38,15 +38,12 @@ var syncScrollToView = syncScroll.syncScrollToView; require('./pretty'); var extra = require('./extra'); var md = extra.md; -var createtime = extra.createtime; var updateLastChange = extra.updateLastChange; var postProcess = extra.postProcess; var finishView = extra.finishView; -var lastchangetime = extra.lastchangetime; var autoLinkify = extra.autoLinkify; var generateToc = extra.generateToc; var smoothHashScroll = extra.smoothHashScroll; -var lastchangeuser = extra.lastchangeuser; var deduplicatedHeaderId = extra.deduplicatedHeaderId; var renderTOC = extra.renderTOC; var renderTitle = extra.renderTitle; diff --git a/public/js/pretty.js b/public/js/pretty.js index 6b551c17..1288225b 100644 --- a/public/js/pretty.js +++ b/public/js/pretty.js @@ -7,7 +7,6 @@ var renderTOC = extra.renderTOC; var generateToc = extra.generateToc; var smoothHashScroll = extra.smoothHashScroll; var postProcess = extra.postProcess; -var lastchangeui = extra.lastchangeui; var updateLastChange = extra.updateLastChange; var preventXSS = require('./render').preventXSS; diff --git a/public/js/slide.js b/public/js/slide.js index 257c60bb..d90fd436 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -22,23 +22,10 @@ var noteurl = commonModule.noteurl; var extraModule = require('./extra'); var md = extraModule.md; -var createtime = extraModule.createtime; var updateLastChange = extraModule.updateLastChange; -var postProcess = extraModule.postProcess; var finishView = extraModule.finishView; -var lastchangetime = extraModule.lastchangetime; -var lastchangeui = extraModule.lastchangeui; -var autoLinkify = extraModule.autoLinkify; -var generateToc = extraModule.generateToc; -var smoothHashScroll = extraModule.smoothHashScroll; -var lastchangeuser = extraModule.lastchangeuser; -var deduplicatedHeaderId = extraModule.deduplicatedHeaderId; -var renderTOC = extraModule.renderTOC; -var renderTitle = extraModule.renderTitle; -var renderFilename = extraModule.renderFilename; -var scrollToHash = extraModule.scrollToHash; - -var render = require('./render'); + +require('./render'); var body = $(".slides").html(); $(".slides").html(S(body).unescapeHTML().s); diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 4ba18e3a..b51920dc 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -18,6 +18,7 @@ <script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script> <% } %> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> +<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" defer></script> <script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" defer></script> <script src="<% url %>/vendor/jquery-scrollspy/jquery-scrollspy.min.js"></script> diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index b0eb568f..09b548a8 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -100,6 +100,7 @@ <script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script> <% } %> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> +<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" defer></script> <script src="<% url %>/vendor/jquery-scrollspy/jquery-scrollspy.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" defer></script> diff --git a/public/views/slide.ejs b/public/views/slide.ejs index 79d77086..679bed2d 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -102,6 +102,7 @@ <script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script> <% } %> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> + <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" defer></script> <script src="//cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js" defer></script> <%- include build/slide-scripts %> |