PageSourceSearch

https://www.zechsal.nl/static/version1790143659/frontend/Zechsal/d…/js/add-to-cart-observer.min.js

js zechsal.nl collected 2026-09-28 10:35:03 UTC 1,835 bytes, 7 lines download raw bytes

1require(['jquery','mage/translate','ko','matchMedia','Magento_Customer/js/customer-data'],function($,$t,ko,matchMedia){'use strict';const mediaBreakpoint='(max-width: 1024px)',minicartElement=$('[data-block="minicart"]'),minicartVisibleDuration=8000;let minicartEnabled=true,previousTimeout=null;mediaCheck({media:mediaBreakpoint,entry:()=>{minicartEnabled=false;},exit:()=>{minicartEnabled=true;}});const clearPreviousTimeout=timeout=>{if(timeout)clearTimeout(timeout);}
2const getAddedProductText=eventData=>{return eventData?.name?$t('You have added %1 to your shopping bag').replace('%1',eventData.name):$t('You have added the product to your shopping bag');}
3const removeSuccessMessage=()=>{const dropdownDialogElement=minicartElement.find('[data-role="dropdownDialog"]'),successMessageElement=dropdownDialogElement.find('.message.success');if(successMessageElement){successMessageElement.remove();}}
4const renderSuccessMessageHtml=message=>{const dropdownDialogElement=minicartElement.find('[data-role="dropdownDialog"]');if(dropdownDialogElement){dropdownDialogElement.prepend('<div class="message success"><p>'+message+'</p></div>');}}
5$(document).on('ajax:addToCart',(event,data)=>{const{response:{backUrl}}=data||null
6if(!minicartEnabled||backUrl)return;const dropdownDialogElement=minicartElement.find('[data-role="dropdownDialog"]');removeSuccessMessage();if(dropdownDialogElement?.dropdownDialog){renderSuccessMessageHtml(getAddedProductText(data));window.setTimeout(()=>{window.persistMiniCart=true
7dropdownDialogElement.dropdownDialog('open');},0);clearPreviousTimeout(previousTimeout);previousTimeout=window.setTimeout(()=>{dropdownDialogElement.dropdownDialog('close');},minicartVisibleDuration);}});minicartElement.on('dropdowndialogclose',function(){removeSuccessMessage();clearPreviousTimeout(previousTimeout);});});

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.