document.querySelectorAll('.btn-header-template.btn-reg').forEach(button => { button.addEventListener('mouseenter', () => { button.style.background = ''; }); button.addEventListener('mouseleave', () => { button.style.background = ''; }); }); document.querySelectorAll('.btn-header-template.btn-reg').forEach(button => { button.addEventListener('mouseenter', () => { button.style.background = ''; }); button.addEventListener('mouseleave', () => { button.style.background = ''; }); }); function myFunction() { var x = document.getElementById("myLinks"); // Скрытие или отображение меню if (x.style.display === "flex") { x.style.display = "none"; } else { x.style.display = "flex"; } } var oside = document.getElementsByClassName("d-link"); let host = window.location.hostname; if (oside.length) { for (var i = 0; i < oside.length; i++) { oside[i].addEventListener("click", async function () { window.location.href = `/goto`; }); } }