| Server IP : 130.225.57.55 / Your IP : 216.73.216.60 Web Server : Apache System : Linux wp-vhost07 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /srv/www/reco2st.eu/https/wp-content/plugins/newsletter/ |
Upload File : |
// For compatibility with optimizers
if (document.readyState !== 'loading') {
//console.log('Newsletter loaded (late)');
tnp_ajax_init();
} else {
document.addEventListener("DOMContentLoaded", function () {
//console.log('Newsletter loaded');
tnp_ajax_init();
});
}
function tnp_ajax_init() {
document.querySelectorAll('form.tnp-ajax').forEach(el => {
el.addEventListener('submit', async function(ev) {
ev.preventDefault();
ev.stopPropagation();
const response = await fetch(newsletter_data.action_url + '?action=tnp&na=sa', {
method: "POST",
body: new FormData(this)
});
this.innerHTML = await response.text();
});
});
}