aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/lib/ts
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-09-28 09:49:16 -0500
committerMatt Strapp <matt@mattstrapp.net>2023-09-28 09:49:16 -0500
commite430645e4a637148bcf6d5846a84fe97f85bc0a9 (patch)
treea7c49f980a4f7e8fd52c4b5622bce601c9a45ab2 /app/src/lib/ts
parentLint (diff)
downloadtrinkets-e430645e4a637148bcf6d5846a84fe97f85bc0a9.tar
trinkets-e430645e4a637148bcf6d5846a84fe97f85bc0a9.tar.gz
trinkets-e430645e4a637148bcf6d5846a84fe97f85bc0a9.tar.bz2
trinkets-e430645e4a637148bcf6d5846a84fe97f85bc0a9.tar.lz
trinkets-e430645e4a637148bcf6d5846a84fe97f85bc0a9.tar.xz
trinkets-e430645e4a637148bcf6d5846a84fe97f85bc0a9.tar.zst
trinkets-e430645e4a637148bcf6d5846a84fe97f85bc0a9.zip
Make the website less ugly, especially on mobile
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r--app/src/lib/ts/truncate.worker.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/lib/ts/truncate.worker.ts b/app/src/lib/ts/truncate.worker.ts
index ad00011..eaa65fe 100644
--- a/app/src/lib/ts/truncate.worker.ts
+++ b/app/src/lib/ts/truncate.worker.ts
@@ -1,9 +1,11 @@
import type { TruncateRequest, TruncateResponse } from '../types/truncate-worker';
onmessage = async (message: MessageEvent<TruncateRequest>) => {
+ console.log('File received. Truncating...');
const file = message.data.file;
const buffer = await file.arrayBuffer();
const truncated = buffer.slice(0, message.data.size);
-
postMessage({ file: truncated } as TruncateResponse);
};
+
+console.log('Worker successfully loaded!');