From 200c5455615c0062e89852ceb584a85735e5bb13 Mon Sep 17 00:00:00 2001 From: Trinidadec Date: Wed, 8 Nov 2023 23:49:04 +0200 Subject: [PATCH] input host (#56) --- README.md | 4 +++- index.html | 6 +++++- web-test.mjs | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce2392e..fddcff4 100644 --- a/README.md +++ b/README.md @@ -41,4 +41,6 @@ Get a file from local storage: ```console npx blockset-js hsdfs1zs8fnf810v8f9k6pjdkz7b4y95sembmswac5sjt out.txt -``` \ No newline at end of file +``` + +From a web browser: https://blockset-js.pages.dev/ diff --git a/index.html b/index.html index 73ea4bc..8d10953 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,11 @@ -Hash: +Hash: +
+Host: +
+

     

   
diff --git a/web-test.mjs b/web-test.mjs
index f1fa3d1..efda3ae 100644
--- a/web-test.mjs
+++ b/web-test.mjs
@@ -5,9 +5,11 @@ const { get, fetchRead } = getModule
 // @ts-ignore
 document.getElementById('download').addEventListener('click', () => {
   // @ts-ignore
-  const hash = document.getElementById('input').value
+  const hash = document.getElementById('input-hash').value
+  // @ts-ignore
+  const host = document.getElementById('input-host').value
   let buffer = new Uint8Array()
-  const fRead = fetchRead('410f5a49.blockset-js-test.pages.dev')
+  const fRead = fetchRead(host)
   /** @type {(address: Address) => Promise} */
   const read = address => {
     // @ts-ignore