diff --git a/static/utils.js b/static/utils.js deleted file mode 100644 index 4623089..0000000 --- a/static/utils.js +++ /dev/null @@ -1,14 +0,0 @@ -function isElementInView(elementID) { - const element = document.getElementById(elementID); - const rect = element.getBoundingClientRect(); - const windowHeight = - window.innerHeight || document.documentElement.clientHeight; - const windowWidth = - window.innerWidth || document.documentElement.clientWidth; - - // check if element is completely in view - const isInHorizontalView = rect.left >= 0 && rect.right <= windowWidth; - const isInVerticalView = rect.top >= 0 && rect.bottom <= windowHeight; - - return isInHorizontalView && isInVerticalView; -}