15 lines
368 B
HTML
15 lines
368 B
HTML
|
<!DOCTYPE html>
|
||
|
<meta charset="utf-8" />
|
||
|
<pre></pre>
|
||
|
<script>
|
||
|
const el = document.querySelector("pre");
|
||
|
const id = location.hash.slice(1);
|
||
|
const ws = new WebSocket(
|
||
|
location.origin.replace(/^http/, "ws") + "/logs/socket/" + id
|
||
|
);
|
||
|
window.ws = ws;
|
||
|
ws.addEventListener("message", async (event) => {
|
||
|
el.append(await event.data.text());
|
||
|
});
|
||
|
</script>
|