mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 05:24:26 -05:00
Update to support when client domain not provided will use window.location variable
This commit is contained in:
parent
60046200f8
commit
08de655c2b
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
//common
|
//common
|
||||||
var domain = 'change this'; // domain name
|
var domain = ''; // domain name
|
||||||
var urlpath = ''; // sub url path, like: www.example.com/<urlpath>
|
var urlpath = ''; // sub url path, like: www.example.com/<urlpath>
|
||||||
//settings
|
//settings
|
||||||
var debug = false;
|
var debug = false;
|
||||||
|
@ -8,7 +8,7 @@ var GOOGLE_API_KEY = 'change this';
|
||||||
var GOOGLE_CLIENT_ID = 'change this';
|
var GOOGLE_CLIENT_ID = 'change this';
|
||||||
|
|
||||||
var port = window.location.port;
|
var port = window.location.port;
|
||||||
var serverurl = window.location.protocol + '//' + domain + (port ? ':' + port : '') + (urlpath ? '/' + urlpath : '');
|
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];
|
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;
|
var noteurl = serverurl + '/' + noteid;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue