1(function($) { 2 "use strict"; 3 4 $(document).on('click', '.ea-clear-cache', function (e) { 5 e.preventDefault(); 6 7 if(typeof localize != 'undefined' && localize) { 8 var pageID = $(this).parent().find('.ea-clear-cache-id').data('pageid'), 9 text = $(this).find('.ab-item'); 10 11 $.ajax({ 12 url: localize.ajaxurl, 13 type: "post", 14 data: { 15 action: "clear_cache_files_with_ajax", 16 security: localize.nonce, 17 pageID: pageID, 18 actionType: 'post' 19 }, 20 beforeSend: function() { 21 text.text( 22 'Clearing...' 23 ); 24 }, 25 success: function(response) { 26 setTimeout(function() { 27 text.text('Clear Page Cache'); 28 window.location.reload(); 29 }, 1000); 30 }, 31 error: function() { 32 console.log('Something went wrong!'); 33 } 34 }); 35 } else { 36 console.log('This page has no widget from EA'); 37 } 38 }); 39 40 $(document).on('click', '.ea-all-cache-clear', function (e) { 41 e.preventDefault(); 42 43 if(typeof localize != 'undefined' && localize) { 44 var text = $(this).find('.ab-item'); 45 46 $.ajax({ 47 url: localize.ajaxurl, 48 type: "post", 49 data: { 50 action: "clear_cache_files_with_ajax", 51 security: localize.nonce 52 }, 53 beforeSend: function() { 54 text.text( 55 'Clearing...' 56 ); 57 }, 58 success: function(response) { 59 setTimeout(function() { 60 text.text('Clear All Cache'); 61 window.location.reload(); 62 }, 1000); 63 }, 64 error: function() { 65 console.log('Something went wrong!'); 66 } 67 }); 68 }else { 69 console.log('This page has no widget from EA, Clear cache from Dashboard'); 70 } 71 }); 72 73})(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.