1jQuery(function(){ 2 if (typeof pswp_ajax_url !== 'undefined') { 3 pswp_updateCart(); 4 } 5 if (typeof iFrameResize === 'function') { 6 iFrameResize({heightCalculationMethod: 'bodyOffset', checkOrigin: false}, '.pswp-iframe') 7 } 8}); 9 10function pswp_updateCart() 11{ 12 jQuery.ajax({ 13 type: 'POST', 14 url: pswp_ajax_url + '?rand=' + new Date().getTime(), 15 async: true, 16 cache: false, 17 dataType : "json", 18 xhrFields: { 19 withCredentials: true 20 }, 21 data: {getCart: 1, wp_domain: pswp_wp_domain}, 22 success: function(jsonData){ 23 if (jsonData) { 24 var text = jsonData.nb_products == 1 ? pswp_product_text_one : pswp_product_text_many; 25 text = jsonData.nb_products + ' ' + text; 26 if (jsonData.nb_products == 0) 27 text = pswp_cart_empty_text; 28 /*update cart:*/ 29 jQuery('.pswp-products-summ').text(text); 30 jQuery('.pswp-cart-link').attr('href', jsonData.cart_url); 31 /*update add to cart button:*/ 32 jQuery('.pswp-add-to-cart-form').attr('action', jsonData.cart_url); 33 jQuery('.pswp-add-to-cart-form .pswp-token').val(jsonData.token); 34 jQuery('.pswp-add-to-cart-wrp .pswp-token').val(jsonData.token); 35 } 36 } 37 }); 38} 39 40function pswp_hideLoader(elem) { 41 jQuery(elem).parent().addClass('loaded'); 42}
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.