1( function () { 2 function sync() { 3 if ( typeof window.wsftVisibilityCartSync === 'function' ) { 4 window.wsftVisibilityCartSync(); 5 } 6 } 7 8 function bindJquery() { 9 if ( ! window.jQuery ) { 10 return; 11 } 12 13 var $ = window.jQuery; 14 $( document.body ).on( 15 'edd_cart_item_added edd_cart_item_removed edd_quantity_updated edd_discount_applied edd_discount_removed edd_cart_emptied', 16 sync 17 ); 18 } 19 20 document.addEventListener( 'DOMContentLoaded', function () { 21 sync(); 22 bindJquery(); 23 } ); 24 25 // EDD may load jQuery after this file; retry briefly. 26 var tries = 0; 27 var timer = window.setInterval( function () { 28 tries += 1; 29 if ( window.jQuery || tries > 20 ) { 30 window.clearInterval( timer ); 31 bindJquery(); 32 } 33 }, 250 ); 34} )();
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.