diff --git a/README.md b/README.md index 344d0dd..7b74c48 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ Generate shareable QR code, link from bank details to use with UPI payment apps ## [Try it now](https://harish2704.github.io/UPI-qr-gen/) -It first generate a [UPI](https://www.npci.org.in/what-we-do/upi/product-overview) id from bank details and then generates following items for end users. +This tool first generates a [UPI](https://www.npci.org.in/what-we-do/upi/product-overview) id from bank details provided and then generates following items for end users to reuse. 1. QR code image 2. Sharable URL - - Shareable URLs **do not send any banking data to any third party servers**. The data is stored in "hashbang" which is only accessible to web browsers and not sent to servers -3. Mobile friendly link which will invoke the installed UPI application in any device + - Shareable URLs **This tool does not save/send any banking data to any third party servers**. The data is stored in "hashbang" which is only accessible to web browsers and not sent to servers +3. Mobile friendly link which will invoke the UPI application of your choice on any device ### Powered by diff --git a/index.html b/index.html index f070518..8b38fc7 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,13 @@ UPI QR code generator +
@@ -22,10 +29,13 @@ - Open UPI App - - - +
+ Open UPI App + Copy Link + + + +
@@ -37,6 +47,20 @@ return document.getElementById(sel); } + function copyToClipboard() { + // change btn text + var link = $('copyLink'); + link.innerText = 'Copied!' + setTimeout(()=>{ + // restore btn text + link.innerText = 'Copy Link' + }, 1000) + var input = $('sharelink'); + input.focus(); + input.select(); + document.execCommand('copy'); + } + function renderQR(accNo, ifscCode, accountHolder){ var upiString = 'upi://pay?pa='+ accNo + '@'+ ifscCode + '.ifsc.npci&pn='+ accountHolder +'&am='; @@ -46,7 +70,7 @@ margin: 1, scale:8, color: { - dark:"#580000", + dark:"#9b4dca", light:"#fff" } } @@ -59,7 +83,6 @@ return; } $('outputImg').src = dataUrl; - console.log('success!'); }) }