Выполняется загрузка.
Пожалуйста, подождите.

', { mode: 'warning', size: 'lg', showOnInit: false, animate: true, html: true, onInit: (() => {}) }); if (BoxMsg) $(BoxMsg).collapse('show'); }); // 1 2 3 4 5 6 function redirectWithTimer (boxMsg, opts, url, title, text, seconds) { $(boxMsg).find('.message').append($(`
${text}
`)) $(boxMsg).find('.message').find('.message__title').addClass('mb-4') let continueButton = createElement( '' + ' Перейти сейчас | ' + '' ) $(boxMsg).find('.message').append(continueButton) let secondsToGo = seconds ?? 15; let btnCountdown = createElement(`${secondsToGo}`); let btnCountdownCircle = createElement(`
`); btnCountdownCircle.appendChild(btnCountdown); continueButton.href = url continueButton.appendChild(btnCountdownCircle.cloneNode(true)) let redirected = false; let timerInBtn = setTimeout(function tick() { if (secondsToGo >= 1) { // btnCountdown.html(--secondsToGo); let countdownText = continueButton.querySelector('.countdown-text') if (countdownText) countdownText.innerHTML = --secondsToGo+'' timerInBtn = setTimeout(tick, 1000); } if (secondsToGo < 2 && !redirected) { redirected = true; if (url) window.location.href = url; } }, 1000); }