Yo check this out. I took it to the next level. I got it to display the zap invoice as QR code in a modal 😂.

https://gist.github.com/SamSamskies/e778e2d7e99bf4cc25c8281e29ed01d7
Yo check this out. I took it to the next level. I got it to display the zap invoice as QR code in a modal 😂.

https://gist.github.com/SamSamskies/e778e2d7e99bf4cc25c8281e29ed01d7
Here’s the updated bookmarklet
javascript:(function(){window.webln.sendPayment=(invoice)=>fetch(`https://api.qrserver.com/v1/create-qr-code/?data=$%7Binvoice%7D&size=400x400&margin=15%60).then(response=%3Eresponse.blob()).then(blob=%3E%7Bconst qrCodeUrl=URL.createObjectURL(blob);const modal=document.createElement('div');modal.style.position='fixed';modal.style.top='0';modal.style.left='0';modal.style.width='100%';modal.style.height='100%';modal.style.background='rgba(0, 0, 0, 0.5)';modal.style.display='flex';modal.style.justifyContent='center';modal.style.alignItems='center';const img=document.createElement('img');img.src=qrCodeUrl;img.style.width='400px';img.style.height='400px';modal.appendChild(img);document.body.appendChild(modal);modal.onclick=()=>{modal.remove();};});})();
I made a gist since that didn’t render correctly https://gist.github.com/SamSamskies/f0c8c9ac58db3c52d2fbc8f1a9d06b2e