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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.1.js

Код файла
Версия от 04.12.2026, 04:03:55 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
301			script.src = 'https://static.tildacdn.' + t_store__getRootZone() + '/js/' + fileName + '.min.js';302			script.onerror = function () {303				console.error('Failed to load tilda-catalog-pagination: ', this.src);304			};305			document.head.appendChild(script);306		}307 308		if (!document.head.querySelector('link[href*="' + fileName + '"]')) {309			link = document.createElement('link');310			link.rel = 'stylesheet';311			link.type = 'text/css';312
История файла и сравнение версий
  • 04.12.2026, 04:03:55 · 56c3b845
link.href = 'https://static.tildacdn.' + t_store__getRootZone() + '/css/' + fileName + '.min.css';
313 link.media = 'all';
314 document.head.appendChild(link);
315 }
316 }
317
318 t_onFuncLoad('t_throttle', function () {
319 window.addEventListener(
320 'resize',
321 t_throttle(function () {
322 if (!rec) return;
323 if (options.prodCard && options.prodCard.blockId == '1025') {
324 t_store_unifyCardsWidth(recid);
325 }
326 t_store_loadMoreBtn_display(recid);
327 if (options.sidebar || Object.keys(options.filters || {}).length > 1) {
328 t_store_moveSearhSort(recid, options);
329 }
330 if (options.showPagination && options.showPagination === 'on') {
331 t_store_onFuncLoad('t_store_pagination_display', function () {
332 t_store_pagination_display(recid);
333 });
334 }
335 })
336 );
337 });
338
339 var tStore = rec.querySelector('.t-store');
340
341 if (tStore) {
342 tStore.addEventListener('displayChanged', function () {
343 setTimeout(function () {
344 t_store_unifyCardsWidth(recid);
345 });
346 });
347 }
348
349 if (options.popup_opts.fixedButton) {
350 t_store_fixedPopupButton(recid, options);
351 }
352}
353
354/**
355 * Pushes a new state to the history object
356 *
357 * @param {object} state - The state object that you want to store
358 * @param {string} [title] - The title of the page, affect to Safari
359 * @param {string} [url] - The URL to which the browser will navigate
360 **/
361function t_store_history_pushState(state, title, url) {
362 try {
363 if (typeof history.pushState !== 'undefined') {
364 window.history.pushState(state, title, url);
365 }
366 } catch (error) {
367 console.error(error);
368 }
369}
370
371/**
372 * Initialize the product from Snippet
373 *
374 * @param {string} recid
375 * @param {object} options
376 * @param {object} product - the options of product
377 **/
378
379function t_store_productInit(recid, options, product) {
380 t_onReady(function () {
381 const allRecords = document.getElementById('allrecords');
382
383 if (allRecords) {
384 t_store__setupEndpoint();
385 }
386 t_store_snippet_initProduct(recid, options, product);
387 });
388}
389
390function t_store_snippet_initProduct(recid, options, product) {
391 var rec = document.querySelector('#rec' + recid);
392 var el_product = rec.querySelector('.t-store__product-snippet.js-store-product');
393 el_product.setAttribute('data-card-size', 'large');
394 var urlSearch = t_store_snippet_getJsonFromUrl();
395
396 if (options.popup_opts.popupContainer === '100') {
397 var productContainer = el_product.querySelector('.t-container');
398 productContainer.classList.add('t-container_fluid');
399 productContainer.style.maxWidth = '100%';
400
Предыдущие 100 строкСледующие 100 строк