summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorYukai Huang2016-10-13 15:13:03 +0800
committerYukai Huang2016-10-13 15:13:03 +0800
commit440ad3506c22791fb58c1cc7888518ab93de3662 (patch)
tree666223765b0fa0463dbc96ab5bc800fb4f065c53 /public
parent4713b4f2aacab5bbc6ed557bd3f382df3af962df (diff)
Fix lastchangeui and moment timestamps
Diffstat (limited to '')
-rw-r--r--public/js/extra.js14
-rw-r--r--public/js/index.js3
-rw-r--r--public/js/pretty.js1
-rw-r--r--public/js/slide.js17
-rw-r--r--public/views/foot.ejs1
-rw-r--r--public/views/pretty.ejs1
-rw-r--r--public/views/slide.ejs1
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 %>