Navbar menu automatically closes + Using lottie in navmenu button

Awesome you found the source !
Can you tell me what the script does ? And where do you use it ?
Maybe we can make the script more specific, or behave differently