mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-01-19 05:33:47 +01:00
Update app.js
Added copy function
This commit is contained in:
parent
8d06f2f402
commit
f87da0fb44
@ -248,9 +248,9 @@ function scanQRsend() {
|
||||
'<br/>Memo: ' +
|
||||
outmemo +
|
||||
'</h3>' +
|
||||
"<h4 style='word-wrap: break-word;'>" +
|
||||
JSON.stringify(code.data) +
|
||||
'</h4>' +
|
||||
"<div class='input-group input-group-sm'><input type='text' id='invoiceinput' class='form-control' value='" +
|
||||
JSON.stringify(code.data) +
|
||||
"'><span class='input-group-btn'><button class='btn btn-info btn-flat' type='button' onclick='copyfunc()'>Copy</button></span></div></br/>" +
|
||||
"<button type='submit' class='btn btn-primary' onclick='sendfunds(" +
|
||||
JSON.stringify(code.data) +
|
||||
")'>Send funds</button>" +
|
||||
@ -266,6 +266,14 @@ function scanQRsend() {
|
||||
}
|
||||
}
|
||||
|
||||
function copyfunc(){
|
||||
var copyText = document.getElementById("invoiceinput");
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999);
|
||||
document.execCommand("copy");
|
||||
|
||||
}
|
||||
|
||||
function deletewallet() {
|
||||
var url = 'deletewallet?wal=' + wallet.id + '&usr=' + user
|
||||
window.location.href = url
|
||||
|
Loading…
Reference in New Issue
Block a user