Каталог файловtilda-feed-1.0.js
2701 if (!videoType) return '';2702 2703 const { videoId: id, videoHash: hash, videoTime: time, vkOID, videoParams } = params;2704 2705 const videoTypeConfig = {2706 youtube: {2707 baseUrl: `https://www.youtube.com/embed/${id}`,2708 params: ['rel=0', 'fmt=18', 'html5=1', 'showinfo=0', 'muted=1', 'enable', time && `start=${time}`],2709 },2710 vimeo: {2711 baseUrl: `https://player.vimeo.com/video/${id}`,2712
История файла и сравнение версий
params: ['title=0', 'byline=0', 'portrait=0', 'badge=0', 'color=ffffff', 'muted=1', hash && `h=${hash}`],
2713 hashtag: time ? `#t=${time}` : '', 2716 baseUrl: `https://kinescope.io/embed/${id}`, 2717 params: ['muted=1', time && `t=${time}`], 2720 baseUrl: `https://rutube.ru/embed/${id}`, 2721 params: ['muted=1', time && `t=${time}`, hash && `p=${hash}`], 2724 baseUrl: 'https://vk.com/video_ext.php', 2725 params: ['js_api=1', 'hd=2', 'muted=1', `id=${id}`, `oid=${vkOID}`, hash && `hash=${hash}`, time && `t=${time}`], 2728 baseUrl: 'https://vkvideo.ru/video_ext.php', 2729 params: ['js_api=1', 'hd=2', 'muted=1', `id=${id}`, `oid=${vkOID}`, hash && `hash=${hash}`, time && `t=${time}`], 2732 const config = videoTypeConfig[videoType]; 2733 if (!config) return ''; 2735 const { baseUrl, params: hashQueryArr, hashtag = '' } = config; 2737 hashQueryArr.push(videoParams); 2739 const hashQueryStr = hashQueryArr.filter(param => param).join('&'); 2740 const src = `${baseUrl}?${hashQueryStr}${hashtag}`; 2742 return createIframeHtml(src); 2745 * Создает и возвращает элемент iframe 2746 * @param {string} src - URL для iframe. 2747 * @param {Record<string, string>} [attrs] - Дополнительные атрибуты для iframe. 2748 * @returns {string} - Возвращает элемент iframe. 2750 function createIframeHtml(src, attrs) { 2751 const iframe = document.createElement('iframe'); 2753 iframe.classList.add('t-slds__frame'); 2754 iframe.width = '100%'; 2755 iframe.height = '100%'; 2756 iframe.frameBorder = '0'; 2757 iframe.allowFullscreen = true; 2758 // Поддержка разными браузерами 2759 iframe.setAttribute('mozallowfullscreen', 'true'); 2760 iframe.setAttribute('msallowfullscreen', 'true'); 2761 iframe.setAttribute('oallowfullscreen', 'true'); 2762 iframe.setAttribute('webkitallowfullscreen', 'true'); 2763 iframe.scrolling = 'no'; 2764 iframe.allow = 'clipboard-write; fullscreen; picture-in-picture; encrypted-media; gyroscope; accelerometer;'; 2766 // Применение всех атрибутов из объекта attrs 2767 for (let key in attrs) { 2768 if (attrs.hasOwnProperty(key)) { 2769 iframe.setAttribute(key, attrs[key]); 2772 return iframe.outerHTML; 2776function t_feed_drawPostPopupGallery(recid, opts, post) { 2777 var galleryItems = JSON.parse(post.mediadata); 2778 var galleryControl = typeof opts.gallery != 'undefined' ? opts.gallery.control : ''; 2779 var withArrowsClass = galleryControl !== 'dots' ? ' t-slds__witharrows' : ''; 2783 '<div class="t-slds" style="visibility: hidden;">' + 2784 '<div class="t-container t-slds__main">' + 2785 '<div class="t-slds__container t-width t-margin_auto">' + 2786 '<div class="t-slds__items-wrapper ' + 2788 '" data-slider-transition="" data-slider-with-cycle="true" data-slider-correct-height="true" data-auto-correct-mobile-width="false" aria-roledescription="carousel">'; 2789 galleryItems.forEach(function (item, i) { 2790 var activeClass = i == 0 ? ' t-slds__item_active' : ''; 2791 var zoomClass = opts.popup_opts.zoom ? ' t-zoomable' : ''; 2792 var zoomTarget = opts.popup_opts.zoom ? ' data-zoomable="yes" data-img-zoom-url="' + item.img + '"' : ''; 2795 '<div class="t-slds__item' + 2797 '" data-slide-index="' + 2799 ' role="group" aria-roledescription="slide" ' +