This commit is contained in:
Adam Šrámek 2024-05-16 09:50:23 +02:00
parent 1b131d211e
commit 48b1c5483c

14
scripty/index.js Normal file

@ -0,0 +1,14 @@
<script>
// Function to handle download
function handleDownload() {
// Get the download link element
var downloadLink = document.getElementById('download-link');
// Get the image source URL
var imageUrl = downloadLink.querySelector('img').src;
// Set the download link href to the image source URL
downloadLink.href = imageUrl;
}
// Add event listener to the download link
document.getElementById('download-link').addEventListener('click', handleDownload);
</script>