summaryrefslogtreecommitdiff
path: root/public/js/common.js
diff options
context:
space:
mode:
authorYukai Huang2017-01-13 22:46:38 +0800
committerYukai Huang2017-01-13 22:46:38 +0800
commitc2a8911b9c7872ea0d085020aa17e82162130f3d (patch)
treeab678f8ee0cb1ce95767e349ac5939237b0825c0 /public/js/common.js
parent3566d71aea5486709f73ba7fac5a421993b41f00 (diff)
Move config variable to lib/config
Diffstat (limited to 'public/js/common.js')
-rw-r--r--public/js/common.js25
1 files changed, 1 insertions, 24 deletions
diff --git a/public/js/common.js b/public/js/common.js
index 6d54b450..9a60122b 100644
--- a/public/js/common.js
+++ b/public/js/common.js
@@ -1,21 +1,4 @@
-// import config from './config';
-
-import {
- domain, // domain name
- urlpath, // sub url path, like: www.example.com/<urlpath>
- debug,
- GOOGLE_API_KEY,
- GOOGLE_CLIENT_ID,
- DROPBOX_APP_KEY
-} from './config';
-
-//common
-export const port = window.location.port;
-window.serverurl = `${window.location.protocol}//${domain ? domain : window.location.hostname}${port ? ':' + port : ''}${urlpath ? '/' + urlpath : ''}`;
-export const noteid = urlpath ? window.location.pathname.slice(urlpath.length + 1, window.location.pathname.length).split('/')[1] : window.location.pathname.split('/')[1];
-export const noteurl = `${serverurl}/${noteid}`;
-
-export const version = '0.5.0';
+import { serverurl } from './lib/config';
let checkAuth = false;
let profile = null;
@@ -101,12 +84,6 @@ export function checkIfAuth(yesCallback, noCallback) {
}
export default {
- domain,
- urlpath,
- debug,
- GOOGLE_API_KEY,
- GOOGLE_CLIENT_ID,
- DROPBOX_APP_KEY,
checkAuth,
profile,
lastLoginState,