summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wu2016-10-14 00:14:25 +0800
committerGitHub2016-10-14 00:14:25 +0800
commitadb3666d13ba8ff63cba0a395d1bd9819e6ea1ea (patch)
tree11ea1ea5b3a1e4baf8aae1e5b75cd3aa09ff90ed
parent8a6147c12b0d9fcf2c2abe02ea58590c40593141 (diff)
parente4515958cd4fc6eb7a39bc2b0294de07d7c7291a (diff)
Merge pull request #205 from Yukaii/webpack-fix-cont
Fix minor bugs (cont.)
-rw-r--r--public/js/extra.js5
-rw-r--r--public/js/index.js13
-rw-r--r--public/js/public.js2
3 files changed, 9 insertions, 11 deletions
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..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;
@@ -48,13 +42,18 @@ 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;
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');