PageSourceSearch

https://a.sipoonsanomat.fi/styles/e5576057/js/blueconic/events.min.js

js sipoonsanomat.fi collected 2026-09-25 00:01:56 UTC 5,905 bytes, 1 lines download raw bytes

1function InitializeEventScript(u){let e=u.currentPage,t=u.pageType,i=u.dependenciesTimeout,n=!1;function w(e){try{var t=new URL(e,window.location.origin);return"https:"===t.protocol||"http:"===t.protocol}catch(e){}}function o(e){try{if(e&&"object"==typeof e&&("string"==typeof e.position&&e.position.length&&Array.isArray(e.recommendations)&&e.recommendations.length)){for(var t=document.querySelectorAll(e.position),i=u.recommendationsTitle||"Luitko jo nämä?",n=[],o=0;o<t.length;o++)t[o].classList.contains("diks-bc-container")&&!t[o].hasAttribute("data-bc-rendered")&&n.push(t[o]);if(n.length){for(var a=[],o=0;o<e.recommendations.length;o++){var r=e.recommendations[o];r&&"object"==typeof r&&"string"==typeof r.name&&r.name.length&&"string"==typeof r.trackingUrl&&w(r.trackingUrl)&&a.push(r)}if(a.length){for(var a=a.slice(0,u.recommendationsMaxItems||3),c=[],l=0;l<n.length;l++)c.push(((e,t)=>{var i=document.createElement("div"),n=document.createElement("h2"),o=(n.className="diks-title diks-title--section",n.textContent=t,i.appendChild(n),document.createElement("ul"));o.className="diks-article-list";for(var a=0;a<e.length;a++){var r=e[a],c=document.createElement("li"),l=(c.className="diks-article-list__item",document.createElement("article")),d=(l.className="diks-card diks-card--row diks-card--reversed diks-card--size-xs",document.createElement("div")),s=(d.className="diks-card__main-wrapper",r.customProperties&&r.customProperties.imagesquare&&r.customProperties.imagesquare.length?r.customProperties.imagesquare[0]:""),s=(s&&"string"==typeof s&&w(s)&&((p=document.createElement("div")).className="diks-card__image-wrapper",m=document.createElement("picture"),(u=document.createElement("img")).className="diks-card__image",u.src=s,u.alt="",u.loading="lazy",m.appendChild(u),p.appendChild(m),d.appendChild(p)),document.createElement("div")),u=(s.className="diks-card__text-wrapper",document.createElement("div")),m=(u.className="diks-card__text-inner-wrapper",document.createElement("h3")),p=(m.className="diks-card__title",document.createElement("a"));p.className="diks-card__link",p.href=r.trackingUrl,p.textContent=r.name,r.id&&"string"==typeof r.id&&p.setAttribute("data-bc-id",r.id),p.setAttribute("data-bc-position",a+1+"/"+e.length),m.appendChild(p),u.appendChild(m),s.appendChild(u),d.appendChild(s),l.appendChild(d),c.appendChild(l),o.appendChild(c)}return i.appendChild(o),i})(a,i));for(l=0;l<n.length;l++){for(n[l].innerHTML="";c[l].firstChild;)n[l].appendChild(c[l].firstChild);n[l].setAttribute("data-bc-rendered","true"),n[l].setAttribute("data-bc-element","recommendations"),n[l].setAttribute("data-bc-title",i
1),n[l].setAttribute("data-bc-location",n[l].closest("aside")?"right grid":"main");for(var d=n[l].querySelectorAll(".diks-card__link"),s=0;s<d.length;s++)((e,o)=>{e&&e.addEventListener("click",function(e){e.preventDefault();var t=this.href;t&&setTimeout(function(){window.location.href=t},200);try{var i=window.blueConicClient.getInteractions();if(Array.isArray(i)&&0<i.length)for(var n=0;n<i.length;n++)if(i[n].id===o){window.blueConicClient.createEvent("CLICK",o);break}}catch(e){}})})(d[s],e.variantId)}}}}}catch(e){console.error("BC: renderBCRecommendations failed")}}function a(){try{window.blueConicClient.createEvent("showInHouseAd")}catch(e){console.error("BC: showInHouseAd event failed")}}function r(){try{localStorage.getItem("bc_storage_test")}catch(e){return}let t="bc_last_activity";var e=localStorage.getItem(t),i=Date.now(),e=!e||18e5<i-Number(e);try{localStorage.setItem(t,i)}catch(e){return}if(e)try{let e=window.blueConicClient.profile.getProfile();var n=["mr_geo_zipcode"];e.loadValues(n,null,function(){u.sessionStartProperties.zipcode=e.getValue("mr_geo_zipcode")||"",e.timeline.createEvent("session_start",new Date,u.sessionStartProperties)})}catch(e){console.error("BC: session_start event failed")}let o=i;function a(){var e=Date.now();if(5e3<=e-o){o=e;try{localStorage.setItem(t,e)}catch(e){}}}["click","scroll","mousemove","keydown","touchstart"].forEach(function(e){document.addEventListener(e,a,{passive:!0})})}function c(){return void 0!==window.interstitialVisibleOnPageLoad&&void 0!==window.CMPVisibleOnPageLoad}function l(){return!1===window.interstitialVisibleOnPageLoad&&!1===window.CMPVisibleOnPageLoad}function d(){if(!n){n=!0;try{u.recommendationsEnabled&&window.blueConicClient.event.subscribe("recommendationsDialogue",this,function(e,t){o(t)})}catch(e){console.error("BC: recommendationsDialogue subscription failed")}try{if(u.inHouseAdEnabled&&"/"===e)if(c())l()&&a();else{let e=setTimeout(function(){void 0===window.interstitialVisibleOnPageLoad&&(window.interstitialVisibleOnPageLoad=!1),void 0===window.CMPVisibleOnPageLoad&&(window.CMPVisibleOnPageLoad=!1)},i),t=setInterval(function(){c()&&(clearTimeout(e),clearInterval(t),l())&&a()},500)}}catch(e){console.error("BC: showInHouseAd init failed")}try{if(u.articleViewEventEnabled&&u.articleViewProperties&&"article"===t)try{window.blueConicClient.profile.getProfile().timeline.createEvent("article_view",new Date,u.articleViewProperties)}catch(e){console.error("BC: article_view event failed")}}catch(e){console.error("BC: article_view init failed")}try{u.sessionStartEventEnabled&&u.sessionStartProperties&&r()}catch(e){console.error("BC: session init failed")}}}document.addEventListener("gravito:tcfv2:client",function(e){var t;e?.detail?.eventType&&void 0===window.CMPVisibleOnPageLoad&&(t=["opt-in:previously"],["consent-not-set","opt-in:previously:outdated"].includes(e.detail.eventType)?window.CMPVisibleOnPageLoad=!0:t.includes(e.detail.eventType)&&(window.CMPVisibleOnPageLoad=!1))},!0),void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe?d():window.addEventListener("onBlueConicLoaded",function(){window.blueConicClient.event.subscribe(window.blueConicClient.event.onEventReady,{},d)},!1)}

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.