mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update routing
This commit is contained in:
parent
d421bfda20
commit
59b578e8fe
2 changed files with 13 additions and 11 deletions
|
@ -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(), '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue