PageSourceSearch

https://www.prospektmaschine.de/js/joined/bub.min.js?t=bbcfbaca8d583347be70632f1af1ee69

js prospektmaschine.de collected 2026-09-25 23:35:26 UTC 8,431 bytes, 1 lines download raw bytes

1class BrochureUnderBrochure extends PromoElement{constructor(e,t,r,n,i={}){super(r,n),this.key="brochure_under_brochure",this.tracking=new PromoElementTracking,this.promoElement=null,this.promoBoost=null,this.actualPage=e,this.lastPage=t,this.shopId=r,this.shopCategoryId=n,this.showOnPages=i.showOnPages||[2,3],this.promoDataInstance=new PromoElementData,this.initialUrl=window.location.href,this.initialPathName=window.location.pathname,this.initialTitle=document.title,this.targetElementId="promoElementsBrochureUnderBrochure",this.sendedTracking=!1,this.sendedClick=!1,this.checkElementInterval=500,this.maxWaitTime=8e3,this.textTitle=bubText,this.textOpenBtn=bubTextOpen,this.color="#0050AA",this.init()}async init(){try{if(this.targetElement=await this.waitForElement(this.targetElementId,this.maxWaitTime),this.targetElement){if(this.clearTargetElement(),checkIsRobot())return;if(this.promoBoost=await this.getPromoBoost(this.key),!this.promoBoost)return;this.shouldDisplayPromo()?(this.promoElement=await this.getPromoElement(this.promoBoost,(e=>!1===e.is_interactive)),this.setColorFromHeader(),this.promoElement?(this.promoElementId=this.promoElement.brochure_id,this.targetUrl=this.promoElement.url,this.createTitle(),this.createContainer(),await this.addImages(),this.promoElement?.partner_data?setTimeout((()=>{this.setupChangeUrlObserver()}),500):(this.showBrochure(),setTimeout((()=>{this.setupChangeUrlObserver()}),500),this.setupCurrentImageObserver())):this.removeElementAndListeners()):this.removeElementAndListeners()}else console.warn(`Element with ID ${this.targetElementId} not found within the maximum wait time.`)}catch(e){console.error("Error initializing PromoElementsBrochureUnderBrochure:",e),this.removeElementAndListeners()}}clearTargetElement(){this.targetElement&&(this.previewObserver?.disconnect(),this.imageObserver?.disconnect(),this.changeUrlObserver?.disconnect(),this.targetElement.innerHTML="")}setColorFromHeader(){const e=document.querySelector("header"),t=getComputedStyle(e);this.color=t.backgroundColor}waitForElement(e,t){return new Promise((r=>{let n=0;const i=setInterval((()=>{const s=document.getElementById(e);s?(clearInterval(i),r(s)):n>=t&&(clearInterval(i),r(null)),n+=this.checkElementInterval}),this.checkElementInterval)}))}shouldDisplayPromo(){return this.showOnPages.includes(this.actualPage)&&this.actualPage<=this.lastPage}createTitle(){this.targetElement&&this.targetElement.insertAdjacentHTML("beforeend",`\n             <div class="bub-upperTitle">\n                <object style="width: 20px; height: 20px;" data="/img/icons/Fire.svg" type="image/svg+xml" ></object>\n                <span>${this.textTitle}</span>\n            </div>\n            <h2>${this.promoElement.h1}</h2>\n            <div class="bub-upperTitle--date">${this.promoElement.date}</div>\n        `)}createContainer(){this.targetElement&&this.targetElement.insertAdjacentHTML("beforeend",'\n                <div id="bub-container" class="bub-container">\n                    <div class="bub-container-inner"></div>\n                </div>\n            ')}async createPreviewBrochure(){document.querySelector(".bub-container-inner")&&(document.querySelector(".bub-container-inner").insertAdjacentHTML("beforeend",`\n            <div class="bub-preview-brochure">\n                <div style="flex: 1;">\n                    <div id="bub-preview" style="min-height: 1px; min-width: 1px;">\n                        <img class="bub-preview-brochure--thumbnail" src="${this.promoElement.leaflet_preview}" alt="Brochure" title="Brochure">\n                    </div>\n                </div>\n                <div style="flex: 1;">\n                    <div class="bub-preview-brochure--logo-text">\n                        <img class="bub-preview-brochure--logo" src="${this.promoElement.shop_logo}" alt="Logo" title="logo">\n                    \n                        <div style="display: flex; flex-direction: column;">\n                            <span class="bub-preview-brochure--thumbname">${this.promoElement.brochure_thumb_name}</span>
1\n                            <span style="white-space: nowrap;">${this.promoElement.date_short}</span>\n                        </div>\n                    </div>\n                   <div class="loader-container">\n                        <div class="loader" style="background-color: ${this.color};"></div>\n                    </div>\n                    <span class="btn-bub-open" style="background-color: ${this.color};">${this.textOpenBtn}</span>\n                </div>\n            </div>\n        `),this.addOpenButtonListener(),setTimeout((()=>this.animateAndReplacePreview()),3e3))}addOpenButtonListener(){const e=document.querySelector(".btn-bub-open");e&&e.addEventListener("click",(()=>{this.animateAndReplacePreview()}))}async animateAndReplacePreview(){this.hidePreview(),this.showBrochure(),this.setupChangeUrlObserver(),this.setupCurrentImageObserver()}hidePreview(){const e=document.querySelector(".bub-preview-brochure");e&&e.classList.add("hide-animated")}showBrochure(){const e=document.querySelector(".bub-brochure");e&&e.classList.add("show-animated")}async setupPreviewObserver(){if(document.getElementById("bub-container")){const e=(e,t)=>{e.forEach((e=>{e.isIntersecting&&(t.unobserve(e.target),this.promoElement?.partner_data&&this.createPreviewBrochure(),sendPromoElementImpression(this.promoElement))}))};this.previewObserver=new IntersectionObserver(e,{root:null,threshold:.1}),this.previewObserver.observe(document.getElementById("bub-container"))}else await this.addImages(),this.showBrochure(),this.setupChangeUrlObserver(),this.setupCurrentImageObserver()}async addImages(){try{const e=await fetch(`ajax/get-brochures-page/?id=${this.promoElementId}`,{method:"GET",credentials:"omit",headers:{"Content-Type":"application/json","Cache-Control":"max-age=3600, stale-while-revalidate=18000"}}),t=await e.json();this.renderImages(t.data.brochureMeta),this.trackerData=t.data.trackerData}catch(e){console.error("Error fetching data:",e)}}renderImages(e){document.querySelector(".bub-brochure")||document.querySelector(".bub-container-inner").insertAdjacentHTML("beforeend",'\n                <div class="bub-brochure"></div>\n            '),e.forEach(((e,t)=>{let r=t+1;document.querySelector(".bub-brochure").insertAdjacentHTML("beforeend",`\n                <div class="image-container" data-page="${r}">\n                    <svg class="placeholder" viewBox="0 0 ${e.width} ${e.height}"></svg>\n                    <img class="lazyload" data-src="${e.image}" alt="Brochure">\n                </div>\n            `)})),initLazyLoad()}setupChangeUrlObserver(){this.changeUrlObserver=new IntersectionObserver((e=>{e.forEach((e=>{e.intersectionRatio>=.3?(this.changeUrlAndTitle(this.targetUrl,this.textTitle),brochureTimeSpentManager.updateBubTimeSpent(this.promoElement,"down"),this.sendedTracking||(sendLeafletToTrackerPromo(this.trackerData),this.sendedTracking=!0)):0===e.intersectionRatio&&e.boundingClientRect.top>0&&this.initialPathName!==window.location.pathname&&(this.changeUrlAndTitle(this.initialUrl,this.initialTitle),PromoElementHistoryStorage.addItem(this.promoElement.brochure_id,this.key),brochureTimeSpentManager.updateBubTimeSpent(this.promoElement,"up"))}))}),{root:null,threshold:[0,.3]}),this.changeUrlObserver.observe(document.querySelector("#promoElementsBrochureUnderBrochure .image-container"))}changeUrlAndTitle(e,t){history.pushState(null,"",e),document.title=t}setupCurrentImageObserver(){this.imageObserver=new IntersectionObserver((e=>{let t=null;e.forEach((e=>{e.isIntersecting&&(clearTimeout(t),t=setTimeout((()=>{const t=e.target.getAttribute("data-page");this.sendedClick||1!=t||(sendPromoElementClick(this.promoElement),this.sendedClick=!0),this.sendTrackGaPageShow(t,this.promoElement.brochure_id),sendPromoElementPageView(this.promoElement,t)}),500))}))}),{root:null,threshold:.5}),document.querySelectorAll("#promoElementsBrochureUnderBrochure .image-container").forEach((e=>this.imageObserver.observe(e)))}removeElementAndListeners(){this.previewObserver?.disconnect(),this.imageObserver?.disconnect(),this.changeUrlObserver?.disconnect(),this.targetElement&&(this.targetElement.innerHTML="")}sendTrackGaPageShow(e,t){let r={event:"ga4.leaflet_promo_page_show",event_data:{placement:"under_"+this.actualPage+"nd_page",page:e,clickLeafletId:t}};this.tracking.sendDataLayerTracking(r)}}

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.