22 lines
486 B
JavaScript
22 lines
486 B
JavaScript
|
// @ts-check
|
||
|
|
||
|
import parseHash from "./parseHash.js";
|
||
|
|
||
|
const errorEl = document.getElementById("error");
|
||
|
const explorerEl = document.getElementById("explorer");
|
||
|
if (!errorEl || !explorerEl) throw new Error("HTML is not set up correctly");
|
||
|
|
||
|
const main = () => {
|
||
|
// TODO: We may want a better UI here.
|
||
|
const parsedHash = parseHash(location.hash);
|
||
|
if (!parsedHash) {
|
||
|
location.href = "..";
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
// TODO: Actually do something!
|
||
|
console.log(parsedHash);
|
||
|
};
|
||
|
|
||
|
main();
|