PageSourceSearch

https://thealphamen.nl/cdn/shop/t/225/assets/extenders-social-proof.js?v=113913771853655921201791025717

js thealphamen.nl collected 2026-10-08 20:43:17 UTC 2,839 bytes, 2 lines download raw bytes

1class SocialProof extends HTMLElement{constructor(){super(),this._onKey=this._onKey.bind(this),this.index=0}connectedCallback(){this.track=this.querySelector("[data-sp-track]"),this.cards=Array.from(this.querySelectorAll("[data-sp-card]")),this.lightbox=this.querySelector("[data-sp-lightbox]"),this.video=this.querySelector("[data-sp-video]"),this.placeholder=this.querySelector("[data-sp-ph]"),this.capText=this.querySelector("[data-sp-cap]"),this.capName=this.querySelector("[data-sp-name]");const prev=this.querySelector("[data-sp-prev]"),next=this.querySelector("[data-sp-next]");if(prev&&prev.addEventListener("click",()=>this._scroll(-1)),next&&next.addEventListener("click",()=>this._scroll(1)),this.cards.forEach((card,i)=>card.addEventListener("click",()=>this.open(i))),this.lightbox){const close=this.querySelector("[data-sp-close]"),lbPrev=this.querySelector("[data-sp-lbprev]"),lbNext=this.querySelector("[data-sp-lbnext]");close&&close.addEventListener("click",()=>this.close()),lbPrev&&lbPrev.addEventListener("click",()=>this.go(-1)),lbNext&&lbNext.addEventListener("click",()=>this.go(1)),this.lightbox.addEventListener("click",e=>{e.target===this.lightbox&&this.close()})}}_scroll(dir){if(!this.track)return;const amount=Math.max(300,Math.round(this.track.clientWidth*.85));this.track.scrollBy({left:dir*amount,behavior:"smooth"})}open(i){!this.lightbox||!this.cards.length||(this.index=i,this._populate(),this.lightbox.hidden=!1,document.body.style.overflow="hidden",document.addEventListener("keydown",this._onKey))}close(){this.lightbox&&(this.lightbox.hidden=!0,document.body.style.overflow="",document.removeEventListener("keydown",this._onKey),this._stopVideo())}go(dir){const n=this.cards.length;n&&(this.index=(this.index+dir+n)%n,this._populate())}_stopVideo(){this.video&&(this.video.pause(),this.video.removeAttribute("src"),this.video.load())}_populate(){const card=this.cards[this.index];if(!card)return;const src=card.getAttribute("data-src")||"";if(this._stopVideo(),src&&this.video){const poster=card.getAttribute("data-poster")||"";poster?this.video.poster=poster:this.video.removeAttribute("poster"),this.video.src=src,this.video.hidden=!1,this.placeholder&&(this.placeholder.hidden=!0);const p=this.video.play();p&&typeof p.catch=="function"&&p.catch(()=>{})}else this.video&&(this.video.hidden=!0),this.placeholder&&(this.placeholder.hidden=!1);this.capText&&(this.capText.textContent=card.getAttribute("data-caption")||""),this.capName&&(this.capName.textContent=card.getAttribute("data-name")||"")}_onKey(e){e.key==="Escape"?this.close():e.key==="ArrowLeft"?this.go(-1):e.key==="ArrowRight"&&this.go(1)}}customElements.get("social-proof")||customElements.define("social-proof",SocialProof);
2//# sourceMappingURL=/cdn/shop/t/225/assets/extenders-social-proof.js.map?v=113913771853655921201791025717

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.