1 2 try { 3 if (window.eComEventTarget) { 4 window.eComEventTarget.addEventListener('cart:add', function (event) { 5 if (XMLHttpRequest) { 6 var xhr = new XMLHttpRequest(), 7 registerUrl = event.detail.cart.registerSessionUrl; 8 xhr.open('GET', registerUrl, true); 9 10 xhr.addEventListener('load', function () { 11 if (xhr.status > 200 || xhr.status >= 300) { 12 console.warn(xhr.statusText, xhr.responseText); 13 } 14 }); 15 16 xhr.send(); 17 } 18 }) 19 } 20} catch (ex) { 21 console.log(ex); 22} 23 24 try { 25 if (window.eComEventTarget) { 26 window.eComEventTarget.addEventListener('wishlist:add', function (event) { 27 if (XMLHttpRequest) { 28 var xhr = new XMLHttpRequest(), 29 product = event.detail.product, 30 targetUrl = 'https://www.regionale-spirituosen.de/epages/78067370.sf' + '?ViewAction=JSONViewResponse&ChangeAction=JSONAddItemToShoppingList', 31 data = { 32 'ProductGUID': product.productId, 33 'Quantity': product.quantity, 34 'LineItemGUID': event.detail.lineItemId, 35 'CustomizedText': product.customizedText, 36 'LocaleID': event.detail.locale 37 }; 38 39 xhr.open('POST', targetUrl, true); 40 xhr.setRequestHeader('Content-Type', 'application/json') 41 42 xhr.addEventListener('load', function () { 43 if (xhr.status < 200 || xhr.status >= 300) { 44 console.warn(xhr.statusText, xhr.responseText); 45 } else { 46 var response = JSON.parse(xhr.responseText) 47 48 49 if (response.success) { 50 window.eComEventTarget.dispatchEvent(new CustomEvent('wishlist:success-' + response.productId, { 'detail': response })); 51 window.eComEventTarget.dispatchEvent(new CustomEvent('wishlist:success-' + response.lineItemId, { 'detail': response })); 52 } else if (response.reason === 'nouser') { 53 window.eComEventTarget.dispatchEvent(new CustomEvent('wishlist:nouser-' + response.productId, { 'detail': response })); 54 window.eComEventTarget.dispatchEvent(new CustomEvent('wishlist:nouser-' + response.lineItemId, { 'detail': response })); 55 } else { 56 console.warn(xhr.statusText, xhr.responseText); 57 } 58 59 60 } 61 }); 62 xhr.send(JSON.stringify(data)); 63 } 64 }) 65 } 66} catch (ex) { 67 console.log(ex); 68} 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
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.