Skip to content

Commit d50dbc7

Browse files
committed
Sharing Enabled
1 parent bd8b0f2 commit d50dbc7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Projects/QR Code Generator/script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ downloadBtn.addEventListener('click',async()=>{
3636
link.click();
3737
URL.revokeObjectURL(url);
3838
})
39-
sharebtn.addEventListener('click',(qrCodeUrl)=>
39+
sharebtn.addEventListener('click',()=>
4040
{
4141
if (navigator.share) {
4242
navigator.share({
4343
title: "QR Code",
44-
url: qrCodeUrl
44+
url: qrImg.src
4545
})
4646
.then(function()
4747
{
4848
console.log("QR code shared successfully");
4949
})
5050
.catch(function(error) {
5151
console.error("Error sharing QR code:", error);
52-
});
52+
});
5353
}
5454
else {
5555
console.log("Sharing not supported in this browser.");

0 commit comments

Comments
 (0)