chore: code cleanup

This commit is contained in:
Percs 2024-10-13 16:21:57 -05:00
parent 473c756f60
commit 52e419f44e
4 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,5 @@
import { $scramjet } from "../scramjet";
export function errorTemplate(trace: string, fetchedURL: string) {
// turn script into a data URI so we don"t have to escape any HTML values
const script = `
@ -5,8 +7,8 @@ export function errorTemplate(trace: string, fetchedURL: string) {
fetchedURL.textContent = ${JSON.stringify(fetchedURL)};
for (const node of document.querySelectorAll("#hostname")) node.textContent = ${JSON.stringify(location.hostname)};
reload.addEventListener("click", () => location.reload());
version.textContent = ${JSON.stringify(VERSION)};
build.textContent = ${JSON.stringify(COMMITHASH)};
version.textContent = ${JSON.stringify($scramjet.version.version)};
build.textContent = ${JSON.stringify($scramjet.version.build)};
`;
return `<!DOCTYPE html>