Skip to content

Commit

Permalink
input host
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinidadec committed Nov 8, 2023
1 parent ba8bd68 commit 94a1bcd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ Get a file from local storage:

```console
npx blockset-js hsdfs1zs8fnf810v8f9k6pjdkz7b4y95sembmswac5sjt out.txt
```
```

From a web browser: https://blockset-js.pages.dev/
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<link rel="stylesheet" href="main.css">
</head>
<body>
Hash: <input id="input"/><button id="download">Download</button>
Hash: <input id="input-hash" size="50" value="awt9x8564999k276wap2e5b7n10575ffy946kencva4ve"/>
<br>
Host: <input id="input-host" size="50" value="410f5a49.blockset-js-test.pages.dev"/>
<br>
<button id="download">Download</button>
<pre id="log"></pre>
<pre id="output"></pre>
</body>
Expand Down
6 changes: 4 additions & 2 deletions web-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Uint8Array>} */
const read = address => {
// @ts-ignore
Expand Down

0 comments on commit 94a1bcd

Please sign in to comment.