add live QR code next to referral link that updates with username

This commit is contained in:
Marty Bostick
2026-07-10 19:10:27 +00:00
parent eac3952c4d
commit 8433aa0802
+9
View File
@@ -481,6 +481,10 @@
<button class="copy-sm-btn" id="copyLinkBtn" onclick="copySharedLink()">📄 Copy</button>
</div>
<div class="sub-hint">The referral opens the calculator with your username pre-loaded</div>
<div class="qr-row" style="margin-top: 12px; text-align: center;">
<img id="refQrCode" src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https://cbp-calculator.saasy.top?ref=cryptoteambuild" alt="QR Code" style="width:160px;height:160px;border-radius:12px;border:2px solid var(--border);">
<div style="font-size:12px;color:var(--text-secondary);margin-top:6px;">📱 Scan to open calculator</div>
</div>
</div>
</div>
@@ -1146,6 +1150,11 @@ function updateSharedLinkBox() {
if (signupBtn) {
signupBtn.href = `https://clickbaitpays.me/?ref=${refUser}`;
}
// Update QR code
const qrImg = document.getElementById('refQrCode');
if (qrImg) {
qrImg.src = `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(shareUrl)}`;
}
}
function copySharedLink() {