fix typo
This commit is contained in:
@@ -890,14 +890,14 @@ const checkNavigation = () => {
|
|||||||
const isHomePage = url => url.includes('/home') || url.endsWith('/web/') || url.endsWith('/web/index.html');
|
const isHomePage = url => url.includes('/home') || url.endsWith('/web/') || url.endsWith('/web/index.html');
|
||||||
|
|
||||||
if (!isHomePage(newLocation) && isHomePageActive) {
|
if (!isHomePage(newLocation) && isHomePageActive) {
|
||||||
console.log("Leaving homepage, cleaning up slideshow and stopping video");
|
console.log("Leaving home page, cleaning up slideshow and stopping video");
|
||||||
isHomePageActive = false;
|
isHomePageActive = false;
|
||||||
stopBackgroundVideo();
|
stopBackgroundVideo();
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHomePage(newLocation) && !isHomePageActive) {
|
if (isHomePage(newLocation) && !isHomePageActive) {
|
||||||
console.log("Returning to homepage, reactivating slideshow");
|
console.log("Returning to home page, reactivating slideshow");
|
||||||
isHomePageActive = true;
|
isHomePageActive = true;
|
||||||
fetchRandomMovie();
|
fetchRandomMovie();
|
||||||
}
|
}
|
||||||
@@ -944,7 +944,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const isHomePage = url => url.includes('/home') || url.endsWith('/web/') || url.endsWith('/web/index.html');
|
const isHomePage = url => url.includes('/home') || url.endsWith('/web/') || url.endsWith('/web/index.html');
|
||||||
if (isHomePage(window.top.location.href)) {
|
if (isHomePage(window.top.location.href)) {
|
||||||
isHomePageActive = true;
|
isHomePageActive = true;
|
||||||
console.log("Homepage detected, starting slideshow");
|
console.log("Home page detected, starting slideshow");
|
||||||
readCustomList().then(list => {
|
readCustomList().then(list => {
|
||||||
if (list) { movieList = list; currentMovieIndex = 0; }
|
if (list) { movieList = list; currentMovieIndex = 0; }
|
||||||
fetchRandomMovie();
|
fetchRandomMovie();
|
||||||
|
|||||||
Reference in New Issue
Block a user