From 6dc9518b559ffd07b4ceefcd0906eb3af335e118 Mon Sep 17 00:00:00 2001 From: M0RPH3US Date: Wed, 19 Feb 2025 22:32:06 +0530 Subject: [PATCH] Fix for mobile routing --- slideshowpure.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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();