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();
|
||||
do {
|
||||
response = await (await fetch(\`/api/requests/\${id}\`)).json();
|
||||
console.log(response);
|
||||
output.innerHTML = JSON.stringify(response, null, " ");
|
||||
console.log(response.output);
|
||||
stdout.innerHTML = response.output;
|
||||
output.innerHTML = JSON.stringify(response, null, " ").replace(
|
||||
/\\/static\\/.*.png/g,
|
||||
'<a href="$&">$&</a>'
|
||||
);
|
||||
stdout.innerHTML = response.output.replace(
|
||||
/\\/static\\/.*.png/g,
|
||||
'<a href="$&">$&</a>'
|
||||
);
|
||||
await sleep(1000);
|
||||
} while (response.status !== "finished");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user