mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
Support set url path and use relative url, move raphael to bower and fixed minor issue in history
This commit is contained in:
parent
3f2f063e9b
commit
b2b1be3dda
22 changed files with 222 additions and 198 deletions
|
@ -1,5 +1,12 @@
|
|||
//common
|
||||
var domain = 'change this';
|
||||
var domain = 'change this'; // domain name
|
||||
var urlpath = ''; // sub url path, like: www.example.com/<urlpath>
|
||||
|
||||
var port = window.location.port;
|
||||
var serverurl = window.location.protocol + '//' + domain + (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;
|
||||
|
||||
var checkAuth = false;
|
||||
var profile = null;
|
||||
var lastLoginState = getLoginState();
|
||||
|
@ -53,7 +60,7 @@ function checkIfAuth(yesCallback, noCallback) {
|
|||
if (checkLoginStateChanged())
|
||||
checkAuth = false;
|
||||
if (!checkAuth || typeof cookieLoginState == 'undefined') {
|
||||
$.get('/me')
|
||||
$.get(serverurl + '/me')
|
||||
.done(function (data) {
|
||||
if (data && data.status == 'ok') {
|
||||
profile = data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue