PageSourceSearch

https://www.online-pen.de/theme/1e07b970ba81850f9b94a1ce9e9f5e55/j…storefront.wishlist-widget.plugin.ef550b.js

js online-pen.de collected 2026-10-01 08:42:51 UTC 1,954 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[65560],{5560:(t,e,i)=>{i.r(e),i.d(e,{default:()=>n});var s=i(9568),r=i(4049);class n extends s.Z{init(){if(this._getWishlistStorage(),!this._wishlistStorage)throw Error("No wishlist storage found");this._renderCounter(),this._registerEvents(),this._wishlistStorage.load()}_getWishlistStorage(){this._wishlistStorage=window.PluginManager.getPluginInstanceFromElement(this.el,"WishlistStorage")}_renderCounter(){this.options.showCounter&&(this.el.innerHTML=this._wishlistStorage.getCurrentCounter()||"",this._updateLiveArea())}_updateLiveArea(){let t=this._getLiveArea();if(!t)return;let e=this._wishlistStorage.getCurrentCounter()||0,i=t.getAttribute(this.options.liveAreaTextAttribute)||"%counter%";t.innerHTML="<p>".concat(i.replace("%counter%",e),"</p>")}_getLiveArea(){return document.querySelector(this.options.liveAreaSelector)}_registerEvents(){this.$emitter.subscribe("Wishlist/onProductsLoaded",()=>{this._renderCounter(),window.PluginManager.getPluginInstances("AddToWishlist").forEach(t=>{t.initStateClasses()})}),this.$emitter.subscribe("Wishlist/onProductRemoved",t=>{this._renderCounter(),this._reInitWishlistButton(t.detail.productId)}),this.$emitter.subscribe("Wishlist/onProductAdded",t=>{this._renderCounter(),this._reInitWishlistButton(t.detail.productId)});let t=r.Z.querySelector(document,".cms-element-product-listing-wrapper",!1);t&&window.PluginManager.getPluginInstanceFromElement(t,"Listing").$emitter.subscribe("Listing/afterRenderResponse",()=>{window.PluginManager.getPluginInstances("AddToWishlist").forEach(t=>{t.initStateClasses()})})}_reInitWishlistButton(t){let e=r.Z.querySelectorAll(document,".product-wishlist-"+t,!1);e&&e.forEach(t=>{window.PluginManager.getPluginInstanceFromElement(t,"AddToWishlist").initStateClasses()})}}n.options={showCounter:!0,liveAreaSelector:"#wishlist-basket-live-area",liveAreaTextAttribute:"data-wishlist-live-area-text"}}}]);

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.