1 2jQuery(function ($) { 3 /* 4 localized variables passed through params object: 5 scheduled_exports_nfpluginsettings.clearLogRestUrl 6 scheduled_exports_nfpluginsettings.clearLogButtonId 7 scheduled_exports_nfpluginsettings.downloadLogRestUrl 8 scheduled_exports_nfpluginsettings.downloadLogButtonId 9 scheduled_exports_nfpluginsettings._wpnonce 10 11 */ 12 13 $("#"+scheduled_exports_nfpluginsettings.clearLogButtonId).on("click", () => { 14 15 $.post( 16 scheduled_exports_nfpluginsettings.clearLogRestUrl, 17 { 18 "_wpnonce":scheduled_exports_nfpluginsettings._wpnonce 19 }, 20 function (json) { 21 console.log(json); 22 } 23 ); 24 }); 25 26 $("#"+scheduled_exports_nfpluginsettings.downloadLogButtonId).on("click", () => { 27 $.post( 28 scheduled_exports_nfpluginsettings.downloadLogRestUrl, 29 { 30 "_wpnonce":scheduled_exports_nfpluginsettings._wpnonce 31 }, 32 function (json) { 33 let download = json.data; 34 35 var blob = new Blob([download], { type: "json" }); 36 37 var a = document.createElement("a"); 38 a.download = "nf-scheduled-exports-debug-log.json"; 39 a.href = URL.createObjectURL(blob); 40 a.dataset.downloadurl = ["json", a.download, a.href].join(":"); 41 a.style.display = "none"; 42 document.body.appendChild(a); 43 a.click(); 44 document.body.removeChild(a); 45 setTimeout(function () { 46 URL.revokeObjectURL(a.href); 47 }, 15000); 48 } 49 ); 50 }); 51 52return; 53 54});
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.