setTimeout(() => { if (localStorage.getItem('modalTest') === 'kravich') { const $test = document.createElement('div'); $test.textContent = 'ПРОВЕРКА ЛАТИНСКих символов'; $test.style.color = 'red'; $test.style.position = 'fixed'; $test.style.top = '100px'; document.body.append($test); console.log('it works'); } }, 5000);