diff options
author | Matt Strapp <matt@mattstrapp.net> | 2023-09-27 10:22:03 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2023-09-27 10:24:08 -0500 |
commit | b28053ec308da0522b56971a7efe3daf26afae25 (patch) | |
tree | 5705a376e09af19460b05bc316ccfa11dd67275b /app/src | |
parent | lint: add eslint --fix to lint script (diff) | |
download | trinkets-b28053ec308da0522b56971a7efe3daf26afae25.tar trinkets-b28053ec308da0522b56971a7efe3daf26afae25.tar.gz trinkets-b28053ec308da0522b56971a7efe3daf26afae25.tar.bz2 trinkets-b28053ec308da0522b56971a7efe3daf26afae25.tar.lz trinkets-b28053ec308da0522b56971a7efe3daf26afae25.tar.xz trinkets-b28053ec308da0522b56971a7efe3daf26afae25.tar.zst trinkets-b28053ec308da0522b56971a7efe3daf26afae25.zip |
Upgrade deps
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/lib/ts/crc32.worker.ts | 2 | ||||
-rw-r--r-- | app/src/routes/crc32/+page.svelte | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/app/src/lib/ts/crc32.worker.ts b/app/src/lib/ts/crc32.worker.ts index 2edcc4f..57c1bc9 100644 --- a/app/src/lib/ts/crc32.worker.ts +++ b/app/src/lib/ts/crc32.worker.ts @@ -1,3 +1,5 @@ +// TODO: Think about using a WebAssembly implementation of CRC32 instead of JavaScript. +// WHY? The JavaScript implementation is not very extensible and is not very fast. import crc32 from 'crc/crc32'; onmessage = async (message: MessageEvent<File>) => { diff --git a/app/src/routes/crc32/+page.svelte b/app/src/routes/crc32/+page.svelte index 86b614d..b88e52e 100644 --- a/app/src/routes/crc32/+page.svelte +++ b/app/src/routes/crc32/+page.svelte @@ -14,7 +14,7 @@ } onMount(async () => { - worker = new (await import('$lib/ts/crc32.worker?worker')).default(); + worker = new Worker(new URL('$lib/ts/crc32.worker.ts', import.meta.url), { type: 'module' }); worker.onmessage = (e: MessageEvent<number>) => { disableInput = false; console.log(e.data); @@ -42,9 +42,9 @@ </FileDropzone> <br /> <noscript> - <button type="submit" class="btn variant-filled" - >After adding a file, click to submit! (Not yet implemented)</button - > + <button type="submit" class="btn variant-filled"> + After adding a file, click to submit! (Not yet implemented) + </button> </noscript> {#if disableInput} <h3 class="h3">Calculating the checksum, this may take time!</h3> <br /> |