PageSourceSearch

https://www.bajkokraj.pl/wp-content/litespeed/js/a3ca036594300ff70e0b874664e300d3.js?ver=300d3

js bajkokraj.pl collected 2026-10-03 00:31:50 UTC 5,855 bytes, 24 lines download raw bytes

1(function(){'use strict';var cfg=window.POHADKA_ADS_CFG||{};function getCookie(name){var m=document.cookie.match('(^|;)\\s*'+name+'\\s*=\\s*([^;]+)');return m?m[2]:null}
2function setCookie(name,value,maxAgeSec){document.cookie=name+'='+value+';path=/;max-age='+maxAgeSec}
3function getSession(key){try{return sessionStorage.getItem(key)}catch(e){return null}}
4function setSession(key,value){try{sessionStorage.setItem(key,value)}catch(e){}}
5function scaleFixed(box){var w=parseFloat(box.getAttribute('data-w'));var h=parseFloat(box.getAttribute('data-h'));if(!w||!h)return;var frame=box.querySelector('.pohadka-ad__frame');var iframe=box.querySelector('iframe');if(!frame||!iframe)return;var cw=box.clientWidth;if(!cw)return;var maxScale=1;var maxH=Infinity;if(box.classList.contains('pohadka-ad--anchor')){var cfgMax=(cfg.anchor&&parseInt(cfg.anchor.max_height,10))||110;maxH=Math.min(cfgMax,Math.round(window.innerHeight*0.30))}else if(box.classList.contains('pohadka-ad--vignette')){if(!box.clientHeight)return;maxScale=2;maxH=box.clientHeight}
6var s=Math.min(maxScale,cw/w,maxH/h);var sw=w*s,sh=h*s;frame.style.width=sw+'px';frame.style.height=sh+'px';frame.style.marginLeft='auto';frame.style.marginRight='auto';iframe.style.width=w+'px';iframe.style.height=h+'px';iframe.style.maxWidth='none';iframe.style.transform='scale('+s+')'}
7function scaleAll(){var boxes=document.querySelectorAll('.pohadka-ad--fixed');for(var i=0;i<boxes.length;i++)scaleFixed(boxes[i]);}
8function initScaling(){scaleAll();window.addEventListener('resize',scaleAll);if('ResizeObserver' in window){var ro=new ResizeObserver(function(entries){for(var i=0;i<entries.length;i++)scaleFixed(entries[i].target);});var boxes=document.querySelectorAll('.pohadka-ad--fixed');for(var j=0;j<boxes.length;j++)ro.observe(boxes[j]);}}
9function initAnchor(){var anchor=document.querySelector('.pohadka-anchor');if(!anchor)return;var dismissible=anchor.getAttribute('data-dismissible')==='1';var forced=cfg.force==='anchor';if(!forced&&dismissible&&getCookie('pohadka_anchor_closed')==='1'){return}
10var delay=forced?0:(parseInt(cfg.anchor&&cfg.anchor.delay_ms,10)||0);setTimeout(function(){anchor.hidden=!1;scaleAll()},delay);var close=anchor.querySelector('.pohadka-anchor__close');if(close){var dismissH=parseInt(cfg.anchor&&cfg.anchor.dismiss_hours,10)||8;close.addEventListener('click',function(){anchor.hidden=!0;if(dismissible)setCookie('pohadka_anchor_closed','1',dismissH*3600);})}}
11function initVignette(){var vig=document.querySelector('.pohadka-vignette');if(!vig)return;var v=cfg.vignette||{};var forced=cfg.force==='vignette';var freqH=parseInt(v.frequency_hours||24,10);var minPV=parseInt(v.min_pageviews||1,10);function closeVig(){vig.hidden=!0}
12if(forced){vig.hidden=!1;scaleAll()}else{var pv=parseInt(localStorage.getItem('pohadka_pv')||'0',10)+1;localStorage.setItem('pohadka_pv',String(pv));var maxPerSession=parseInt(v.max_per_session||1,10)||1;var sessShown=parseInt(getSession('pohadka_vig_session')||'0',10);var last=parseInt(localStorage.getItem('pohadka_vignette_ts')||'0',10);var now=Date.now();var enoughTime=(now-last)>(freqH*3600*1000);var allowed=(pv>=minPV)&&(sessShown>0?sessShown<maxPerSession:enoughTime);if(allowed){setSession('pohadka_vig_session',String(sessShown+1));localStorage.setItem('pohadka_vignette_ts',String(now));localStorage.setItem('pohadka_pv','0');var vdelay=parseInt(v.delay_ms||0,10)||0;setTimeout(function(){vig.hidden=!1;scaleAll()},vdelay)}}
13var close=vig.querySelector('.pohadka-vignette__close');if(close)close.addEventListener('click',closeVig);vig.addEventListener('click',function(e){if(e.target===vig)closeVig();});document.addEventListener('keydown',function(e){if(e.key==='Escape'&&!vig.hidden)closeVig();})}
14function track(ev,box){if(!cfg.ajaxurl||!cfg.nonce||!box)return;var placement=box.getAttribute('data-placement');if(!placement)return;try{var fd=new FormData();fd.append('action','pohadka_ban_track');fd.append('_ajax_nonce',cfg.nonce);fd.append('event',ev);fd.append('placement',placement);fd.append('creative',box.getAttribute('data-creative')||'');fd.append('context',box.getAttribute('data-context')||'other');if(navigator.sendBeacon){navigator.sendBeacon(cfg.ajaxurl,fd)}else{fetch(cfg.ajaxurl,{method:'POST',body:fd,keepalive:!0,credentials:'same-origin'})}}catch(e){}}
15function initTracking(){var boxes=document.querySelectorAll('.pohadka-ad');if(!boxes.length)return;function fireView(box){if(box.__pkzViewed)return;box.__pkzViewed=!0;track('v',box)}
16if('IntersectionObserver' in window){var io=new IntersectionObserver(function(entries){for(var i=0;i<entries.length;i++){if(entries[i].isIntersecting&&entries[i].intersectionRatio>=0.5){fireView(entries[i].target);io.unobserve(entries[i].target)}}},{threshold:[0.5]});for(var a=0;a<boxes.length;a++)io.observe(boxes[a]);}else{for(var b=0;b<boxes.length;b++)fireView(boxes[b]);}
17for(var k=0;k<boxes.length;k++){(function(box){var iframe=box.querySelector('iframe');if(!iframe)return;function bind(){try{var doc=iframe.contentDocument;if(!doc)return;var link=doc.getElementById('click-area');if(!link||link.__pkzBound)return;link.__pkzBound=!0;link.addEventListener('click',function(){track('c',box)},!0)}catch(e){}}
18if(iframe.contentDocument&&iframe.contentDocument.readyState==='c
18omplete')bind();iframe.addEventListener('load',bind)})(boxes[k])}}
19function activateFrames(){var frames=document.querySelectorAll('iframe[data-pkz-src]');for(var i=0;i<frames.length;i++){frames[i].src=frames[i].getAttribute('data-pkz-src');frames[i].removeAttribute('data-pkz-src')}}
20function init(){if(cfg.random){if(window.PKZ_AD_SYSTEM!=='readmio')return;activateFrames()}
21initScaling();initAnchor();initVignette();initTracking()}
22if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',init)}else{init()}
23window.addEventListener('load',scaleAll)})()
24;

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.