Некодим© 2020-2026 Некодим
Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.
Журнал изменений История Git Файлы Tilda MCP Каталог файловtilda-blocks-page189679109.min.js Следить за файлом 101 function t651_closePopup(){var blocks=document.querySelectorAll('.t651.t651_active');var buttons=document.querySelectorAll('.t651__btn.t651__btn_active');var popups=document.querySelectorAll('.t651__popup.t651__popup_show');for(var i=0;i<blocks.length;i++){blocks[i].classList.remove('t651_active')}102 for(var i=0;i<buttons.length;i++){buttons[i].classList.remove('t651__btn_active')}103 for(var i=0;i<popups.length;i++){popups[i].classList.remove('t651__popup_show')}104 setTimeout(function(){var popupHide=document.querySelectorAll('.t651__popup:not(.t651__popup_show)');for(var i=0;i<popupHide.length;i++){popupHide[i].style.display='none'}},300);document.removeEventListener('keydown',t651_escClosePopup)}105 function t708_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t708');if(!container)return;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;var popup=rec.querySelector('.t708__popup');var analitics=popup.getAttribute('data-track-popup');var hook='TildaSendMessageWidget'+recId;var button=rec.querySelector('.t708__btn');var closeButton=popup.querySelector('.t708__mobile-icon-close');button.addEventListener('click',function(event){if(button.classList.contains('t708__btn_active')){t708_closePopup();return}106 button.classList.add('t708__btn_active');container.classList.add('t708_active');t708_showPopup(recId);event.preventDefault();if(analitics)Tilda.sendEventToStatistics(analitics,hook)});closeButton.addEventListener('click',t708_closePopup)}107 История файла и сравнение версий function t708_lockScroll(){var documentBody=document.body;if(!documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=typeof window.pageYOffset!=='undefined'?window.pageYOffset:(document.documentElement||documentBody.parentNode||documentBody).scrollTop;documentBody.classList.add('t-body_scroll-locked');documentBody.style.top='-'+bodyScrollTop+'px';documentBody.setAttribute('data-popup-scrolltop',bodyScrollTop)}}
108 function t708_unlockScroll(){var documentBody=document.body;if(documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=documentBody.getAttribute('data-popup-scrolltop');documentBody.classList.remove('t-body_scroll-locked');documentBody.style.top=null;documentBody.removeAttribute('data-popup-scrolltop');document.documentElement.scrollTop=parseInt(bodyScrollTop)}}109 function t708_showPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t708');if(!container)return;var range=rec.querySelector('.t-range');var popup=rec.querySelector('.t708__popup');var buttonWrapper=rec.querySelector('.t708__btn_wrapper');var buttonText=rec.querySelector('.t708__btn-text');var documentBody=document.body;if(buttonWrapper)buttonWrapper.classList.remove('t651__btn_animate');if(buttonText)buttonText.style.display='none';if(window.innerWidth<960)documentBody.classList.add('t708__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream){setTimeout(function(){t708_lockScroll()},500)}110 popup.style.display='block';if(range)t708__triggerEvent(range,'popupOpened');setTimeout(function(){popup.classList.add('t708__popup_show')},50);t708_runLazyLoad();document.addEventListener('keydown',t708_escClosePopup)}111 function t708_escClosePopup(event){if(event.key==='Escape')t708_closePopup()}112 function t708_closePopup(){if(window.innerWidth<960)document.body.classList.remove('t708__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream){t708_unlockScroll()}113 var containers=document.querySelectorAll('.t708');var buttons=document.querySelectorAll('.t708__btn');var popups=document.querySelectorAll('.t708__popup');for(var i=0;i<containers.length;i++){containers[i].classList.remove('t708_active')}114 for(var i=0;i<buttons.length;i++){buttons[i].classList.remove('t708__btn_active')}115 for(var i=0;i<popups.length;i++){popups[i].classList.remove('t708__popup_show')}116 setTimeout(function(){var popupHide=document.querySelectorAll('.t708__popup:not(.t708__popup_show)');for(var i=0;i<popupHide.length;i++){popupHide[i].style.display='none'}},300);document.removeEventListener('keydown',t708_escClosePopup)}117 function t708_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}118 function t708_runLazyLoad(){var records=document.querySelector('.t-records:not([data-tilda-mode])');if(records){var allRecs=document.querySelector('#allrecords');if(window.lazy==='y'||allRecs.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}}119 function t708__triggerEvent(el,eventName){var event;if(typeof window.CustomEvent==='function'){event=new CustomEvent(eventName)}else if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent(eventName,!0,!1)}else if(document.createEventObject){event=document.createEventObject();event.eventType=eventName}120 event.eventName=eventName;if(el.dispatchEvent){el.dispatchEvent(event)}else if(el.fireEvent){el.fireEvent('on'+event.eventType,event)}else if(el[eventName]){el[eventName]()}else if(el['on'+eventName]){el['on'+eventName]()}}121 function t653_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t653');if(!container)return;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;var popup=rec.querySelector('.t653__popup');var analitics=popup.getAttribute('data-track-popup');var hook='TildaSendMessageWidget'+recId;var button=rec.querySelector('.t653__btn');var closeButton=popup.querySelector('.t653__mobile-icon-close');button.addEventListener('click',function(event){if(button.classList.contains('t653__btn_active')){t653_closePopup();return}122 button.classList.add('t653__btn_active');container.classList.add('t653_active');t653_showPopup(recId);event.preventDefault();if(analitics&&window.Tilda){Tilda.sendEventToStatistics(analitics,hook)}});closeButton.addEventListener('click',t653_closePopup)}123 function t653_lockScroll(){var documentBody=document.body;if(!documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=typeof window.pageYOffset!=='undefined'?window.pageYOffset:(document.documentElement||documentBody.parentNode||documentBody).scrollTop;documentBody.classList.add('t-body_scroll-locked');documentBody.style.top='-'+bodyScrollTop+'px';documentBody.setAttribute('data-popup-scrolltop',bodyScrollTop)}}124 function t653_unlockScroll(){var documentBody=document.body;if(documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=documentBody.getAttribute('data-popup-scrolltop');documentBody.classList.remove('t-body_scroll-locked');documentBody.style.top='';documentBody.removeAttribute('data-popup-scrolltop');window.scrollTo(0,parseInt(bodyScrollTop))}}125 function t653_showPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t653');if(!container)return;var popup=rec.querySelector('.t653__popup');var buttonWrapper=rec.querySelector('.t653__btn_wrapper');var buttonText=rec.querySelector('.t653__btn-text');if(buttonWrapper)buttonWrapper.classList.remove('t651__btn_animate');if(buttonText)buttonText.style.display='none';if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream){setTimeout(function(){t653_lockScroll()},500)}126 popup.style.display='block';setTimeout(function(){popup.classList.add('t653__popup_show')},50);document.addEventListener('keydown',t653_escClosePopup)}127 function t653_escClosePopup(event){if(event.key==='Escape')t653_closePopup()}128 function t653_closePopup(){if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream){t653_unlockScroll()}129 var containers=document.querySelectorAll('.t653');var buttons=document.querySelectorAll('.t653__btn');var popups=document.querySelectorAll('.t653__popup');for(var i=0;i<containers.length;i++){containers[i].classList.remove('t653_active')}130 for(var i=0;i<buttons.length;i++){buttons[i].classList.remove('t653__btn_active')}131 for(var i=0;i<popups.length;i++){popups[i].classList.remove('t653__popup_show')}132 setTimeout(function(){var popupHide=document.querySelectorAll('.t653__popup:not(.t653__popup_show)');for(var i=0;i<popupHide.length;i++){popupHide[i].style.display='none'}},300);document.removeEventListener('keydown',t653_escClosePopup)}133 function t797_init(recId){if(window.isMobile){var rec=document.getElementById('rec'+recId);var textWrapper=rec.querySelector('.t797__txt-wrapper');if(rec&&textWrapper)textWrapper.style.display='none'}134 t_onFuncLoad('tvote__init',function(){tvote__init(recId)})}135 function t807__init(recId){t_onFuncLoad('tvote__init',function(){tvote__init(recId)});var rec=document.getElementById('rec'+recId);if(!rec)return;var vote=rec.querySelector('.t-vote');if(!vote)return;var voteItems=rec.querySelectorAll('.js-vote-item');if(typeof jQuery!=='undefined'){$(vote).bind('tildavote:numberschanged',function(){for(var i=0;i<voteItems.length;i++){var voteItem=voteItems[i];var percent=voteItem.querySelector('.t-vote__btn-res__percent');if(percent){var bar=voteItem.querySelector('.t807__answer-progressbar');if(bar)bar.style.width=percent.innerHTML}}});$(vote).bind('tildavote:resultsended',function(){if(!vote.classList.contains('t-vote_sended')||vote.classList.contains('t807__hidden'))return;vote.classList.add('t807__hidden');if(!vote.getAttribute('data-vote-visibility')&&vote.classList.contains('t807__test')){t807__onSuccess(recId)}})}else{vote.addEventListener('tildavote:numberschanged',function(){for(var i=0;i<voteItems.length;i++){var voteItem=voteItems[i];var percent=voteItem.querySelector('.t-vote__btn-res__percent');if(percent){var bar=voteItem.querySelector('.t807__answer-progressbar');if(bar)bar.style.width=percent.innerHTML}}});vote.addEventListener('tildavote:resultsended',function(){if(!vote.classList.contains('t-vote_sended')||vote.classList.contains('t807__hidden'))return;vote.classList.add('t807__hidden');if(!vote.getAttribute('data-vote-visibility')&&vote.classList.contains('t807__test')){t807__onSuccess(recId)}})}136 t807__replyClickBtn(recId)}137 function t807__replyClickBtn(recId){var rec=document.getElementById('rec'+recId);var submit=rec.querySelector('.t807__btn_reply');if(submit){submit.addEventListener('click',function(event){event.preventDefault()})}}138 function t807__onSuccess(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var testBlock=rec.querySelector('.t807__test');if(!testBlock)return;var targetOffset=testBlock.getBoundingClientRect().top+window.pageYOffset;var target=0;if(window.innerWidth>960){target=targetOffset-200}else{target=targetOffset-100}140 function t807__scroll(target){var duration=400;var start=(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0);var change=target-start;var currentTime=0;var increment=16;document.body.setAttribute('data-scrollable','true');function t807__easeInOutCubic(currentTime){if((currentTime/=duration/2)<1){return(change/2)*currentTime*currentTime*currentTime+start}else{return(change/2)*((currentTime-=2)*currentTime*currentTime+2)+start}}141 function t807__animateScroll(){currentTime+=increment;window.scrollTo(0,t807__easeInOutCubic(currentTime));if(currentTime<duration){setTimeout(t807__animateScroll,increment)}else{document.body.removeAttribute('data-scrollable')}}142 t807__animateScroll()}143 function t988_init(recId,donation){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t988');if(!container)return;var priceInput=rec.querySelector('.t988__price');var priceButtons=rec.querySelectorAll('.t988__pricebtn');var priceButtonOther=rec.querySelector('.t988__price-other');var submit=rec.querySelector('.t988__submit');var link=submit.parentNode;var activeBtn=rec.querySelector('.t988__pricebtn_active');var updatePrice=function(event){var value=priceInput.value;var match=value.replace(/\D/g,'');var href;if(!value||value==='0'||!match||match==='0'){priceInput.classList.add('t988__price_error');submit.classList.add('t988__submit_error');setTimeout(function(){submit.classList.remove('t988__submit_error')},300);if(event)event.preventDefault();return}else{href='#order:'+donation+'='+match;link.href=href}};if(activeBtn){priceInput.value=activeBtn.value;updatePrice()}144 for(var i=0;i<priceButtons.length;i++){var priceButton=priceButtons[i];if(priceButton.classList.contains('t988__pricebtn_active')){priceInput.value=priceButton.value}145 priceButton.addEventListener('click',function(){var button=this;if(!button.classList.contains('t988__price-other')){priceInput.value=button.value;priceInput.style.display='none'}146 for(var j=0;j<priceButtons.length;j++){priceButtons[j].classList.remove('t988__pricebtn_active')}147 button.classList.add('t988__pricebtn_active');updatePrice()})}148 if(priceButtonOther){priceButtonOther.addEventListener('click',function(){priceInput.value='';link.href='';priceInput.style.display='block';priceInput.focus()})}149 priceInput.addEventListener('focus',function(){this.classList.remove('t988__price_error')});submit.addEventListener('click',updatePrice);priceInput.addEventListener('keyup',updatePrice)}150 function t312_initPopup(){var links=document.querySelectorAll('a[href*="typeform.com"]');for(var i=0;i<links.length;i++){var link=links[i];link.setAttribute('data-mode','1');link.setAttribute('target','_blank');if(window.innerWidth>980){link.removeEventListener('click',t312_initEventClick);link.addEventListener('click',t312_initEventClick)}}}151 function t312_initEventClick(event){var url=this.href;t312_showPopup(url);t312_resizePopup();event.preventDefault()}152 function t312_showPopup(url){var containers=document.querySelectorAll('.t312');var windowHeight=window.innerHeight-100;var iframe=document.createElement('iframe');iframe.id='typeform-full';iframe.width='100%';iframe.height='100%';iframe.src=url;iframe.setAttribute('frameborder','0');iframe.setAttribute('data-hook-iframe','t312');var script=document.createElement('script');script.type='text/javascript';script.src='https://s3-eu-west-1.amazonaws.com/share.typeform.com/embed.js?v=1';if(containers.length>0)document.body.classList.add('t312__body_popupshowed');for(var i=0;i<containers.length;i++){var container=containers[i];var popup=container.querySelector('.t312__popup');var closeButtons=container.querySelectorAll('.t312__close, .t312__bg');var content=container.querySelector('[data-hook-typeform-carrier]');content.innerHTML='';content.appendChild(iframe);content.appendChild(script);container.querySelector('[data-hook-iframe]').style.height=windowHeight+'px';if(popup.getAttribute('style'))popup.removeAttribute('style');container.classList.add('t312__popup_show');for(var j=0;j<closeButtons.length;j++){var closeButton=closeButtons[j];closeButton.removeEventListener('click',t312_closePopup);closeButton.addEventListener('click',t312_closePopup)}}}153 function t312_closePopup(){var container=document.querySelector('.t312.t312__popup_show');document.body.classList.remove('t312__body_popupshowed');if(container)container.classList.remove('t312__popup_show')}154 function t312_resizePopup(){var popups=document.querySelectorAll('.t312__content');var main=document.querySelector('.t312__mainblock');var windowHeight=window.innerHeight;var mainHeight=0;if(main){var mainStyle=getComputedStyle(main,null);var mainPaddingTop=parseInt(mainStyle.paddingTop)||0;var mainPaddingBottom=parseInt(mainStyle.paddingBottom)||0;mainHeight=main.clientHeight-(mainPaddingTop+mainPaddingBottom)}155 if(mainHeight>windowHeight){for(var i=0;i<popups.length;i++){popups[i].classList.add('t312__content_static')}}else{for(var i=0;i<popups.length;i++){popups[i].classList.remove('t312__content_static')}}}