mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-16 23:50:02 -04:00
chore: code cleanup
This commit is contained in:
parent
473c756f60
commit
52e419f44e
4 changed files with 9 additions and 5 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue