1(function( $ ) { 2 'use strict'; 3 $(document.body).on('click', '#cf7cstmzr_frontend_togler', function() { 4 var control = $(this); 5 var settings = $('#cf7cstmzr_frontend'); 6 7 settings.toggleClass('active'); 8 control.hide(); 9 }); 10 11 $(document.body).on('click', '.cf7cstmzr_form_frontend_link', function(e) { 12 event.preventDefault(); 13 14 var url = $(this).attr('href'); 15 var form = $(this).data('form'); 16 var data = { 17 action: 'cf7cstmzr_cache_form', 18 form: form 19 }; 20 21 $.ajax({ 22 type: 'post', 23 url: cf7cstmzrJsObj.ajaxurl, 24 data: data, 25 success: function (response) { 26 var decoded; 27 28 try { 29 decoded = $.parseJSON(response); 30 } catch(err) { 31 console.log(err); 32 decoded = false; 33 } 34 35 if (decoded) { 36 if (decoded.success) { 37 window.open(url, '_blank'); 38 } else { 39 if (decoded.message) { 40 alert(decoded.message); 41 } 42 } 43 } else { 44 alert('Something went wrong'); 45 } 46 } 47 }); 48 }); 49 50 $(document.body).on('click', '#cf7cstmzr_form_frontend_togler', function() { 51 var control = $('#cf7cstmzr_frontend_togler'); 52 var settings = $('#cf7cstmzr_frontend'); 53 54 if (settings.hasClass('active')) { 55 settings.removeClass('active'); 56 setTimeout(function() { 57 control.show(); 58 }, 600); 59 } else { 60 settings.addClass('active'); 61 control.hide(); 62 } 63 }); 64 $(document.body).on('click', '#cf7cstmzr_frontend_close', function() { 65 var control = $(this); 66 var open = $('#cf7cstmzr_frontend_togler'); 67 var settings = $('#cf7cstmzr_frontend'); 68 69 settings.toggleClass('active'); 70 71 setTimeout(function() { 72 open.show(); 73 }, 600); 74 }); 75 $(document.body).on('click', '#cf7cstmzr_frontend_save', function() { 76 var control = $(this); 77 var loadBodyTag = $('#cf7cstmzr_frontend_load-body-tag').is(':checked'); 78 var postId = control.data('post'); 79 var data = { 80 action: 'cf7cstmzr_frontend_save', 81 loadBodyTag: loadBodyTag, 82 postId: postId 83 }; 84 85 $.ajax({ 86 type: 'post', 87 url: cf7cstmzrJsObj.ajaxurl, 88 data: data, 89 success: function (response) { 90 var decoded; 91 92 try { 93 decoded = $.parseJSON(response); 94 } catch(err) { 95 console.log(err); 96 decoded = false; 97 } 98 99 if (decoded) { 100 if (decoded.success) { 101 if (decoded.message) { 102 alert(decoded.message); 103 } 104 105 window.location.reload(); 106 } else { 107 if (decoded.message) { 108 alert(decoded.message); 109 } 110 } 111 } else { 112 alert('Something went wrong'); 113 } 114 } 115 }); 116 }); 117})( jQuery );
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.