PageSourceSearch

https://carbonogaleria.com.br/cdn/shop/t/59/assets/contact-options-modal.js?v=169060542157373019471759683721

js carbonogaleria.com.br collected 2026-10-02 16:29:39 UTC 3,203 bytes, 2 lines download raw bytes

1const shareButtons=document.querySelectorAll(".share-button__button_link");let linkCard="";shareButtons.forEach(button=>{button.addEventListener("click",()=>{const listItem=button.closest("li"),dataUrl=listItem?listItem.getAttribute("data-url"):"";linkCard=dataUrl,publish(PUB_SUB_EVENTS.openCopyModal,{url:dataUrl}),window.location.pathname.includes("/products/")||document.querySelectorAll("copy-options-modal [data-whatsapp-link]").forEach(linkElement=>{let link=linkElement.getAttribute("href");if(link){if(link.includes("mailto:")){const mailtoBodyIndex=link.indexOf("body=")+5,updatedLink=link.slice(0,mailtoBodyIndex)+linkCard;linkElement.setAttribute("href",updatedLink)}else if(link.includes("https://api.whatsapp.com")){const secondHttpIndex=link.indexOf("http",link.indexOf("http")+1);if(secondHttpIndex!==-1){const updatedLink=link.slice(0,secondHttpIndex)+linkCard;linkElement.setAttribute("href",updatedLink)}}}})})}),PUB_SUB_EVENTS.openCopyModal||(PUB_SUB_EVENTS.openCopyModal="openCopyModal"),PUB_SUB_EVENTS.closeCopyModal||(PUB_SUB_EVENTS.closeCopyModal="closeCopyModal"),PUB_SUB_EVENTS.openContactModal||(PUB_SUB_EVENTS.openContactModal="openContactModal"),PUB_SUB_EVENTS.closeContactModal||(PUB_SUB_EVENTS.closeContactModal="closeContactModal"),PUB_SUB_EVENTS.copyLink||(PUB_SUB_EVENTS.copyLink="copyLink"),customElements.get("contact-options-modal")||customElements.define("contact-options-modal",class extends HTMLElement{constructor(){super(),subscribe(PUB_SUB_EVENTS.openContactModal,this.openModal.bind(this)),subscribe(PUB_SUB_EVENTS.closeContactModal,this.closeModal.bind(this))}openModal(){this.classList.add("is-open")}closeModal(){this.classList.remove("is-open")}}),customElements.get("copy-options-modal")||customElements.define("copy-options-modal",class extends HTMLElement{constructor(){super(),subscribe(PUB_SUB_EVENTS.openCopyModal,this.openModal.bind(this)),subscribe(PUB_SUB_EVENTS.closeCopyModal,this.closeModal.bind(this)),subscribe(PUB_SUB_EVENTS.copyLink,event=>{const button=document.querySelector(".copy-button");let link="";const dataUrl=event.url;window.location.pathname.includes("/products/")?link=button?button.getAttribute("data-href"):"":link=linkCard||"",link?navigator.clipboard.writeText(link).then(()=>{button.classList.add("copied"),setTimeout(()=>{button.classList.remove("copied")},2e3)}).catch(err=>{console.error("Erro ao copiar o link: ",err)}):console.error("Link n\xE3o encontrado.")})}openModal(){this.classList.add("is-open")}closeModal(){this.classList.remove("is-open")}});const closeButtonCopy=document.querySelector(".close-button__copy_modal");closeButtonCopy&&closeButtonCopy.addEventListener("click",()=>{publish(PUB_SUB_EVENTS.closeCopyModal,{})});const contactButton=document.querySelector(".contact-button__button_link");contactButton&&contactButton.addEventListener("click",()=>{publish(PUB_SUB_EVENTS.openContactModal,{})});const closeButtonContact=document.querySelector(".close-button__contact_modal");closeButtonContact&&closeButtonContact.addEventListener("click",()=>{publish(PUB_SUB_EVENTS.closeContactModal,{})});
2//# sourceMappingURL=/cdn/shop/t/59/assets/contact-options-modal.js.map?v=169060542157373019471759683721

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.