1jQuery(document).ready(function ($) { 2 $('.loading').hide(); 3 4 $('#fanclub_apply_discount').on('click', function (e) { 5 e.preventDefault(); 6 7 let cardNumber = $('#card_number').val(); 8 let messageBox = $('#fanclub-message'); 9 let loadingIndicator = $('.loading'); 10 11 if (!cardNumber) { 12 messageBox.text('Ju lutemi vendosni ID e kartës.').css('color', 'red'); 13 return; 14 } 15 16 $.ajax({ 17 url: ajax_url, 18 type: 'POST', 19 data: { action: 'apply_fanclub_discount', card_number: cardNumber, nonce: '' }, 20 beforeSend: function () { 21 messageBox.text('Po kontrollohet...').css('color', 'blue'); 22 loadingIndicator.show().attr('style', 'display:flex'); 23 }, 24 success: function (response) { 25 messageBox.text(response.data.message).css('color', response.success ? 'green' : 'red'); 26 27 if (response.success) { 28 $(document.body).trigger('wc_update_cart'); 29 } 30 }, 31 error: function () { 32 messageBox.text('Ndodhi një gabim, provo përsëri.').css('color', 'red'); 33 }, 34 complete: function () { 35 loadingIndicator.hide(); 36 } 37 }); 38 }); 39});
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.