diff options
author | Yukai Huang | 2016-10-13 15:13:03 +0800 |
---|---|---|
committer | Yukai Huang | 2016-10-13 15:13:03 +0800 |
commit | 440ad3506c22791fb58c1cc7888518ab93de3662 (patch) | |
tree | 666223765b0fa0463dbc96ab5bc800fb4f065c53 /public/js | |
parent | 4713b4f2aacab5bbc6ed557bd3f382df3af962df (diff) |
Fix lastchangeui and moment timestamps
Diffstat (limited to 'public/js')
-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 |
4 files changed, 7 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); |