Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/** @jsxImportSource npm:hono@3/jsx */
import { Hono } from "npm:hono";
const app = new Hono();
app.get("/", async (c) => {
const depth = parseInt(c.req.query("depth")) || 0;
const nextDepth = depth + 1;
const spinnerGif = "https://media4.giphy.com/media/9UqRcQHzBou6A/giphy.gif?cid=6c09b952dz5ee3qoyzfg0tgxlwhpc46e29h7p432xjb7ices&ep=v1_gifs_search&rid=giphy.gif&ct=g";
return c.html(
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style> {`
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
#app {
width: 100%;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
iframe {
border: none;
}
.hidden {
display: none;
}
`}
</style>
</head>
<body>
<div id="app">
<img src={spinnerGif} alt="Loading..." id="spinner" style="width:200px; height:200px; cursor:pointer;" />
<iframe id="nested-frame" width="75%" height="75%" class="hidden" src="https://www.val.town/embed/iamseeley/valception" title="Val Town" frameborder="0" allow="web-share" allowfullscreen></iframe>
</div>
<script type="module" src="https://esm.town/v/iamseeley/lavenderHerring"></script>
</body>
</html>
);
});
export default app.fetch;
iamseeley-valception.web.val.run
June 18, 2024