PageSourceSearch

https://evjf.org/wp-content/cache/min/1/wp-content/plugins/shopify…/assets/js/shopify-modal.js?ver=1787139957

js evjf.org collected 2026-10-08 01:17:31 UTC 2,343 bytes, 5 lines download raw bytes

1document.addEventListener('DOMContentLoaded',function(){const originalAddEventListener=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(type,listener,options){originalAddEventListener.call(this,type,listener,options);if(type.toLowerCase().includes('shopify')){console.log(`🔵 Shopify Event Listener Added: ${type}`,{type:type,target:this,timestamp:new Date().toISOString()})}};const originalDispatchEvent=EventTarget.prototype.dispatchEvent;EventTarget.prototype.dispatchEvent=function(event){if(event.type.toLowerCase().includes('shopify')){console.log(`🔵 Shopify Event Dispatched: ${event.type}`,{event:event,detail:event.detail,target:event.target,currentTarget:event.currentTarget,timestamp:new Date().toISOString()})}
2return originalDispatchEvent.call(this,event)};document.body.addEventListener('shopify-update-data',function(event){console.log('🟢 shopify-update-data event received:',event);const UPDATE_DELAY=1000;const MAX_RETRIES=3;const RETRY_INTERVAL=500;const SUCCESS_THRESHOLD=0.8;const handleShopifyUpdateData=(eventData)=>{let selectedVariant=eventData?.product?.selectedOrFirstAvailableVariant||eventData?.selectedVariant;const variantSelector=document.querySelector('shopify-variant-selector');let selectedRadio=null;if(variantSelector&&variantSelector.shadowRoot){selectedRadio=variantSelector.shadowRoot.querySelector('[part*="radio-selected"]')}
3const isVariantDisabled=selectedRadio&&selectedRadio.getAttribute('part')?.includes('radio-disabled');const addToCartButton=document.querySelector('.product-modal__add-button');const buyNowButton=document.querySelector('.product-modal__buy-button');if(isVariantDisabled){if(addToCartButton){addToCartButton.disabled=!0;addToCartButton.textContent='Unavailable';addToCartButton.style.cursor='not-allowed'}
4if(buyNowButton){buyNowButton.disabled=!0;buyNowButton.textContent='Unavailable';buyNowButton.style.cursor='not-allowed'}}else{if(addToCartButton){addToCartButton.disabled=!1;addToCartButton.textContent='Add to cart';addToCartButton.style.cursor='pointer'}
5if(buyNowButton){buyNowButton.disabled=!1;buyNowButton.textContent='Buy now';buyNowButton.style.cursor='pointer'}}};handleShopifyUpdateData(event.detail||event)},!0);console.log('🔴 Ready to capture Shopify events. shopify-update-data listener is active on body.')})

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.