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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-feed-1.1.js

Код файла
Версия от 18.08.2026, 07:00:17 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
4301			} else {4302				return;4303			}4304		});4305 4306		link.addEventListener('blur', function () {4307			if (post) {4308				post.classList.remove('t-focusable');4309			}4310		});4311	});4312}4313
История файла и сравнение версий
  • 18.08.2026, 07:00:17 · 56c3b845
4314function t_feed_onFuncLoad(funcName, okFunc, time) {
4315 if (typeof window[funcName] === 'function') {
4316 okFunc();
4317 } else {
4318 setTimeout(function checkFuncExist() {
4319 if (typeof window[funcName] === 'function') {
4320 okFunc();
4321 return;
4322 }
4323 if (document.readyState === 'complete' && typeof window[funcName] !== 'function') {
4324 throw new Error(funcName + ' is undefined');
4325 }
4326 setTimeout(checkFuncExist, time || 100);
4327 });
4328 }
4329}
4330
4331function t_feed__trapFocus(popup) {
4332 var focusableEls = popup.querySelectorAll('a, button, input:not([type="hidden"]), select, textarea, video, iframe');
4333 var firstFocusableElement = focusableEls[0];
4334 var lastFocusableElement = focusableEls[focusableEls.length - 1];
4335
4336 document.addEventListener('keydown', function (event) {
4337 var isTabPressed = event.key === 'Tab' || event.keyCode === 9;
4338 if (!isTabPressed) {
4339 return;
4340 }
4341
4342 if (event.shiftKey) {
4343 // if tab+shift and we moving back
4344 if (document.activeElement === firstFocusableElement) {
4345 lastFocusableElement.focus();
4346 event.preventDefault();
4347 }
4348 } else if (document.activeElement === lastFocusableElement) {
4349 firstFocusableElement.focus();
4350 event.preventDefault();
4351 }
4352 });
4353}
4354
4355function t_feed__getRootZone() {
4356 const allrecords = document.getElementById('allrecords');
4357 const rootZone = allrecords && allrecords.getAttribute('data-tilda-root-zone');
4358 return rootZone || 'com';
4359}
4360
4361// Polyfill: Element.matches
4362if (!Element.prototype.matches) {
4363 Element.prototype.matches =
4364 Element.prototype.matchesSelector ||
4365 Element.prototype.msMatchesSelector ||
4366 Element.prototype.mozMatchesSelector ||
4367 Element.prototype.webkitMatchesSelector ||
4368 Element.prototype.oMatchesSelector;
4369}
4370
4371// Polyfill: Element.closest
4372if (!Element.prototype.closest) {
4373 Element.prototype.closest = function (s) {
4374 var el = this;
4375 while (el && el.nodeType === 1) {
4376 if (Element.prototype.matches.call(el, s)) {
4377 return el;
4378 }
4379 el = el.parentElement || el.parentNode;
4380 }
4381 return null;
4382 };
4383}
Предыдущие 100 строк