Amaryn

document.addEventListener('DOMContentLoaded', function () { console.log('✅ Custom JS loaded'); const button = document.getElementById('sendToMake'); const responseDiv = document.getElementById('makeResponse'); if (!button || !responseDiv) return; button.addEventListener('click', function (e) { e.preventDefault(); button.innerText = 'Sending...'; fetch('https://hook.us2.make.com/1rnidxa6un91uuk6lsbx7i3ljff270e', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'from_elementor' }) }) .then(response = response.json()) .then(data = { responseDiv.textContent = JSON.stringify(data, null, 2); button.innerText = 'Send to Make'; }) .catch(error = { responseDiv.textContent = `Error: ${error.message}`; button.innerText = 'Send to Make'; }); }); });