dynamiciframemain.ts1 match
12<title>Iframe Content</title>
13<script>
14function updateParentHeight() {
15//const height = document.documentElement.scrollHeight;
16const height = document.documentElement.getBoundingClientRect().height;
72type PagerDutyWebhook = z.infer<typeof PagerDutyWebhookSchema>;
7374// Helper function to format Discord message
75function formatDiscordMessage(webhook: PagerDutyWebhook): string {
76const { event } = webhook;
77const { data } = event;
85}
8687async function getBody(req: Request) {
88try {
89return await req.json();
untitled-3613main.tsx1 match
1export default async function() {
2return { message: "Hello from Val Town!" };
3}
5253// ✅ esm.town requires this to be the export
54export default async function handler(req: Request): Promise<Response> {
55const html = renderToString(<RedirectHTML />);
56return new Response("<!DOCTYPE html>\n" + html, {
safwqLayout.tsx1 match
2import type { ReactNode } from "npm:react@18.2.0";
34export function Layout({ children }: { children: ReactNode }) {
5return (
6<html lang="en">
adventofcode2015solutions.ts1 match
1export function day1() {
2return "hello world";
3}
adventofcode2015main.tsx10 matches
8}
910function DateGrid({ selectedDate, onDateSelect }: DateGridProps) {
11// Generate dates 1-25 for Advent of Code
12const dates = Array.from({ length: 25 }, (_, i) => i + 1);
46}
4748function VerifyAttempted({ isVerified, onVerificationChange }: VerifyAttemptedProps) {
49const [inputValue, setInputValue] = useState("");
5093}
9495function ViewSolution({ selectedDay }: ViewSolutionProps) {
96const [solutionCode, setSolutionCode] = useState<string>("");
97const [loading, setLoading] = useState(true);
109const solutionsContent = await response.text();
110111// Extract the specific day's function
112const functionName = `day${selectedDay}`;
113const functionRegex = new RegExp(`function ${functionName}\\(\\)[^{]*{[^}]*}`, "s");
114const match = solutionsContent.match(functionRegex);
115116if (match) {
141}
142143function App() {
144const [selectedDate, setSelectedDate] = useState<number | null>(null);
145const [isVerified, setIsVerified] = useState(false);
177}
178179function client() {
180createRoot(document.getElementById("root")).render(<App />);
181}
185}
186187function server(req: Request): Promise<Response> {
188return new Response(
189`
datastar-denomain.tsx1 match
1import { ServerSentEventGenerator } from "npm:datastar-sdk/web";
23export default async function(req: Request) {
4const url = new URL(req.url);
5
5import { quoteCount } from "./constants.ts";
67function client() {
8const root = document.getElementById("root");
9if (root) {
14if (typeof document !== "undefined") { client(); }
1516export default async function server(request: Request): Promise<Response> {
17const requestPath = new URL(request.url).pathname;
18if (requestPath === "/quote") {
52<script>
53window.dataLayer = window.dataLayer || [];
54function gtag(){dataLayer.push(arguments);}
55gtag('js', new Date());
56gtag('config', 'G-JFTLXQP7TR');
1import { blob } from "https://esm.town/v/std/blob";
23export async function uploadBlobProxy(req: Request): Promise<Response> {
4// Asegurarse de que la solicitud sea un POST
5if (req.method !== "POST") {