PageSourceSearch

https://vimergy.com/cdn/shop/t/627/assets/notify-me.js?v=54148251930457291011790204800

js vimergy.com collected 2026-09-25 20:33:53 UTC 1,895 bytes, 1 lines download raw bytes

1if(!customElements.get("notify-me")){class e extends HTMLElement{constructor(){super(),this.form=this.querySelector("#stock-subscription-form"),this.apiKey=this.form.querySelector("#klaviyo-api-key"),this.messageHolder=this.querySelector("#response-msg"),this.closeBtn=this.querySelector("#notify-me-close-btn"),this.form.addEventListener("submit",this.onFormSubmit.bind(this))}onFormSubmit(e){e.preventDefault();const t=this.form.querySelector("#email"),s=document.querySelector('[data-oos-id]:not([data-oos-id=""])'),o=s?.dataset.oosId,r={data:{type:"back-in-stock-subscription",attributes:{profile:{data:{type:"profile",attributes:{email:`${t.value}`}}},channels:["EMAIL"]},relationships:{variant:{data:{type:"catalog-variant",id:`$shopify:::$default:::${o}`}}}}};var a={method:"POST",headers:{"Content-Type":"application/json",REVISION:this.getCurrentDate()},body:JSON.stringify(r)};fetch(`https://a.klaviyo.com/client/back-in-stock-subscriptions/?company_id=${this.apiKey.value}`,a).then(e=>{202===e.status?(t.value="",this.showSuccessMessage("Thank you for subscribing!")):this.showErrorMessage("An error occurred. Please try again.")}).catch(e=>{console.log("error",e),this.showErrorMessage("An error occurred. Please try again.")})}getCurrentDate(){const e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}showSuccessMessage(e){this.messageHolder.textContent=e,this.messageHolder.classList.add("tw-text-green"),setTimeout(()=>{this.messageHolder.textContent="",this.closeDrawer()},2e3)}showErrorMessage(e){this.messageHolder.textContent=e,this.messageHolder.classList.add("tw-text-red"),this.messageHolder.classList.remove("tw-text-green"),setTimeout(()=>{this.messageHolder.textContent=""},5e3)}closeDrawer(){const e=new Event("click");this.closeBtn.dispatchEvent(e,{bubbles:!1})}}customElements.define("notify-me",e)}

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.