mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
07de1c52f9
commit
d421bfda20
4 changed files with 28 additions and 10 deletions
|
@ -334,7 +334,22 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
|||
ctx.handled = true;
|
||||
}
|
||||
|
||||
var baseRoute = window.location.href.split('?')[0].replace('/index.html', '');
|
||||
function getRequestFile() {
|
||||
var path = window.location.pathname;
|
||||
|
||||
if (path == '/') {
|
||||
path = '/index.html';
|
||||
}
|
||||
|
||||
var index = path.lastIndexOf('/');
|
||||
if (index != -1) {
|
||||
return path.substring(index);
|
||||
}
|
||||
|
||||
return '/' + path;
|
||||
}
|
||||
|
||||
var baseRoute = window.location.href.split('?')[0].replace(getRequestFile(), '');
|
||||
// support hashbang
|
||||
baseRoute = baseRoute.split('#')[0];
|
||||
if (baseRoute.lastIndexOf('/') == baseRoute.length - 1) {
|
||||
|
@ -489,7 +504,7 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
|||
}
|
||||
|
||||
function setBaseRoute() {
|
||||
var baseRoute = window.location.pathname.replace('/index.html', '');
|
||||
var baseRoute = window.location.pathname.replace(getRequestFile(), '');
|
||||
if (baseRoute.lastIndexOf('/') == baseRoute.length - 1) {
|
||||
baseRoute = baseRoute.substring(0, baseRoute.length - 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue