PageSourceSearch

https://www.harpercollins.de/cdn/shop/t/3/assets/template-product.js?v=15281204125986064261790787574

js harpercollins.de collected 2026-10-02 07:19:51 UTC 4,728 bytes, 2 lines download raw bytes

1var pdpMainSwiper=null,pdpSelectedVariant=null;const pdpGallery=document.getElementById("pdp-gallery-swiper"),pdpSwiperWrapper=document.getElementById("pdp-gallery-swiper-wrapper"),pdpGallerySlidesHTML=vhcDOMParser.parseFromString(pdpGallerySlidesRaw,"text/html"),pdpGalleryInitSlide=document.querySelector("#pdp-gallery-swiper .lcp-image"),pdpVariantPrice=document.getElementById("pdp-variant-price"),pdpDescription=document.getElementById("pdp-description"),pdpSubTitle=document.getElementById("pdp-subtitle"),pdpOptionInputs=document.querySelectorAll(".pdp-option__input"),pdpSpecsData=document.querySelectorAll(".pdp-spec__data[data-spec]"),pdpRetailerLinks=document.querySelectorAll("#pdp-retailers a"),pdpSamples=document.querySelectorAll(".pdp-sample"),pdpAudioButtons=document.querySelectorAll(".pdp-audio-button"),pdpB2L=document.getElementById("b2lbibletlayer_0"),pdpContributors=document.querySelectorAll(".pdp-contributor");function pdpSetSelectedVariant(){for(var selectedOptions=Array.from(pdpOptionInputs).filter(el=>el.checked).map(el=>el.value),variantSet=pdpVariants,x=0;x<pdpOptions.length;x++)variantSet=variantSet.filter(v=>v.options[x]==selectedOptions[x]);pdpSelectedVariant=variantSet[0]}function pdpGetActiveSlides(){const variantSlides=pdpGallerySlidesHTML.querySelectorAll(`[data-variant="${pdpSelectedVariant.id}"]`),allVariantsSlides=pdpGallerySlidesHTML.querySelectorAll('[data-variant="all"]');return Array.from(variantSlides).concat(Array.from(allVariantsSlides))}function pdpUpdateGallerySlides(slides,init=!1){init||pdpMainSwiper.removeAllSlides(),slides.forEach(sli
1de=>{init&&slide.id==pdpGalleryInitSlide.id||pdpMainSwiper.appendSlide(slide.outerHTML)}),pdpMainSwiper.update(),pdpMainSwiper.slideTo(0)}pdpSetSelectedVariant(),window.addEventListener("DOMContentLoaded",()=>{const initSlides=pdpGetActiveSlides();pdpMainSwiper=new Swiper("#pdp-gallery-swiper",{keyboard:!0,slidesPerView:1,observer:!0,observeParents:!0,observeSlideChildren:!0,navigation:{nextEl:"#pdp-gallery-swiper .swiper-button-next",prevEl:"#pdp-gallery-swiper .swiper-button-prev"},pagination:{el:"#pdp-gallery-swiper .swiper-pagination",clickable:!0}}),pdpUpdateGallerySlides(initSlides,!0),pdpAudioButtons.forEach(button=>{button.addEventListener("click",()=>{var audioEl=document.getElementById(button.getAttribute("aria-controls")),audioPlayer=audioEl.querySelector("audio"),audioPlayerSource=audioPlayer.querySelector("source");audioPlayerSource.src=audioPlayerSource.dataset.src,audioPlayer.load(),audioEl.classList.add("active"),audioPlayer.setAttribute("tabindex","0"),audioPlayer.focus(),button.setAttribute("tabindex","-1")})})});class VariantButtons extends HTMLElement{constructor(){super()}connectedCallback(){var self=this;self.radios=self.querySelectorAll('input[type="radio"]'),self.radios.forEach(input=>{input.addEventListener("change",event=>{self.onChange()})})}onChange(){pdpSetSelectedVariant(),pdpSelectedVariant&&(this.updateText(),this.updateGallery(),this.updateSpecs(),this.updateRetailers(),this.updateSamples(),this.updateContributors(),window.history.replaceState({},"",`${window.location.pathname}?variant=${pdpSelectedVariant.id}`),vhcAriaLive.textContent=pdpPageUpdated)}updateText(){pdpSubTitle.textContent=pdpSelectedVariant.subtitle,pdpSelectedVariant.description!=null?pdpDescription.innerHTML=pdpSelectedVariant.description:pdpDescription.innerHTML=pdpProductDescription}updateSpecs(){pdpVariantPrice.textContent=vhcPriceFormatter.format(pdpSelectedVariant.price/100),pdpSpecsData.forEach(td=>{const specProp=td.dataset.spec||"";if(specProp=="")return;const specData=pdpSelectedVariant[specProp],specRow=td.closest("tr");if(specProp=="download"){const link=td.getElementsByTagName("a")[0];link&&(link.outerHTML=specData)}else specData?(td.textContent=specData,specRow.classList.remove("hide")):(td.textContent="",specRow.classList.add("hide"))})}updateGallery(){const activeSlides=pdpGetActiveSlides();pdpUpdateGallerySlides(activeSlides)}updateSamples(){pdpSamples.forEach(el=>{const button=el.querySelector(".pdp-sample-button");el.dataset.variant==pdpSelectedVariant.id.toString()?(el.classList.remove("hide"),button.setAttribute("tabindex","0")):(el.classList.add("hide"),button.setAttribute("tabindex","-1"))})}updateRetailers(){pdpRetailerLinks.forEach(a=>{let url=a.dataset.url.replace("{{{ISBN}}}",pdpSelectedVariant.sku);a.href=url})}updateContributors(){const currentID=pdpSelectedVariant.id.toString();pdpContributors.forEach(el=>{el.dataset.variant==currentID?el.classList.remove("hide"):el.classList.add("hide")})}}customElements.define("variant-buttons",VariantButtons);
2//# sourceMappingURL=/cdn/shop/t/3/assets/template-product.js.map?v=15281204125986064261790787574

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.