diff options
author | Max Wu | 2016-10-13 22:40:40 +0800 |
---|---|---|
committer | GitHub | 2016-10-13 22:40:40 +0800 |
commit | 71dd51f7b75378f4da7db9c4554bb7a073f86204 (patch) | |
tree | 364104ae0f3a0fdbe438868ee7dff9dd00efb17f /public/js/common.js | |
parent | af461ac2d6171b6133701ce0817d14f18b4fd4b1 (diff) | |
parent | 2f05e445cca8bf1aa560c7dcce86587297d37d5b (diff) |
Merge pull request #202 from Yukaii/webpack-recovery
Webpack Recovery
Diffstat (limited to 'public/js/common.js')
-rw-r--r-- | public/js/common.js | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/public/js/common.js b/public/js/common.js index 19455f3d..b8ff3758 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; @@ -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 }; |