From ae3e1b972bb4884ebd910ceb9ced1f206ccd9007 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 16:41:20 +0800 Subject: Fix spellcheck * also fix spaces width --- public/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/js/common.js') diff --git a/public/js/common.js b/public/js/common.js index 19455f3d..9f81a97d 100644 --- a/public/js/common.js +++ b/public/js/common.js @@ -8,7 +8,7 @@ var DROPBOX_APP_KEY = config.DROPBOX_APP_KEY; //common var port = window.location.port; -var serverurl = window.location.protocol + '//' + (domain ? domain : window.location.hostname) + (port ? ':' + port : '') + (urlpath ? '/' + urlpath : ''); +window.serverurl = window.location.protocol + '//' + (domain ? domain : window.location.hostname) + (port ? ':' + port : '') + (urlpath ? '/' + urlpath : ''); var noteid = urlpath ? window.location.pathname.slice(urlpath.length + 1, window.location.pathname.length).split('/')[1] : window.location.pathname.split('/')[1]; var noteurl = serverurl + '/' + noteid; -- cgit v1.2.3 From 2f05e445cca8bf1aa560c7dcce86587297d37d5b Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 19:15:51 +0800 Subject: Remove uneccesasry serverurl exporting --- public/js/common.js | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'public/js/common.js') diff --git a/public/js/common.js b/public/js/common.js index 9f81a97d..b8ff3758 100644 --- a/public/js/common.js +++ b/public/js/common.js @@ -93,29 +93,28 @@ function checkIfAuth(yesCallback, noCallback) { } 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, - port: port, - serverurl: serverurl, - noteid: noteid, - noteurl: noteurl, - version: version, - checkAuth: checkAuth, - profile: profile, - lastLoginState: lastLoginState, - lastUserId: lastUserId, - loginStateChangeEvent: loginStateChangeEvent, + domain: domain, + urlpath: urlpath, + debug: debug, + GOOGLE_API_KEY: GOOGLE_API_KEY, + GOOGLE_CLIENT_ID: GOOGLE_CLIENT_ID, + DROPBOX_APP_KEY: DROPBOX_APP_KEY, + port: port, + noteid: noteid, + noteurl: noteurl, + version: version, + checkAuth: checkAuth, + profile: profile, + lastLoginState: lastLoginState, + lastUserId: lastUserId, + loginStateChangeEvent: loginStateChangeEvent, - /* export functions */ - resetCheckAuth: resetCheckAuth, - setLoginState: setLoginState, - checkLoginStateChanged: checkLoginStateChanged, - getLoginState: getLoginState, - getUserId: getUserId, - clearLoginState: clearLoginState, - checkIfAuth: checkIfAuth + /* export functions */ + resetCheckAuth: resetCheckAuth, + setLoginState: setLoginState, + checkLoginStateChanged: checkLoginStateChanged, + getLoginState: getLoginState, + getUserId: getUserId, + clearLoginState: clearLoginState, + checkIfAuth: checkIfAuth }; -- cgit v1.2.3