diff --git a/static/src/js/content.js b/static/src/js/content.js index 14c420b..d5cd2eb 100644 --- a/static/src/js/content.js +++ b/static/src/js/content.js @@ -23,11 +23,13 @@ function handleScrollIndicator() { } window.addEventListener("load", () => { - window.addEventListener("resize", handleScrollIndicator); - window.addEventListener("scroll", handleScrollIndicator); + if (CONTENT && SCROLL_INDICATOR) { + window.addEventListener("resize", handleScrollIndicator); + window.addEventListener("scroll", handleScrollIndicator); + + // Initialize the indicator + handleScrollIndicator(); + } GLightbox({}); - - // Initialize the indicator - handleScrollIndicator(); });