This commit is contained in:
SBD
2024-02-01 14:14:35 +03:00
parent 0023676b28
commit 64b3e40ed0
2 changed files with 13 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ window.onload = function (){
middleWareJS()
openOrCloseCurtainSupportChat()
openOverlayOrClose()
goToChatIfChat()
// let body = document.querySelector("body")
// const viewPortH = body.getBoundingClientRect().height;
// const windowH = window.innerHeight;
@@ -43,7 +44,13 @@ window.onload = function (){
}
}
//
function goToChatIfChat () {
if (document.querySelector('.block-chat')){
let chat = document.querySelector('.block-chat')
let top = chat.offsetTop
window.scrollTo({top:top})
}
}
function middleWareJS(){
let footer = document.querySelector("footer")