let captchaId = null; document.addEventListener("DOMContentLoaded", function () { if (!window.smartCaptcha) { console.log("SmartCaptcha не загрузилась"); return; } document.querySelectorAll('a[href*="https://vivoz-musora59.ru/redirect"]').forEach(btn => { btn.addEventListener("click", function (e) { e.preventDefault(); // Если капча еще не создана - создаем и показываем if (captchaId === null) { // Очищаем контейнер const container = document.getElementById("captcha-container"); container.innerHTML = ''; // Делаем контейнер видимым (на случай если он скрыт) container.style.display = 'block'; container.style.visibility = 'visible'; container.style.height = 'auto'; container.style.opacity = '1'; // Создаем видимую капчу captchaId = window.smartCaptcha.render("captcha-container", { sitekey: "ysc1_TsQSiBBd0C1tjQQcv8xq9SRHabEKL4EBWvlXyZ4z12579a73", invisible: false, test: false, callback: onCaptchaSuccess }); console.log("Captcha создана, ID:", captchaId); // Прокручиваем страницу к капче, чтобы пользователь её увидел container.scrollIntoView({ behavior: 'smooth', block: 'center' }); } else { console.log("Капча уже отображается"); // Если капча уже создана, но не видна - показываем её const container = document.getElementById("captcha-container"); container.style.display = 'block'; container.style.visibility = 'visible'; container.style.height = 'auto'; container.style.opacity = '1'; container.scrollIntoView({ behavior: 'smooth', block: 'center' }); } }); }); }); function onCaptchaSuccess(token) { console.log("Captcha OK:", token); // Можно скрыть капчу после успешного прохождения // document.getElementById("captcha-container").style.display = 'none'; // Переходим по ссылке window.location.href = "https://vivoz-musora59.ru/redirect"; }

Нажмите на кнопку, чтобы подтвердить,
что вы ЧЕЛОВЕК

Звоните, сейчас работаем

Телефон +7 (952) 321-23-55   

Почта larin.logistik@mail.ru         

Пожалуйста, подтвердите, что вы человек