1jQuery(($) => { 2 $(document).on('click', 'input[name="has_ffl"]', function() { 3 if($(this).attr('value') === 'yes') { 4 $('.ffl_form_wrapper').show(); 5 $('.ffl_search_wrapper').hide(); 6 } else { 7 $('.ffl_search_wrapper').show(); 8 $('.ffl_form_wrapper').hide(); 9 } 10 }); 11 12 if(Cookies.get('fflPromptDismiss')) { 13 $('.ffl-info-widget-wrapper').hide(); 14 } 15 16 $('.ffl-prompt-dismiss').click(function () { 17 $('.ffl-info-widget-wrapper').toggle(); 18 Cookies.set('fflPromptDismiss', 'true', { expires: 90, path: '' }); 19 }); 20 21 $('#ffl-switch-form').click(function () { 22 $('.ffl_form_wrapper').show(); 23 $('.ffl_search_wrapper').hide(); 24 $('input[name="has_ffl"][value="yes"]').prop('checked', true); 25 26 $('html, body').animate({ 27 scrollTop: $('.ffl-info-widget-wrapper').offset().top 28 }); 29 }); 30 31 $('#ffl-re-submit').click(function () { 32 $('#ffl-provided').slideUp(); 33 $('#ffl-form-wrapper').show(); 34 }); 35 36 $(document).on('fflContactsSearchSetUp', function () { 37 if ($('#ffl-form-wrapper').length) { 38 fflContactsTableInitializer(); 39 40 window.fflSearchSubmitCallback = function (selectedFFL, $fflSearchSubmit, $fflSearchError) { 41 $('.ffl-search-submit-container .gform_ajax_spinner').removeClass('hidden'); 42 43 $.ajax({ 44 url: ffl_ajax.ajaxurl, 45 type: 'POST', 46 data: { 47 action: 'ffl_update_order_contact', 48 order_id: ffl_ajax.order_id, 49 order_key: ffl_ajax.order_key, 50 nonce: ffl_ajax.nonce, 51 contact: selectedFFL, 52 }, 53 success: function(response) { 54 let link; 55 if (selectedFFL['premisePhone'] && selectedFFL['premisePhone'].trim() !== '') { 56 link = 'Phone: ' + selectedFFL['premisePhone']; 57 } else { 58 const query = selectedFFL['licenseName'] + ' ' + selectedFFL['premiseCity'] + ' ' + selectedFFL['premiseState'] + ' phone number'; 59 link = '<a target="_blank" href="https://google.com/search?q=' + encodeURIComponent(query) + '"><i class="fa fa-search ffl_search_icon"></i> Phone</a>'; 60 } 61 62 $('#ffl-form-wrapper').html('<div id="ffl-provided">FFL and shipping information has been updated based on your selection: <br/>' + 63 `<b>${selectedFFL['licenseName']}, ${selectedFFL['premiseCity']} - ${selectedFFL['premiseState']}</b> ` + link + '</div>'); 64 65 $('html, body').animate({ scrollTop: 0 }, 1000); 66 }, 67 error: function(xhr, status, error) { 68 $('#ffl_search_submit').prop('disabled', false); 69 $('#ffl-error-message').text(xhr.responseJSON.data.message); 70 $fflSearchError.show(); 71 }, 72 complete: function() { 73 $('.ffl-search-submit-container .gform_ajax_spinner').addClass('hidden'); 74 } 75 }); 76 }; 77 } 78 }); 79});
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.