diff --git a/docker-compose/requirements/nginx/static/javascript/lobbyPage/main.js b/docker-compose/requirements/nginx/static/javascript/lobbyPage/main.js index e0f0bdd..7d6b277 100644 --- a/docker-compose/requirements/nginx/static/javascript/lobbyPage/main.js +++ b/docker-compose/requirements/nginx/static/javascript/lobbyPage/main.js @@ -6,7 +6,7 @@ /* By: edbernar { + window.scroll({ + top: 100000, + behavior: 'smooth' + }); + }, 50); + } for (let i = 0; i < menuList.length; i++) { menuList[i].style.display = 'none'; @@ -239,11 +248,20 @@ function selectGameModeOne() gameMode = 0; } -function selectGameModeTwo() +function selectGameModeTwo(event, disableScroll = false) { const menuList = document.getElementsByClassName('menuSelected'); const gameModeDiv = document.getElementsByClassName('game-mode')[0].children; + if (!disableScroll) + { + setTimeout(() => { + window.scroll({ + top: 100000, + behavior: 'smooth' + }); + }, 50); + } for (let i = 0; i < menuList.length; i++) { menuList[i].style.display = 'none'; @@ -274,11 +292,20 @@ function selectGameModeTwo() gameMode = 1; } -function selectGameModeThree() +function selectGameModeThree(event, disableScroll = false) { const menuList = document.getElementsByClassName('menuSelected'); const gameModeDiv = document.getElementsByClassName('game-mode')[0].children; + if (!disableScroll) + { + setTimeout(() => { + window.scroll({ + top: 100000, + behavior: 'smooth' + }); + }, 50); + } for (let i = 0; i < menuList.length; i++) { menuList[i].style.display = 'none'; @@ -306,11 +333,20 @@ function selectGameModeThree() gameMode = 2; } -function selectGameModeFour() +function selectGameModeFour(event, disableScroll = false) { const menuList = document.getElementsByClassName('menuSelected'); const gameModeDiv = document.getElementsByClassName('game-mode')[0].children; + if (!disableScroll) + { + setTimeout(() => { + window.scroll({ + top: 100000, + behavior: 'smooth' + }); + }, 50); + } for (let i = 0; i < menuList.length; i++) { menuList[i].style.display = 'none'; diff --git a/docker-compose/requirements/nginx/static/javascript/profilPage/main.js b/docker-compose/requirements/nginx/static/javascript/profilPage/main.js index 31a3742..447f453 100644 --- a/docker-compose/requirements/nginx/static/javascript/profilPage/main.js +++ b/docker-compose/requirements/nginx/static/javascript/profilPage/main.js @@ -6,7 +6,7 @@ /* By: edbernar { const arrayBuffer = e.target.result;