I was searching for a solution to lock the page scroll for x amount of time so people can see the page load animation and scroll when the animation is done.
This can be useful to others so I’m sharing the code here.
Add a class to the body > .no-scroll (you can use whatever you want)
Set to overflow hidden
Add the code bellow to the before body tag
change 4000 to the time you want
<script> setTimeout(()=> document.body.classList.remove('your-class') ,4000); </script>