From 4890d9a710335f421d0c3ecb2244d61d6c3fc84a Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 19 Feb 2019 15:28:27 -0500 Subject: [PATCH] add comment --- src/renderer/index.js | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/renderer/index.js b/src/renderer/index.js index 9ea66bf..7f4dc97 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -51,23 +51,28 @@ resolveButton.addEventListener("click", () => { }); }); -// getButton.addEventListener("click", () => { -// const value = resolveInput.value; -// if (!value) { -// help.innerHTML = "You need to enter a name before getting the file."; -// return; -// } +// +// This currently only works for images +// +getButton.addEventListener("click", () => { + const value = resolveInput.value; + if (!value) { + help.innerHTML = "You need to enter a name before getting the file."; + return; + } -// claimData.innerText = "Loading..."; -// Lbry.get({ uri: `lbry://${value}` }) -// .then(res => { -// const filePath = res.download_path; -// const image = document.createElement("img"); -// image.src = filePath; -// imageWrapper.appendChild(image); -// claimData.innerText = null; -// }) -// .catch(error => { -// claimData.innerText = JSON.stringify(error, null, 2); -// }); -// }); + // claimData.innerText = "Loading..."; + // Lbry.get({ uri: `lbry://${value}` }) + // .then(result => { + // const filePath = result.download_path; + // const image = document.createElement("img"); + + // image.src = filePath; + // imageWrapper.appendChild(image); + + // claimData.innerText = JSON.stringify(result, null, 2); + // }) + // .catch(error => { + // claimData.innerText = JSON.stringify(error, null, 2); + // }); +});