add live QR code next to referral link that updates with username
This commit is contained in:
@@ -481,6 +481,10 @@
|
|||||||
<button class="copy-sm-btn" id="copyLinkBtn" onclick="copySharedLink()">📄 Copy</button>
|
<button class="copy-sm-btn" id="copyLinkBtn" onclick="copySharedLink()">📄 Copy</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-hint">The referral opens the calculator with your username pre-loaded</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1146,6 +1150,11 @@ function updateSharedLinkBox() {
|
|||||||
if (signupBtn) {
|
if (signupBtn) {
|
||||||
signupBtn.href = `https://clickbaitpays.me/?ref=${refUser}`;
|
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() {
|
function copySharedLink() {
|
||||||
|
|||||||
Reference in New Issue
Block a user