Last active
July 23, 2019 16:20
-
-
Save j-chimienti/a4f44ecd091a391c6e942cc7da0c9302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// htlc.me | |
const $btn = document.querySelector("body > div.container.mb-4 > div > div.col-md-8.main-column > div.card.mb-4.payment-actions.show-on-start > div.card-body > form.action-details.preparing-receive.text-success > div:nth-child(2) > button") | |
const $amt = document.querySelector("body > div.container.mb-4 > div > div.col-md-8.main-column > div.card.mb-4.payment-actions.show-on-start > div.card-body > form.action-details.preparing-receive.text-success > div:nth-child(1) > div > input") | |
async function sleep(sec = 1) { | |
return new Promise(resolve => { | |
setTimeout(resolve, sec * 1000) | |
}) | |
} | |
async function go(times = 1) { | |
for (let i = 1; i <= times; i++) { | |
$amt.value = 1e-8 | |
$btn.click() | |
await sleep(1) | |
} | |
const $items = document.querySelectorAll(".payment-request.text-to-copy") | |
const payReqs = Array.from($items).map(item => { | |
return item.value; | |
}).filter(i => i != "") | |
//console.log(payReqs) | |
window.payReqs = payReqs | |
// hack, copy the variable from console | |
console.log('execute copy(payReqs)') | |
} | |
go(100) | |
// const $items = document.querySelector("body > div.container.mb-4 > div > div.col-md-8.main-column > div:nth-child(4) > div > form > div > div > input") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment