This commit is contained in:
2023-10-20 21:40:27 +03:00
parent 71c4ce41f0
commit 9c95358305
4 changed files with 12 additions and 5 deletions

View File

@@ -11,15 +11,15 @@ window.onload = function (){
function middleWareJS(){
let footer = document.querySelector("footer")
let body = document.body.style;
let body = document.querySelector("body")
if (document.querySelector(".block-list-of-users")){
footer.style.display = "none"
body.style.overflow = "hidden"
} else {
footer.style.display = ""
body.style.overflow = ""
}
}

View File

@@ -17,7 +17,8 @@ function writeMessage(el){
let list_div = document.querySelectorAll('.menu_profile div');
list_div.forEach(el=>{ el.classList.remove('selected'); });
el.classList.add('selected')
let body = document.querySelector("body")
body.style.overflow = "hidden"
//updating the url without reloading
window.history.pushState(null, null, '/ru/profile/page/chat/')
middleWareJS()