501// 300 * 100 = 30000 мс -> 30 сек502if (300 === count) clearInterval(timer);503504for (var i = 0; i < recBlocksT400.length; i++) {505var rec = recBlocksT400[i];506507if (rec.getAttribute('data-hiding-completed') === 'yes') countCompleted += 1;508}509510if (countCompleted === recBlocksT400.length) {511t_blocksFade();512clearInterval(timer);
} }, 100); } window.addEventListener( 'scroll', t_throttle(function () { t_blocksFade(); }, 200) ); window.addEventListener( 'tildatab:change', t_throttle(function () { t_blocksFade(); }, 200) ); setTimeout(function () { t_blocksFade(); }); } } var html = document.querySelector('html'); var body = document.body; if (html.style.display === 'none') { html.style.display = 'block'; } var tildaLabel = document.querySelector('.t-tildalabel'); var bodyScrollHeight; if (body) { bodyScrollHeight = Math.max(body.scrollHeight, body.offsetHeight, body.clientHeight, html.offsetHeight); } else { bodyScrollHeight = html.offsetHeight; } // Исторически сложилось, что скрываем Tilda Label, // если страница короче окна, чтобы он не «висел» в пустоте. if (bodyScrollHeight + 70 < window.innerHeight) { if (tildaLabel) { tildaLabel.style.display = 'none'; } } else { if (tildaLabel) { tildaLabel.setAttribute('style', 'display: block !important'); } }});/** * window.winWidth and window.winHeight used in tilda-stat, to create fingerprint statistics. * The blocks are hidden via css. It seems to work the same without this function. */(function () { /** Set window width and height */ function t_setWindowVars() { window.winWidth = window.innerWidth; window.winHeight = window.innerHeight; } /** Show and hide blocks */ function t_blocksdisplay() { var windowWidth = window.isMobile ? document.documentElement.clientWidth : window.innerWidth; var recBlocks = document.querySelectorAll('.r[data-screen-max], .r[data-screen-min]'); var max; var min; var display; if (navigator.userAgent.indexOf('Instagram') !== -1) windowWidth = screen.width; for (var i = 0; i < recBlocks.length; i++) { var rec = recBlocks[i]; var recId = rec.id.replace('rec', ''); const zeroPopupSelector = `[data-popup-rec-ids*="${recId}"]`; if (rec.getAttribute('data-connect-with-tab') === 'yes' || document.querySelector(zeroPopupSelector)) { return; } display = getComputedStyle(rec).display; max = rec.getAttribute('data-screen-max'); min = rec.getAttribute('data-screen-min'); if (!max) max = 10000; if (!min) min = 0; max = parseInt(max);