PageSourceSearch

https://www.herbalgoodnessco.com/cdn/shop/t/94/assets/section.news…?v=177313225796357939811788882709

js herbalgoodnessco.com collected 2026-09-25 22:28:17 UTC 1,938 bytes, 2 lines download raw bytes

1import Modals from"module.modal";import{HTMLThemeElement}from"element.theme";import{setLocalStorage,getLocalStorage}from"util.storage";class NewsletterPopup extends HTMLThemeElement{constructor(){super(),this.storageKey="newsletter-"+this.sectionId}connectedCallback(){if(super.connectedCallback(),!this||window.location.pathname==="/challenge"||window.location.pathname==="/password")return;this.data={secondsBeforeShow:this.dataset.delaySeconds,daysBeforeReappear:this.dataset.delayDays,hasReminder:this.dataset.hasReminder,testMode:this.dataset.testMode},this.modal=new Modals("NewsletterPopup-"+this.sectionId,"newsletter-popup-modal",{trapFocus:!Shopify.designMode});const btn=this.querySelector(".popup-cta a");if(btn&&btn.addEventListener("click",()=>this.closePopup(!0)),(this.querySelector(".errors")||this.querySelector(".note--success"))&&this.modal.open(),this.querySelector(".note--success")){this.closePopup(!0);return}document.addEventListener("modalClose."+this.id,()=>this.closePopup()),this.checkAndInitPopup(),document.addEventListener("reminder:openNewsletter",()=>{this.modal.open()})}checkAndInitPopup(){!getLocalStorage(this.storageKey)&&!sessionStorage.getItem("popupShownThisSession")&&this.initPopupDelay()}onSectionSelect(){this.modal.open()}onSectionDeselect(){this.modal.close()}onBlockDeselect(){this.modal.close()}initPopupDelay(){this.data.testMode!=="true"&&setTimeout(()=>{this.modal.open(),sessionStorage.setItem("popupShownThisSession","true")},this.data.secondsBeforeShow*1e3)}closePopup(success){if(this.data.testMode==="true"){localStorage.removeItem(this.storageKey),sessionStorage.removeItem("popupShownThisSession");return}const expires=success?200:this.data.daysBeforeReappear;setLocalStorage(this.storageKey,"opened",expires)}}customElements.define("newsletter-popup",NewsletterPopup);
2//# sourceMappingURL=/cdn/shop/t/94/assets/section.newsletter-popup.js.map?v=177313225796357939811788882709

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.