1(function($) { 2 3 $().on('facetwp-refresh', function() { 4 if (! FWP.loaded) { 5 setup_woocommerce(); 6 } 7 }); 8 9 function setup_woocommerce() { 10 11 // Intercept WooCommerce pagination 12 $().on('click', '.woocommerce-pagination a', function(e) { 13 e.preventDefault(); 14 var matches = $(this).attr('href').match(/\/page\/(\d+)/); 15 if (null !== matches) { 16 FWP.paged = parseInt(matches[1]); 17 FWP.soft_refresh = true; 18 FWP.refresh(); 19 } 20 }); 21 22 // Disable sort handler 23 $('.woocommerce-ordering').attr('onsubmit', 'event.preventDefault()'); 24 25 // Intercept WooCommerce sorting 26 $().on('change', '.woocommerce-ordering .orderby', function(e) { 27 var qs = new URLSearchParams(window.location.search); 28 qs.set('orderby', $(this).val()); 29 history.pushState(null, null, window.location.pathname + '?' + qs.toString()); 30 FWP.soft_refresh = true; 31 FWP.refresh(); 32 }); 33 } 34})(fUtil);
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.