update
This commit is contained in:
parent
1b131d211e
commit
48b1c5483c
14
scripty/index.js
Normal file
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>
|
Loading…
Reference in New Issue
Block a user