diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/js/config.js.example | 24 | ||||
-rw-r--r-- | public/js/cover.js | 8 | ||||
-rw-r--r-- | public/js/extra.js | 4 | ||||
-rw-r--r-- | public/js/history.js | 5 | ||||
-rw-r--r-- | public/js/index.js | 4 |
5 files changed, 26 insertions, 19 deletions
diff --git a/public/js/config.js.example b/public/js/config.js.example index 00c4f498..c5de388f 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/<urlpath> -//settings -var debug = false; - -var GOOGLE_API_KEY = ''; -var GOOGLE_CLIENT_ID = ''; +module.exports = { + domain: '', // domain name + urlpath: '', // sub url path, like: www.example.com/<urlpath> -var DROPBOX_APP_KEY = ''; + // settings + debug: false, -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 + GOOGLE_API_KEY: '', + GOOGLE_CLIENT_ID: '', + DROPBOX_APP_KEY: '' }; diff --git a/public/js/cover.js b/public/js/cover.js index 7156bf27..515c8827 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 25f0b3b1..9ce8525a 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 91f3cccf..d5082dd9 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 67499f86..f3bdf115 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 |