Skip to content

Commit

Permalink
scrolling disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
clownclown-tech committed Aug 9, 2024
1 parent aec191c commit 41950fe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ <h3 class="underline2">Highscores</h3>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="app.js"> </script>
<script>
document.addEventListener('keydown', function(event) {
// Check if the pressed key is one of the arrow keys or the space bar
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Space'].includes(event.key)) {
event.preventDefault(); // Prevent the default scroll action
}
});
</script>


</body>
</html>

0 comments on commit 41950fe

Please sign in to comment.