PageSourceSearch

https://www.altroconsumo.it/~/resource/javascript/LocalItaly/Local…?v=552E7DB4FB632D217346719D310CF08D

js altroconsumo.it collected 2026-10-02 02:45:19 UTC 1,874 bytes, 1 lines download raw bytes

1window.EC=((e,t)=>(e.widget("LocalItaly.bookShopCartMiddleware",{options:{inputReference:".js-afterSitConfirm",shoppingCountV2:".js-shoppingCount",genericErrorMessageBasket:"Generic Error",basketWdg$:null,updateCartUrl:"",quantity:0},_bindEvents:function(){this.element.closest(".js-shoppingItem").on("click","[data-decrease], [data-increase], .js-shoppingRemove",this._handleCartUpdate.bind(this))},_create:function(){var t=e('[data-plugin="shoppingBasket"]');t.length?(this.options.basketWdg$=t.data("ec-shoppingBasket"),this.updateQuantity(),this._bindEvents()):console.error("Shopping basket widget not found")},_handleCartUpdate:function(t){t=e(t.currentTarget).data("update-cart");t&&this.updateCartSession(t)},_calculateDelta:function(t){switch(t){case"RemoveAll":return-this.options.quantity;case"AddOne":return 1;case"RemoveOne":return-1;default:return 0}},updateCartSession:function(t){let a=this,i=this._calculateDelta(t.cartOperation),o=e(this.options.shoppingCountV2);e.ajax({url:this.options.updateCartUrl,type:"POST",data:JSON.stringify(t),contentType:"application/json",dataType:"json"}).done(function(t){a.updateArticleCount()}).fail(function(t,e,n){a._revertQuantityChange(i),o.text(parseInt(o.text(),10)-i),console.error("Cart update failed:",n)})},updateQuantity:function(){this.options.quantity=parseInt(this.element.val(),10)},_revertQuantityChange:function(t){var e=parseInt(this.element.val(),10);this.element.val(e-t)},updateArticleCount:function(){this.updateQuantity(),this.element.parent().find(this.options.inputReference).val(this.options.quantity),this.options.basketWdg$&&"function"==typeof this.options.basketWdg$.changeQuantity?this.options.basketWdg$.changeQuantity(this.element.closest(".js-shoppingItem"),this.options.quantity):console.error("basketWdg$ V2 or changeQuantity method is not available")}}),t))(window.jQuery,window.EC||{});

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.