UNPKG

node-red-contrib-knx-ultimate

Version:

Control your KNX and KNX Secure intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.

28 lines (23 loc) 774 B
// 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(); }); }); }