1jQuery( 2function ($) { 3let sub_details = $('.shop_table.subscription_details'); 4sub_details.on( 5'click', 6'#sf-subscription-change-date-cancel', 7function (e) { 8e.preventDefault(); 9$('#sf-change-date-subscription').remove(); 10$('.sf-change-payment-date.button').show(); 11} 12); 13sub_details.on( 14'click', 15'.sf-change-payment-date', 16function (e) { 17e.preventDefault(); 18$('#sf-change-date-subscription').remove(); 19let $subscription_id = $(this).attr('data-id'); 20$.ajax( 21{ 22url: sf_sf_js.ajax_url, 23type: 'post', 24data: { 25action: 'sf_change_payment_date_subscription', 26nonce: sf_sf_js.nonce, 27subscription_id: $subscription_id, 28}, 29complete: function () { 30}, 31success: function (response) { 32if ($('.subscription_details .sf-change-payment-date').length > 0 && $('#sf-change-date-subscription').length === 0 ) { 33$('.sf-change-payment-date.button').hide(); 34$(response.data.html).insertAfter('.sf-change-payment-date'); 35} 36}, 37error: function (XMLHttpRequest, textStatus, errorThrown) { 38if (XMLHttpRequest.status == 0) { 39console.error('Network connectivity error.'); 40} else { 41console.error(XMLHttpRequest.responseText); 42} 43} 44} 45); 46} 47); 48sub_details.on( 49'click', 50'#sf-subscription-change-date-submit', 51function (e) { 52e.preventDefault(); 53let serialized = $('#sf-change-date-form').serialize(); 54$('#sf-subscription-change-date-submit').attr('disabled', true); 55$.ajax( 56{ 57url: sf_sf_js.ajax_url, 58type: 'post', 59data: { 60action: 'sf_change_date_subscription_submit', 61nonce: sf_sf_js.nonce, 62data: serialized, 63}, 64complete: function () { 65}, 66success: function (response) {
67$('#sf-change-date-subscription').slideUp(500).remove(); 68try { 69let noticeType = (response && response.error) ? 'error' : 'success'; 70window.sessionStorage.setItem( 71'ssd_persisted_notice', 72JSON.stringify({ 73message: $('<div />').html(response.data.html).text().trim(), 74type: noticeType, 75ts: Date.now(), 76}) 77); 78} catch (e) { 79} 80location.reload(); 81}, 82error: function (XMLHttpRequest, textStatus, errorThrown) { 83if (XMLHttpRequest.status == 0) { 84console.error('Network connectivity error.'); 85} else { 86console.error(XMLHttpRequest.responseText); 87} 88} 89} 90); 91} 92); 93} 94);
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.