Choose from various QR code types like URL, vCard, Email, and more.
2
Enter Your Content
Fill in the required information for your selected QR code type.
3
Customize & Download
Personalize your QR code with colors, logos, and download in various formats.
тЬУ
QR Code generated successfully!
`);
printWindow.document.close();
}
function shareQRCode() {
// In a real implementation, this would use the Web Share API if available
// For this demo, we'll just show a toast message
if (navigator.share) {
qrCanvas.toBlob(function(blob) {
const file = new File([blob], "meqr-code.png", { type: "image/png" });
navigator.share({
title: 'My QR Code',
text: 'Check out my QR code created with ME-QR!',
files: [file]
})
.then(() => showToast('QR Code shared successfully!', 'success'))
.catch((error) => console.error('Error sharing:', error));
});
} else {
showToast('Sharing is not supported on this browser', 'info');
}
}
function showToast(message, type = 'success') {
toastMessage.textContent = message;
toast.className = 'toast';
if (type === 'success') {
toast.classList.add('toast-success');
toastIcon.textContent = 'тЬУ';
} else if (type === 'error') {
toast.classList.add('toast-error');
toastIcon.textContent = 'тЬЧ';
} else {
toastIcon.textContent = 'тУШ';
}
toast.classList.add('show');
setTimeout(() => {
toast.classList.remove('show');
}, 3000);
}