1// For compatibility with optimizers 2if (document.readyState !== 'loading') { 3 //console.log('Newsletter loaded (late)'); 4 tnp_ajax_init(); 5} else { 6 document.addEventListener("DOMContentLoaded", function () { 7 //console.log('Newsletter loaded'); 8 tnp_ajax_init(); 9 }); 10} 11 12function tnp_ajax_init() { 13 document.querySelectorAll('form.tnp-ajax').forEach(el => { 14 el.addEventListener('submit', async function(ev) { 15 ev.preventDefault(); 16 ev.stopPropagation(); 17 const response = await fetch(newsletter_data.action_url + '?action=tnp&na=sa', { 18 method: "POST", 19 body: new FormData(this) 20 }); 21 this.innerHTML = await response.text(); 22 }); 23 }); 24} 25 26 27
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.