Code Snippets
Login
Beacon activator
Sends a beacon to the server to activate a PHP function
Label
const link = document.getElementById('NAME_HERE'); if (link) { link.addEventListener('click', function () { const linkId = this.dataset.linkId; navigator.sendBeacon('?route=ROUTE_HERE', new URLSearchParams({ id: linkId })); }); }
Copy to clipboard
Copied!
©
Leerlandais 2024