PageSourceSearch

https://www.schoolyardsnacks.com/cdn/shop/t/7/assets/dbtfy-product-sharing.js?v=161638888154715768311779012127

js schoolyardsnacks.com collected 2026-10-03 21:00:22 UTC 3,490 bytes, 1 lines download raw bytes

1customElements.get("dbtfy-product-sharing")||customElements.define("dbtfy-product-sharing",class extends HTMLElement{connectedCallback(){this.init()}init(){const t=document.querySelector(".dbtfy-product-sharing-block");if(!t)return;const e=this.querySelector("[data-product-sharing-product]");if(!e)return;this.data=Debutify.widgets.product_sharing,this.product=JSON.parse(e.innerHTML),this.collections=JSON.parse(this.querySelector("[data-product-sharing-collection]").innerHTML),this.visibleBreaks=[];if(!this.getVisibleBreaks())return void this.remove();if(this.innerHTML=Debutify.replaceVariables(t.innerHTML,{share_permalink:this.dataset.sharePermalink,share_image:this.dataset.shareImage,share_title:this.dataset.shareTitle,share_description:this.dataset.shareDescription,share_content:this.dataset.shareContent,share_title_escaped:this.dataset.shareTitleEscaped,share_description_escaped:this.dataset.shareDescriptionEscaped,share_content_escaped:this.dataset.shareContentEscaped}),this.classList.remove("hidden"),this.button=this.querySelector(".social-sharing-button-icon"),this.icon=this.querySelector(".social-sharing-icons"),this.copy_link=this.querySelector(".copy_link"),this.copy_link.addEventListener("click",this.copyLink.bind(this)),!this.button||!this.icon)return;window.innerWidth<=768?this.modalshow():this.handleTooltip()}copyLink(t){return t.preventDefault(),t.stopPropagation(),navigator.clipboard.writeText(this.href),new Debutify.toast('<p class="'+this.dataset.classes+'">Link Copied..!</p>',{position:"bottom-center",duration:"5000",colorScheme:""}),!1}getVisibleBreaks(){const t=this.collections.map(t=>t.handle),e=this.data[0];switch(e.visibility){case"collection":return t.includes(e.collection);case"type":return""!==this.product.type&&e.types.toLowerCase().includes(this.product.type.toLowerCase());case"tag":return this.product.tags.some(t=>e.tags.toLowerCase().includes(t.toLowerCase()));case"product":return e.product===this.product.handle;case"all":return!0;default:return!1}}handleTooltip(){const{computePosition:t,offset:e,flip:s}=window.FloatingUIDOM,i=()=>{t(this.button,this.icon,{placement:"top-start",middleware:[e(10),s()]}).then(({x:t,y:e})=>{Object.assign(this.icon.style,{position:"absolute",left:`${t}px`,top:`${e}px`})})},o=()=>{this.icon.classList.add("show"),document.body.classList.add("dbtfy-product-sharing-tooltip"),i()},a=()=>{setTimeout(()=>{this.icon.classList.remove("show"),this.icon.classList.add("hiding"),setTimeout(()=>{this.icon.classList.remove("hiding")},200),document.body.classList.remove("dbtfy-product-sharing-tooltip")},100)};this._listeners=[];const n=t=>{t.forEach(([t,e])=>{this.button.addEventListener(t,e),this._listeners.push([t,e])})};window.matchMedia("(pointer: coarse)").matches?n([["mouseenter",o],["mouseleave",a],["focus",o],["blur",a]]):n([["focus",o],["blur",a]])}modalshow(){const t=document.createElement("div");t.classList.add("dbtfy-product-sharing-wrapper"),this.icon.parentNode.insertBefore(t,this.icon),t.appendChild(this.icon);const e=document.createElement("div");e.classList.add("dbtfy-social-sharing","display_button"),this.icon.parentNode.insertBefore(e,this.icon),e.appendChild(this.icon),document.addEventListener("DOMContentLoaded",()=>{this.modal=new Debutify.modal({closeMethods:["overlay","button","escape"],size:"medium",closeIcon:"close",selector:"dbtfy-product-sharing .dbtfy-product-sharing-wrapper ",boxClass:[],overlayClass:[]})}),this.button.onclick=()=>{this.modal.open()}}});

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.