Clickable image links in the output
This commit is contained in:
parent
84c9c6a99a
commit
36fd166c99
12
src/index.ts
12
src/index.ts
|
@ -80,10 +80,14 @@ router.get("/", async (ctx) => {
|
||||||
const { id } = await (await fetch(url, { method: "post" })).json();
|
const { id } = await (await fetch(url, { method: "post" })).json();
|
||||||
do {
|
do {
|
||||||
response = await (await fetch(\`/api/requests/\${id}\`)).json();
|
response = await (await fetch(\`/api/requests/\${id}\`)).json();
|
||||||
console.log(response);
|
output.innerHTML = JSON.stringify(response, null, " ").replace(
|
||||||
output.innerHTML = JSON.stringify(response, null, " ");
|
/\\/static\\/.*.png/g,
|
||||||
console.log(response.output);
|
'<a href="$&">$&</a>'
|
||||||
stdout.innerHTML = response.output;
|
);
|
||||||
|
stdout.innerHTML = response.output.replace(
|
||||||
|
/\\/static\\/.*.png/g,
|
||||||
|
'<a href="$&">$&</a>'
|
||||||
|
);
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
} while (response.status !== "finished");
|
} while (response.status !== "finished");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user