Skip to content

Commit 1a3cd64

Browse files
committed
Fix FileReader polyfill to properly output data URLs
oops
1 parent 8b86dd1 commit 1a3cd64

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

bin/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class FileReader {
4343
4444
async readAsDataURL (blob) {
4545
// https://stackoverflow.com/a/62684503
46-
this.result = Buffer.from(await blob.arrayBuffer()).toString('base64')
46+
this.result = \`data:\${blob.type};base64,\${Buffer.from(await blob.arrayBuffer()).toString('base64')}\`
4747
this.callback()
4848
}
4949
}

node/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ main()
6161
## Documentation
6262

6363
[Auto-generated
64-
documentation](https://doc.deno.land/https/github.com/SheepTester/htmlifier/raw/v1.0.2/src/htmlifier.ts)
64+
documentation](https://doc.deno.land/https/github.com/SheepTester/htmlifier/raw/v1.0.3/src/htmlifier.ts)
6565
is available courtesy of deno doc.

node/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sheeptester/htmlifier",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Packages a Scratch project in an HTML file with no optimisations.",
55
"type": "module",
66
"main": "index.min.js",
@@ -12,8 +12,16 @@
1212
"scratch",
1313
"sb3"
1414
],
15+
"repository": {
16+
"type": "git",
17+
"url": "https://github.com/SheepTester/htmlifier.git"
18+
},
1519
"author": "SheepTester",
1620
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/SheepTester/htmlifier/issues"
23+
},
24+
"homepage": "https://sheeptester.github.io/htmlifier/",
1725
"dependencies": {
1826
"fetch-blob": "^3.1.2",
1927
"node-fetch": "^2.6.1"

0 commit comments

Comments
 (0)