// $(document).ready(function (){
//     middleWareJS()
// })

// window.onfocus = function () {
//     getSocketState()
// }
window.onload = function (){
    middleWareJS()
}

function middleWareJS(){
    let footer = document.querySelector("footer")
    let body = document.querySelector("body")

    if (document.querySelector(".menu_buttons.curtain.left") || window.location.href.includes('support') || window.location.href.includes('chat')){
        footer.style.display = "none"
        body.style.overflow = "hidden"

    } else {
        footer.style.display = ""
        body.style.overflow = ""
    }

}

document.addEventListener('DOMContentLoaded', function() {
     let img = document.getElementById('dropbtn_lang')
     if (window.location.href.indexOf("ru") > -1){
        img.style.background = "url('/static/img/png/ru.png')"
        img.style.backgroundRepeat = "no-repeat"
        img.style.backgroundPosition = "left center"

     }else if(window.location.href.indexOf("en") > -1){
        img.style.background = "url('/static/img/png/en.png')"
        img.style.backgroundRepeat = "no-repeat"
        img.style.backgroundPosition = "left center"
     }
});

window.addEventListener('scroll', () => {
    // let headerBG = document.getElementById('header_bg')
    //
    // headerBG.style.backgroundColor = 'rgb(248 248 248 / 90%)'
    // headerBG.style.padding = '20px 40px'
  // headerBG.style.paddingBottom = 'padding: 10px 40px 10px 40px'
  // headerBG.style.paddingRight = 'padding: 10px 40px 10px 40px'
  // headerBG.style.paddingLeft = 'padding: 10px 40px 10px 40px'
})

  // Действия при изменении URL






