diff --git a/slideshowpure.js b/slideshowpure.js index b76373a..348df1f 100644 --- a/slideshowpure.js +++ b/slideshowpure.js @@ -12,16 +12,19 @@ const getJellyfinCredentials = () => { console.error("Could not parse jellyfin credentials", e); } }; + const initLoadingScreen = () => { - const currentPath = window.location.href; + const currentPath = window.location.href.toLowerCase(); + if ( - currentPath.includes("/web/#/home.html") || - currentPath.includes("/web/index.html#/home.html") + currentPath.includes("/web/#/home.html") || + currentPath.includes("/web/index.html#/home.html") || + currentPath.endsWith("/web/") ) { - const loadingHTML = ` + const loadingHTML = `

- Server Logo

@@ -30,7 +33,7 @@ const initLoadingScreen = () => {
`; - document.body.insertAdjacentHTML("beforeend", loadingHTML); + document.body.insertAdjacentHTML("beforeend", loadingHTML); } }; initLoadingScreen();