From b5f42807b9ad94e362224a4247b656ad3a2d1792 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 23:29:25 +0800 Subject: Fix ownership display --- public/js/extra.js | 5 ++--- public/js/index.js | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'public') diff --git a/public/js/extra.js b/public/js/extra.js index 7cae068e..bf2c7231 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -48,8 +48,8 @@ function updateLastChangeUser() { } } -var owner = null; -var ownerprofile = null; +window.owner = null; +window.ownerprofile = null; function updateOwner() { if (ownerui) { if (owner && ownerprofile && owner !== lastchangeuser) { @@ -1080,7 +1080,6 @@ module.exports = { generateToc: generateToc, smoothHashScroll: smoothHashScroll, scrollToHash: scrollToHash, - owner: owner, updateLastChangeUser: updateLastChangeUser, updateOwner: updateOwner, parseMeta: parseMeta, diff --git a/public/js/index.js b/public/js/index.js index 5246f949..9fb7a28a 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -48,7 +48,6 @@ var renderTOC = extra.renderTOC; var renderTitle = extra.renderTitle; var renderFilename = extra.renderFilename; var scrollToHash = extra.scrollToHash; -var owner = extra.owner; var updateLastChangeUser = extra.updateLastChangeUser; var updateOwner = extra.updateOwner; var parseMeta = extra.parseMeta; -- cgit v1.2.3 From e4515958cd4fc6eb7a39bc2b0294de07d7c7291a Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Fri, 14 Oct 2016 00:02:55 +0800 Subject: Fix require ordering --- public/js/index.js | 12 ++++++------ public/js/public.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'public') diff --git a/public/js/index.js b/public/js/index.js index 9fb7a28a..445a820b 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -28,12 +28,6 @@ var noteurl = common.noteurl; var checkLoginStateChanged = common.checkLoginStateChanged; -var syncScroll = require('./syncscroll'); -var setupSyncAreas = syncScroll.setupSyncAreas; -var clearMap = syncScroll.clearMap; -var syncScrollToEdit = syncScroll.syncScrollToEdit; -var syncScrollToView = syncScroll.syncScrollToView; - require('./pretty'); var extra = require('./extra'); var md = extra.md; @@ -54,6 +48,12 @@ var parseMeta = extra.parseMeta; var exportToHTML = extra.exportToHTML; var exportToRawHTML = extra.exportToRawHTML; +var syncScroll = require('./syncscroll'); +var setupSyncAreas = syncScroll.setupSyncAreas; +var clearMap = syncScroll.clearMap; +var syncScrollToEdit = syncScroll.syncScrollToEdit; +var syncScrollToView = syncScroll.syncScrollToView; + var historyModule = require('./history'); var writeHistory = historyModule.writeHistory; var deleteServerHistory = historyModule.deleteServerHistory; diff --git a/public/js/public.js b/public/js/public.js index ac951804..af8c0924 100644 --- a/public/js/public.js +++ b/public/js/public.js @@ -20,8 +20,8 @@ require('list.js'); require('../vendor/md-toc'); require('randomcolor'); -require('./syncscroll'); require('./extra'); +require('./syncscroll'); require('./history'); require('./pretty'); require('./render'); -- cgit v1.2.3