mirror of https://github.com/status-im/codimd.git
Fix lastchangeui and moment timestamps
This commit is contained in:
parent
4713b4f2aa
commit
440ad3506c
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -79,10 +79,6 @@ module.exports = {
|
|||
locale: path.join(__dirname, 'public/js/locale.js'),
|
||||
vendor: [
|
||||
"imports?$=jquery!jquery-mousewheel",
|
||||
"jquery-ui/ui/widgets/resizable",
|
||||
"jquery-ui/ui/widgets/tooltip",
|
||||
"jquery-ui/ui/widgets/controlgroup",
|
||||
"jquery-ui/ui/widgets/autocomplete",
|
||||
"script!gist-embed",
|
||||
"expose?filterXSS!xss",
|
||||
"js-url",
|
||||
|
@ -129,7 +125,8 @@ module.exports = {
|
|||
"viz.js": "Viz",
|
||||
"socket.io-client": "io",
|
||||
"lodash": "_",
|
||||
"jquery": "$"
|
||||
"jquery": "$",
|
||||
"moment": "moment"
|
||||
},
|
||||
|
||||
module: {
|
||||
|
|
Loading…
Reference in New Issue