1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update routing

This commit is contained in:
Luke Pulverenti 2016-03-16 14:27:50 -04:00
parent d421bfda20
commit 59b578e8fe
2 changed files with 13 additions and 11 deletions

View file

@ -335,18 +335,20 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
}
function getRequestFile() {
var path = window.location.pathname;
if (path == '/') {
path = '/index.html';
}
var path = window.location.pathname || '';
var index = path.lastIndexOf('/');
if (index != -1) {
return path.substring(index);
path = path.substring(index);
} else {
path = '/' + path;
}
return '/' + path;
if (!path || path == '/') {
path = '/index.html';
}
return path;
}
var baseRoute = window.location.href.split('?')[0].replace(getRequestFile(), '');