PageSourceSearch

https://www.faber-castell.es/dist/FC.Ecom/modules/Coupons.198fe7d5.js

js faber-castell.es collected 2026-10-02 13:25:28 UTC 2,280 bytes, 1 lines download raw bytes

1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[7304],{83701:(t,o,e)=>{e.r(o),e.d(o,{default:()=>n});var r=e(65638);const n=new(function(){function t(t){var o=this;this.container=r(t),r(document).on("coupon:addCoupon",(function(){return o.addCoupon()})),r(document).on("coupon:removeCoupon",(function(){return o.removeCoupon()})),this.addCoupon(),this.removeCoupon()}return t.prototype.addCoupon=function(){var t=this;r(".coupon-field button").off("click").on("click",(function(o){o.preventDefault();var e=r(o.currentTarget).attr("data-request-url"),n=r(".coupon-field input").val();t.updateCoupon(n,e)}))},t.prototype.removeCoupon=function(){var t=this;r(".promo .remove-link").off("click").on("click",(function(o){o.preventDefault();var e="/"+r(o.currentTarget).attr("href")+"/",n=r(o.currentTarget).attr("data-coupon");t.updateCoupon(n,e)}))},t.prototype.updateCoupon=function(t,o){var e=this;if(""!=t){var n={cache:!1,type:"GET",url:""+this.getAjaxUrl(o+t),success:function(t){r("body").hasClass("order-summary")?window.location.reload():e.update(t)}};r.ajax(n).done(this.finishUpdatingCoupon)}},t.prototype.startLoader=function(){r(".checkout-page > .container").append('<div class="ajax-loader"></div>')},t.prototype.finishUpdatingCoupon=function(){r(".ajax-loader").remove(),r(document).trigger("coupon:addCoupon"),r(document).trigger("coupon:removeCoupon")},t.prototype.getAjaxUrl=function(t){return this.startLoader(),t+(t.indexOf("?")>=0?"&":"?")+"ajax_context="+window.location.pathname},t.prototype.update=function(t){this.updateCartTeasers(t),this.updateCartSummary(t),r(document).trigger("cart:initCartTeaser"),r(document).trigger("miniCart:updateCartWithoutOpening")},t.prototype.updateCartSummary=function(t){var o=r(t).find(".cart-summary").html();r(".checkout-page aside.right .cart-summary").html(o),this.ieFixRefreshFunction()},t.prototype.updateCartTeasers=function(t){var o=r(t).find(".cart-product-teasers").html();r(".checkout-page main .cart-product-teasers").html(o),this.ieFixRefreshFunction()},t.prototype.ieFixRefreshFunction=function(){var t="refreshElement";r(".checkout-page main .cart-product-teasers").addClass(t),r(".checkout-page main .cart-product-teasers").removeClass(t)},t}())(".cart-product-teasers")}}]);

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.