Extract config.js from common.js to make client setting file clean and also make upgrade easier

This commit is contained in:
Wu Cheng-Han 2016-10-10 16:25:51 +08:00
parent 917537ddbf
commit bf4c6d021c
9 changed files with 21 additions and 17 deletions

View file

@ -1,14 +1,4 @@
//common
var domain = ''; // domain name
var urlpath = ''; // sub url path, like: www.example.com/<urlpath>
//settings
var debug = false;
var GOOGLE_API_KEY = '';
var GOOGLE_CLIENT_ID = '';
var DROPBOX_APP_KEY = '';
var port = window.location.port;
var 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];

View file

@ -0,0 +1,10 @@
//config
var domain = ''; // domain name
var urlpath = ''; // sub url path, like: www.example.com/<urlpath>
//settings
var debug = false;
var GOOGLE_API_KEY = '';
var GOOGLE_CLIENT_ID = '';
var DROPBOX_APP_KEY = '';