GIF: basic parsing of bytes

This commit is contained in:
Evan Hahn 2023-08-11 15:06:09 -05:00
parent 966a56433d
commit 7cf9537f3e
4 changed files with 21 additions and 2 deletions

19
public/gif/gif.js Normal file
View File

@ -0,0 +1,19 @@
// @ts-check
import parseHash from "../common/parseHash.js";
const main = () => {
// TODO: We may want a better UI here.
// TODO: Handle hash changes.
const parsedHash = parseHash(location.hash);
if (!parsedHash) {
location.href = "..";
return;
}
const { bytes } = parsedHash;
console.log(bytes);
};
main();

View File

@ -1,7 +1,7 @@
// @ts-check
import parseHash from "../common/parseHash.js";
import parsePng from "./parsePng.js";
import parseHash from "./parseHash.js";
import getNodeUi from "./getNodeUi.js";
import explorer from "./explorer.js";

View File

@ -1,6 +1,6 @@
import { assertEquals } from "assert";
import { stubbingWarn } from "../helpers.ts";
import parseHash from "../../public/png/parseHash.js";
import parseHash from "../../public/common/parseHash.js";
Deno.test(
"returns null if hash cannot be parsed",