Lean scroll detector for infinite scrolling, displaying certain elements, and other custom behaviors