919 });
920
921 return app.fetch(req);
922};
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;
1import { parseXML } from "https://esm.town/v/g000m/parseXML";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
3import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";
4
5export let fetchXML = (url: string) =>
6 fetchText(normalizeURL(url))
7 .then(parseXML);
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;
7
8 useEffect(() => {
9 fetch("/keywords")
10 .then(response => response.json())
11 .then(data => setKeywords(data));
5 url.searchParams.set("start", String(start))
6 url.searchParams.set("max_results", String(max_results))
7 const response = await fetch(url)
8 const text = await response.text()
9 if (!response.ok) {
10app.get("/", async (c) => c.html(await sqlite_admin_tables()));
11app.get("/:table", async (c) => c.html(await sqlite_admin_table(c.req.param("table"))));
12export default basicAuth(app.fetch, { verifyUser: (_, password) => verifyToken(password) });
250 e.preventDefault();
251 const finalAmount = showCustomAmount ? parseFloat(customAmount) : amount;
252 const response = await fetch("/create-checkout-session", {
253 method: "POST",
254 headers: { "Content-Type": "application/json" },
510 }
511
512 // Fetch all tips for the root endpoint
513 const allTips = await sqlite.execute(
514 `SELECT name, amount, comment, timestamp FROM ${KEY}_payments_${SCHEMA_VERSION} ORDER BY amount DESC`,
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));