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.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,