diff --git a/public/js/config.js.example b/public/js/config.js.example index 00c4f4984..c5de388f6 100644 --- a/public/js/config.js.example +++ b/public/js/config.js.example @@ -1,19 +1,11 @@ -//config -var domain = ''; // domain name -var urlpath = ''; // sub url path, like: www.example.com/ -//settings -var debug = false; - -var GOOGLE_API_KEY = ''; -var GOOGLE_CLIENT_ID = ''; - -var DROPBOX_APP_KEY = ''; - module.exports = { - domain: domain, - urlpath: urlpath, - debug: debug, - GOOGLE_API_KEY: GOOGLE_API_KEY, - GOOGLE_CLIENT_ID: GOOGLE_CLIENT_ID, - DROPBOX_APP_KEY: DROPBOX_APP_KEY + domain: '', // domain name + urlpath: '', // sub url path, like: www.example.com/ + + // settings + debug: false, + + GOOGLE_API_KEY: '', + GOOGLE_CLIENT_ID: '', + DROPBOX_APP_KEY: '' }; diff --git a/public/js/cover.js b/public/js/cover.js index 7156bf278..515c8827f 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -3,6 +3,8 @@ var checkIfAuth = common.checkIfAuth; var urlpath = common.urlpath; var serverurl = common.serverurl; var resetCheckAuth = common.resetCheckAuth; +var getLoginState = common.getLoginState; +var clearLoginState = common.clearLoginState; var historyModule = require('./history'); var parseStorageToHistory = historyModule.parseStorageToHistory; @@ -11,6 +13,10 @@ var getStorageHistory = historyModule.getStorageHistory; var getHistory = historyModule.getHistory; var saveHistory = historyModule.saveHistory; var removeHistory = historyModule.removeHistory; +var postHistoryToServer = historyModule.postHistoryToServer; +var deleteServerHistory = historyModule.deleteServerHistory; +var parseServerToHistory = historyModule.parseServerToHistory; +var saveStorageHistoryToServer = historyModule.saveStorageHistoryToServer; var saveAs = require('file-saver').saveAs; var List = require('list.js'); @@ -196,7 +202,7 @@ function parseHistoryCallback(list, notehistory) { $this.addClass('active'); else $this.removeClass('active'); - } + } }); }, function () { getHistory(function (notehistory) { diff --git a/public/js/extra.js b/public/js/extra.js index 25f0b3b14..9ce8525ac 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -1086,5 +1086,7 @@ module.exports = { generateToc: generateToc, smoothHashScroll: smoothHashScroll, scrollToHash: scrollToHash, - owner: owner + owner: owner, + updateLastChangeUser: updateLastChangeUser, + updateOwner: updateOwner }; diff --git a/public/js/history.js b/public/js/history.js index 91f3cccf2..d5082dd9c 100644 --- a/public/js/history.js +++ b/public/js/history.js @@ -4,6 +4,7 @@ var common = require('./common'); var checkIfAuth = common.checkIfAuth; var urlpath = common.urlpath; var serverurl = common.serverurl; +var getLoginState = common.getLoginState; var extra = require('./extra'); var renderFilename = extra.renderFilename; @@ -414,5 +415,7 @@ module.exports = { removeHistory: removeHistory, parseStorageToHistory: parseStorageToHistory, postHistoryToServer: postHistoryToServer, - deleteServerHistory: deleteServerHistory + deleteServerHistory: deleteServerHistory, + parseServerToHistory: parseServerToHistory, + saveStorageHistoryToServer: saveStorageHistoryToServer } diff --git a/public/js/index.js b/public/js/index.js index 67499f86c..f3bdf1158 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -63,9 +63,12 @@ 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 historyModule = require('./history'); var writeHistory = historyModule.writeHistory; +var deleteServerHistory = historyModule.deleteServerHistory; var renderer = require('./render'); var preventXSS = renderer.preventXSS; @@ -1461,6 +1464,7 @@ function onGoogleAPILoaded() { .prop('defer', true) .appendTo('body'); } +window.onGoogleAPILoaded = onGoogleAPILoaded; //button actions //share