summaryrefslogtreecommitdiff
path: root/public/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/common.js')
-rw-r--r--public/js/common.js49
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
};