From e8e0be2ad55fbcb88228c5e8e7e65922458e3a49 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 6 Jan 2025 11:50:20 +0100 Subject: Update donation HTML page to use new PayPal donation links We add javascript code to the page to handle dynamic selection of donation currency --- doc/html/donation.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/html/donation.js (limited to 'doc/html/donation.js') diff --git a/doc/html/donation.js b/doc/html/donation.js new file mode 100644 index 00000000..2718bbc9 --- /dev/null +++ b/doc/html/donation.js @@ -0,0 +1,9 @@ +document.addEventListener('DOMContentLoaded', function() { + document.getElementById('currency-form').addEventListener('submit', function(e) { + e.preventDefault(); + const select = this.querySelector('select'); + if (select.value) { + window.open(select.value, '_blank'); + } + }); +}); -- cgit v1.2.3