We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd8b0f2 commit d50dbc7Copy full SHA for d50dbc7
1 file changed
Projects/QR Code Generator/script.js
@@ -36,20 +36,20 @@ downloadBtn.addEventListener('click',async()=>{
36
link.click();
37
URL.revokeObjectURL(url);
38
})
39
-sharebtn.addEventListener('click',(qrCodeUrl)=>
+sharebtn.addEventListener('click',()=>
40
{
41
if (navigator.share) {
42
navigator.share({
43
title: "QR Code",
44
- url: qrCodeUrl
+ url: qrImg.src
45
46
.then(function()
47
48
console.log("QR code shared successfully");
49
50
.catch(function(error) {
51
console.error("Error sharing QR code:", error);
52
- });
+ });
53
}
54
else {
55
console.log("Sharing not supported in this browser.");
0 commit comments