PageSourceSearch

https://snews.cz/wp-content/cache/autoptimize/js/autoptimize_singl…87ebde308bb3f9d1b7f607766.js?ver=1777803404

js snews.cz collected 2026-10-07 03:24:01 UTC 4,612 bytes, 30 lines download raw bytes

1(function(){'use strict';function observeCards(cards){if(!('IntersectionObserver'in window)){cards.forEach(function(c){c.classList.add('is-visible');});return;}
2var io=new IntersectionObserver(function(entries,obs){entries.forEach(function(entry){if(entry.isIntersecting){entry.target.classList.add('is-visible');obs.unobserve(entry.target);}});},{rootMargin:'100px 0px',threshold:0.05});cards.forEach(function(c){io.observe(c);});}
3var grid=document.querySelector('.snews-cat-videos__grid--lazy');if(grid){observeCards(Array.prototype.slice.call(grid.querySelectorAll('.snews-cat-videos__card')));}
4var sentinel=document.querySelector('.snews-cat-videos__sentinel');if(!grid||!sentinel||!('IntersectionObserver'in window))return;var cfg=window.snewsLysaVideos||{restUrl:(window.location.origin||'')+'/wp-json/wp/v2/posts',cat:'31',perPage:'18'};var loading=false;var exhausted=false;var page=1;var scrollIO=new IntersectionObserver(function(entries){if(!entries[0].isIntersecting||loading||exhausted)return;loading=true;page++;var url=cfg.restUrl
5+'?categories='+cfg.cat
6+'&per_page='+cfg.perPage
7+'&page='+page
8+'&_fields=id,title,link,excerpt,date,format,meta,_links,_embedded'
9+'&_embed=author,wp:featuredmedia';fetch(url).then(function(r){var total=parseInt(r.headers.get('X-WP-TotalPages')||'1',10);if(page>=total||r.status===400)exhausted=true;if(!r.ok)throw new Error('HTTP '+r.status);return r.json();}).then(function(posts){if(!posts||!posts.length){exhausted=true;loading=false;return;}
10var newCards=[];var FB_BADGE_SVG='<svg viewBox="0 0 24 24" width="14" height="14" fill="#fff" aria-hidden="true"><path d="M12 2C6.48 2 2 6.48 2 12c0 5 3.66 9.13 8.44 9.88v-6.99H7.9V12h2.54V9.8c0-2.51 1.49-3.89 3.78-3.89 1.09 0 2.24.19 2.24.19v2.47h-1.26c-1.24 0-1.63.77-1.63 1.56V12h2.78l-.45 2.89h-2.33v6.99C18.34 21.13 22 17 22 12c0-5.52-4.48-10-10-10z"/></svg>';function escAttr(s){return String(s||'').replace(/[&<>"']/g,function(c){return{'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c];});}
11posts.forEach(function(post){var thumb='';try{thumb=post._embedded['wp:featuredmedia'][0].source_url;}catch(e){}
12var author='';try{author=post._embedded.author[0].name;}catch(e){}
13var date=post.date?post.date.substring(0,10).split('-').reverse().join('.'):'';var excerpt=(post.excerpt&&post.excerpt.rendered)?post.excerpt.rendered.replace(/<[^>]+>/g,'').trim():'';var isVideo=(post.format==='video');var fbName=(post.meta&&post.meta._snews_fb_source_name)||'';var fbUrl=(post.meta&&post.meta._snews_fb_video_url)||'';var isFb=!!fbUrl;var thumbHtml='';if(isFb){var iframeSrc='https://www.facebook.com/plugins/video.php?href='+encodeURIComponent(fbUrl)+'&show_text=false&autoplay=false&width=560';thumbHtml='<div class="snews-cat-videos__card-fbembed" data-iframe-src="'+escAttr(iframeSrc)+'">'
14+'<div class="snews-cat-videos__card-fbplaceholder"></div>'
15+'<div class="snews-cat-videos__card-fbspinner" aria-hidden="true"></div>'
16+'</div>';}else if(thumb){thumbHtml='<img src="'+thumb+'" alt="" loading="lazy" decoding="async">';}
17var playHtml=isVideo?'<div class="snews-cat-videos__card-play"></div>':'';var fbBadge=isFb?'<span class="snews-cat-videos__card-fbbadge" title="Video z Facebooku — '+escAttr(fbName)+'">'+FB_BADGE_SVG+'</span>':'';var card=document.createElement('a');card.href=post.link;card.className='snews-cat-videos__card'+(isFb?' snews-cat-videos__card--fb':'');card.innerHTML='<div class="snews-cat-videos__card-thumb">'
18+thumbHtml+playHtml+fbBadge
19+'</div>'
20+'<div class="snews-cat-videos__card-body">'
21+'<h3 class="snews-cat-videos__card-title"></h3>'
22+'<div class="snews-cat-videos__card-meta">'
23+(author?'<span class="snews-cat-videos__card-author"></span>'
24+'<span class="snews-cat-videos__card-sep"> - </span>':'')
25+'<span class="snews-cat-videos__card-date"></span>'
26+'</div>'
27+(excerpt?'<p class="snews-cat-videos__card-excerpt"></p>':'')
28+'</div>';var titleEl=card.querySelector('.snews-cat-videos__card-title');if(titleEl)titleEl.textContent=(post.title.rendered||'').replace(/<[^>]+>/g,'');if(author){var authorEl=card.querySelector('.snews-cat-videos__card-author');if(authorEl)authorEl.textContent=author;}
29var dateEl=card.querySelector('.snews-cat-videos__card-date');if(dateEl)dateEl.textContent=date;if(excerpt){var exEl=card.querySelector('.snews-cat-videos__card-excerpt');if(exEl)exEl.textContent=excerpt;}
30grid.insertBefore(card,sentinel);newCards.push(card);});observeCards(newCards);document.dispatchEvent(new CustomEvent('snews:fb-embeds:rescan'));loading=false;}).catch(function(){loading=false;});},{rootMargin:'300px 0px'});scrollIO.observe(sentinel);}());

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.