GIF: basic parsing of bytes
This commit is contained in:
parent
966a56433d
commit
7cf9537f3e
|
@ -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();
|
|
@ -1,7 +1,7 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
|
import parseHash from "../common/parseHash.js";
|
||||||
import parsePng from "./parsePng.js";
|
import parsePng from "./parsePng.js";
|
||||||
import parseHash from "./parseHash.js";
|
|
||||||
import getNodeUi from "./getNodeUi.js";
|
import getNodeUi from "./getNodeUi.js";
|
||||||
import explorer from "./explorer.js";
|
import explorer from "./explorer.js";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { assertEquals } from "assert";
|
import { assertEquals } from "assert";
|
||||||
import { stubbingWarn } from "../helpers.ts";
|
import { stubbingWarn } from "../helpers.ts";
|
||||||
import parseHash from "../../public/png/parseHash.js";
|
import parseHash from "../../public/common/parseHash.js";
|
||||||
|
|
||||||
Deno.test(
|
Deno.test(
|
||||||
"returns null if hash cannot be parsed",
|
"returns null if hash cannot be parsed",
|
Loading…
Reference in New Issue