Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-feed-1.0.js

Код файла
Версия от 24.08.2026, 07:03:11 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
1901			window.history.pushState(popupState, null, window.location.origin + window.location.pathname + anchor);1902		});1903	});1904}1905 1906function t_feed_addPostPopupGallery(recid, post) {1907	if (post.mediadata !== '' && JSON.parse(post.mediadata).length > 0) {1908		t_feed_setGalleryImageHeight(recid);1909 1910		t_feed_onFuncLoad('t_sldsInit', function () {1911			t_sldsInit(recid + ' .t-feed__post-popup');1912
История файла и сравнение версий
  • 24.08.2026, 07:03:11 · 56c3b845
if (window.lazy === 'y' || document.querySelector('#allrecords').getAttribute('data-tilda-lazy') === 'yes') {
1913 t_feed_onFuncLoad('t_lazyload_update', function () {
1914 t_lazyload_update();
1915 });
1916 }
1917
1918 t_feed_onFuncLoad('t_slds_updateSlider', function () {
1919 t_slds_updateSlider(recid + ' .t-feed__post-popup');
1920 });
1921
1922 t_feed_onFuncLoad('t_slds_UpdateSliderHeight', function () {
1923 t_slds_UpdateSliderHeight(recid + ' .t-feed__post-popup');
1924 });
1925
1926 t_feed_onFuncLoad('t_slds_UpdateSliderArrowsHeight', function () {
1927 t_slds_UpdateSliderArrowsHeight(recid + ' .t-feed__post-popup');
1928 });
1929 });
1930 }
1931}
1932
1933/**
1934 * Add skeleton for popup elements on slow load
1935 */
1936function t_feed_addPostPopupLoader() {
1937 var loader = '';
1938 for (var i = 0; i < 20; i++) {
1939 loader += '<div class="t-feed__post-popup__text-loader"></div>';
1940 }
1941 document.querySelector('.js-feed-post-text').innerHTML = loader;
1942}
1943
1944/**
1945 * Add zoom for images in popup if zoom setting is on
1946 */
1947function t_feed_addZoom() {
1948 var images = document.querySelectorAll('.js-feed-post-text img');
1949 Array.prototype.forEach.call(images, function (image) {
1950 image.classList.add('t-zoomable');
1951 image.setAttribute('data-zoomable', 'yes');
1952 image.setAttribute('data-img-zoom-url', image.getAttribute('src'));
1953 });
1954}
1955
1956function t_feed_showPopup(recid, post, opts) {
1957 var rec = document.querySelector('#rec' + recid);
1958 var popup = rec.querySelector('.t-feed__post-popup.t-popup');
1959 var arrowTop = popup.querySelector('.t-feed__post-popup__arrow-top');
1960 var currentUrl = window.location.href;
1961 popup.style.display = 'block';
1962 popup.classList.add('t-popup_show');
1963
1964 setTimeout(function () {
1965 popup.querySelector('.t-popup__container').classList.remove('t-feed__post-popup__container_loading');
1966 popup.focus();
1967 t_feed__trapFocus(popup);
1968 // a11y: add class to the trigger button for focus
1969 t_feed__addClassOnTriggerButton();
1970 }, 300);
1971
1972 setTimeout(function () {
1973 popup.querySelector('.t-popup__container').classList.add('t-popup__container-animated');
1974 if (window.lazy === 'y' || document.querySelector('#allrecords').getAttribute('data-tilda-lazy') === 'yes') {
1975 t_feed_onFuncLoad('t_lazyload_update', function () {
1976 t_lazyload_update();
1977 });
1978 }
1979 }, 50);
1980
1981 setTimeout(() => {
1982 ttable.init_ttable();
1983 }, 400);
1984
1985 document.body.classList.add('t-body_popupshowed');
1986 t_feed_getCountOfViews(popup);
1987
1988 if (arrowTop) {
1989 popup.addEventListener('scroll', function () {
1990 t_feed_addPostPopupArrowTop(this, arrowTop);
1991 });
1992
1993 arrowTop.addEventListener('click', function () {
1994 t_feed_scrollTo(popup, 0, 300);
1995 });
1996 }
1997
1998 t_feed_openShare(popup);
1999 t_feed_sendDataToAnalytics(popup, post);
2000
Предыдущие 100 строкСледующие 100 строк