if (document.getElementById('footer')) { const footer = document.getElementById('footer'); footer.insertAdjacentHTML('afterbegin', '' + '' ); }