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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-feed-1.1.js

Код файла
Версия от 18.08.2026, 07:00:17 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
2301 * @param {object} obj – object with data which came from the backend2302 * @param {object} post – JSON with data for post2303 */2304function t_feed_changeURL(obj, post) {2305	var hostUrl = window.location.protocol + '//' + window.location.hostname;2306	// Cut out protocol and host from post url and collect pathname2307	var postPathname = post.url.split('/').slice(3).join('/');2308	var url = hostUrl + '/' + postPathname;2309 2310	var newPageTitle = document.title + '-' + post.title;2311 
История файла и сравнение версий
  • 18.08.2026, 07:00:17 · 56c3b845
2312
if (document.querySelector('.t-feed__post-popup')) {
2313 if (typeof history.pushState != 'undefined') {
2314 window.history.pushState(
2315 {
2316 postData: 'open',
2317 obj: obj,
2318 post: post,
2319 },
2320 newPageTitle,
2321 url
2322 );
2323 }
2324 }
2325}
2326
2327function t_feed_drawWholePostPopup(obj, post, opts, lid_post, recid) {
2328 var rec = document.querySelector('#rec' + recid);
2329 var feed = rec.querySelector('.js-feed') || rec;
2330 var gridType = feed.getAttribute('data-feed-grid-type');
2331 var statAttr = opts.popup_opts.popupStat ? 'data-track-popup="' + opts.popup_opts.popupStat + '"' : '';
2332 var popupStyle = opts.popup_opts.overlayBgColorRgba
2333 ? 'style="background-color:' + opts.popup_opts.overlayBgColorRgba + '"'
2334 : '';
2335 var popupStyleClose = opts.popup_opts.overlayBgColorRgba
2336 ? 'style="background-color:' + opts.popup_opts.overlayBgColorRgba.replace('1)', '0.9)') + '"'
2337 : '';
2338
2339 var inOneColumnHTML = {
2340 open: !opts.popup_opts.inTwoColumns ? '<div class="t-feed__post-popup__content t-col t-col_8">' : '',
2341 close: !opts.popup_opts.inTwoColumns ? '</div>' : '',
2342 };
2343
2344 var inTwoColumnsHTML = {
2345 open: opts.popup_opts.inTwoColumns
2346 ? '<div class="t-feed__post-popup__content t-feed__post-popup__content_half t-feed__post-popup__content-col t-col t-col_6">'
2347 : '',
2348 close: opts.popup_opts.inTwoColumns ? '</div>' : '',
2349 };
2350
2351 var str = '';
2352 var panelClass = gridType === 'side-panel' ? ' t-feed__post-popup_panel ' : ' ';
2353 str +=
2354 '<div class="t-feed__post-popup' +
2355 panelClass +
2356 't-popup" data-feed-popup-feeduid="' +
2357 obj.feeduid +
2358 '" data-feed-popup-postuid="' +
2359 lid_post +
2360 '" ' +
2361 statAttr +
2362 ' ' +
2363 popupStyle +
2364 '>' +
2365 '<div class="t-feed__post-popup__close-wrapper t-feed__post-popup__close-wrapper_loading" ' +
2366 popupStyleClose +
2367 '>' +
2368 '' +
2369 t_feed_drawPostPopupCloseIcon(recid, opts) +
2370 '' +
2371 t_feed_drawPopupTitle(obj, opts) +
2372 '' +
2373 t_feed_drawSharing(opts) +
2374 '</div>';
2375
2376 var containerClass = gridType === 'side-panel' ? ' t-feed__post-popup__container_panel ' : ' ';
2377 str +=
2378 '<div class="t-feed__post-popup__container' +
2379 containerClass +
2380 't-feed__post-popup__container_loading t-container t-popup__container t-popup__container-static t-popup__container-animated">' +
2381 '<div class="t-feed__post-popup__content-wrapper">';
2382 str += inOneColumnHTML.open;
2383
2384 if (!opts.popup_opts.inTwoColumns) {
2385 if (opts.popup_opts.imagePos == 'aftertitle') {
2386 str += '' + t_feed_addPostPopupHeading(opts, post, recid);
2387 str += '' + t_feed_drawPostPopupCover(recid, 'aftertitle', opts, post);
2388 } else {
2389 str += '' + t_feed_drawPostPopupCover(recid, 'beforetitle', opts, post);
2390 str += '' + t_feed_addPostPopupHeading(opts, post, recid);
2391 }
2392 }
2393
2394 if (opts.popup_opts.inTwoColumns) {
2395 str += inTwoColumnsHTML.open;
2396 str += '' + t_feed_drawPostPopupCover(recid, 'beforetitle', opts, post);
2397 str += inTwoColumnsHTML.close;
2398 }
2399
2400 str += inTwoColumnsHTML.open;
Предыдущие 100 строкСледующие 100 строк