PageSourceSearch

https://collegehill.com/cdn/shop/t/16/assets/product-to-cart.js?v=123859148794904615341729706966

js collegehill.com collected 2026-09-26 05:26:59 UTC 959 bytes, 2 lines download raw bytes

1const{Core,Events}=Global,CN_LOADING="!loading",ATTR_VARIANT_ID="variant-id";customElements.define("product-to-cart",class extends Core{elements={$:["to-cart-button"]};propTypes={"form-child":Boolean};render(){this.$({click:this._onClick}),this.sub(Events.CART_UPDATE,this._cartUpdateHandler,{global:!0}),this.sub(Events.CART_ERROR,this._cartUpdateHandler,{global:!0})}_onClick(e){!this.prop("form-child")&&e.preventDefault(),this.loading=!0,!this.prop("form-child")&&this.addToCart(this.cartItem)}addToCart(items){this.pub(Events.CART_ADD,{items})}_cartUpdateHandler(){setTimeout(()=>{this.loading=!1},1500)}get cartItem(){return[{id:this.variantId,quantity:1}]}set loading(state){this.$("to-cart-button").classList.toggle(CN_LOADING,state)}set variantId(id){this.setAttribute(ATTR_VARIANT_ID,id)}get variantId(){return+this.getAttribute(ATTR_VARIANT_ID)}});
2//# sourceMappingURL=/cdn/shop/t/16/assets/product-to-cart.js.map?v=123859148794904615341729706966

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.