diff --git a/static/js/global_js.js b/static/js/global_js.js index 029c3ff..c7a658f 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -11,9 +11,14 @@ window.onload = function (){ middleWareJS() openOrCloseCurtainSupportChat() openOverlayOrClose() - let height = window.innerHeight - document.querySelector('body').style.maxHeight = height + 'px' - document.querySelector('body').style.height = height + 'px' + let body = document.querySelector("body") + const viewPortH = body.getBoundingClientRect().height; + const windowH = window.innerHeight; + const browserUiBarsH = viewPortH - windowH; + body.style.height = `calc(100vh - ${browserUiBarsH}px)`; + // let height = window.innerHeight + // document.querySelector('body').style.maxHeight = height + 'px' + // document.querySelector('body').style.height = height + 'px' if (window.location.href.includes('profile') && !window.location.href.includes('login') && !window.location.href.includes('registration')){ let user_type = getInfoAboutUser() if (user_type === 'mobile') { @@ -39,11 +44,6 @@ window.onload = function (){ } // -$(window).on('resize',function (){ - let height = window.innerHeight - $('body')[0].style.maxHeight = height + 'px' - $('body')[0].style.height = height + 'px' -}) function middleWareJS(){ let footer = document.querySelector("footer")