From 440ad3506c22791fb58c1cc7888518ab93de3662 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 15:13:03 +0800 Subject: Fix lastchangeui and moment timestamps --- public/js/extra.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'public/js/extra.js') 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, -- cgit v1.2.3 From f4f2497d23ff26caba7673b5de0bc8f61b69efca Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 15:59:22 +0800 Subject: Expose parseMeta function --- public/js/extra.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'public/js/extra.js') diff --git a/public/js/extra.js b/public/js/extra.js index 1a1caf8a..e19a35dc 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -1083,5 +1083,6 @@ module.exports = { scrollToHash: scrollToHash, owner: owner, updateLastChangeUser: updateLastChangeUser, - updateOwner: updateOwner + updateOwner: updateOwner, + parseMeta: parseMeta }; -- cgit v1.2.3 From 747502e694efb5131e1f589adcb608580347e1e0 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 16:35:43 +0800 Subject: Fix HTML exporting --- public/js/extra.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/js/extra.js') diff --git a/public/js/extra.js b/public/js/extra.js index e19a35dc..d853bf93 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -1084,5 +1084,7 @@ module.exports = { owner: owner, updateLastChangeUser: updateLastChangeUser, updateOwner: updateOwner, - parseMeta: parseMeta + parseMeta: parseMeta, + exportToHTML: exportToHTML, + exportToRawHTML: exportToRawHTML }; -- cgit v1.2.3 From ae3e1b972bb4884ebd910ceb9ced1f206ccd9007 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 16:41:20 +0800 Subject: Fix spellcheck * also fix spaces width --- public/js/extra.js | 1 - 1 file changed, 1 deletion(-) (limited to 'public/js/extra.js') diff --git a/public/js/extra.js b/public/js/extra.js index d853bf93..7cae068e 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -544,7 +544,6 @@ function exportToRawHTML(view) { } var common = require('./common.js'); -var serverurl = common.serverurl; //extract markdown body to html and compile to template function exportToHTML(view) { var title = renderTitle(ui.area.markdown); -- cgit v1.2.3