mirror of
https://github.com/bumi/lntip
synced 2025-06-17 10:15:35 +00:00
Support form prefilling with query params
This commit is contained in:
parent
f1a0278c10
commit
f30bb63bad
@ -128,6 +128,13 @@
|
|||||||
|
|
||||||
<script src="/lnme/lnme.js" id="lnme-script"></script>
|
<script src="/lnme/lnme.js" id="lnme-script"></script>
|
||||||
<script>
|
<script>
|
||||||
|
var urlParams = new URLSearchParams(window.location.search);
|
||||||
|
if (urlParams.get('amount')) {
|
||||||
|
document.getElementById('amount').value = urlParams.get('amount');
|
||||||
|
}
|
||||||
|
if (urlParams.get('memo')) {
|
||||||
|
document.getElementById('memo').value = urlParams.get('memo');
|
||||||
|
}
|
||||||
document.getElementById('send-button').addEventListener('click', function(e) {
|
document.getElementById('send-button').addEventListener('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.target.setAttribute('disabled', true);
|
e.target.setAttribute('disabled', true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user