1jQuery(document).ready(function($) { 2 3 $('.button.cancel').click(function(e) { 4 e.preventDefault(); 5 var cancelURL = jQuery(this).attr("href"); 6 7 if(1 == ajax_object.reason_required) 8 { 9 var subscription_id = $.urlParam('subscription_id', cancelURL); 10 11 var confirmDelete = prompt(ajax_object.promt_msg, ""); 12 if (confirmDelete != null && confirmDelete != "") { 13 var data = { 14 'action': 'wcs_cancel_confirmation', 15 'subscription_id': subscription_id, 16 'reason_to_cancel': confirmDelete 17 }; 18 19 jQuery.post(ajax_object.ajax_url, data, function(response) { 20 if(response=='' || response==null || response<=0){ 21 alert(ajax_object.error_msg); 22 } 23 }).done(function() { 24 window.location.href = cancelURL; 25 }); 26 } 27 } 28 else 29 { 30 var confirmCancel = confirm(ajax_object.promt_msg); 31 if(confirmCancel == true) 32 { 33 window.location.href = cancelURL; 34 } 35 } 36 }); 37}) 38 39jQuery.urlParam = function(name, url) { 40 var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(url); 41 return results[1] || 0; 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.