PageSourceSearch

https://tecidoskite.com.br/wp-content/themes/tecidoskite/assets/js…?ver=e7e10faf67b54c017dd06f033c6fbca0

js tecidoskite.com.br collected 2026-10-05 03:41:40 UTC 1,460 bytes, 40 lines download raw bytes

1/**
2 * video-block.js — Lazy-load do iframe YouTube ao clicar no play
3 * Bloco: tecidoskite/videos
4 */
5( function () {
6	function bind( overlay, index ) {
7		const player     = overlay.closest( '.video-block__player' );
8		const videoSrc   = overlay.getAttribute( 'data-video-src' );
9		const videoTitle = overlay.getAttribute( 'data-video-title' ) || 'Vídeo';
10		if ( ! player || ! videoSrc ) return;
11
12		overlay.addEventListener( 'click', function () {
13			const iframe = document.createElement( 'iframe' );
14			iframe.src   = window.tecidoskiteYouTube.withJsApi( videoSrc );
15			iframe.id    = 'video-block-player-' + ( index + 1 );
16			iframe.title = 'Vídeo';
17			iframe.setAttribute( 'allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' );
18			iframe.setAttribute( 'allowfullscreen', '' );
19			iframe.referrerPolicy = 'strict-origin-when-cross-origin';
20			iframe.classList.add( 'video-block__iframe' );
21
22			player.innerHTML = '';
23			player.appendChild( iframe );
24
25			// O gatilho nativo de vídeo do GTM só reconhece youtube.com, e o embed
26			// é youtube-nocookie.com — os eventos vão para o dataLayer na mão.
27			window.tecidoskiteYouTube.trackVideo( iframe, videoTitle );
28		} );
29	}
30
31	function init() {
32		document.querySelectorAll( '.video-block__overlay' ).forEach( bind );
33	}
34
35	if ( document.readyState === 'loading' ) {
36		document.addEventListener( 'DOMContentLoaded', init );
37	} else {
38		init();
39	}
40} )();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.