7async function fetchRandomJoke() {
8 const response = await fetch(
9 "https://official-joke-api.appspot.com/random_joke",
10 );
11 return response.json();
57 const [copyNotification, setCopyNotification] = useState(false);
58
59 const generateApiKey = () => {
60 const newApiKey = crypto.randomUUID().replace(/-/g, '');
61 setInput(newApiKey);
62 setHashedValue(newApiKey);
63 };
64
132 value={input}
133 onChange={(e) => setInput(e.target.value)}
134 placeholder="API Key or Text to Hash"
135 style={{
136 width: '100%',
146 }}>
147 <button
148 onClick={generateApiKey}
149 style={{
150 flex: 1,
153 }}
154 >
155 Generate API Key
156 </button>
157 <button
36}
37
38function capitalizeName(name) {
39 if (!name) return "";
40 return name
119 placeholder="Recipient's Name"
120 value={recipientName}
121 onChange={(e) => setRecipientName(capitalizeName(e.target.value))}
122 required
123 />
129 placeholder="Your Name (Sender)"
130 value={senderName}
131 onChange={(e) => setSenderName(capitalizeName(e.target.value))}
132 required
133 />
381 <title>Thank You Note for ${note.recipient_name}</title>
382 <style>${css}</style>
383 <link href="https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap" rel="stylesheet">
384 </head>
385 <body>
442 <title>Thank You Note Generator</title>
443 <style>${css}</style>
444 <link href="https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap" rel="stylesheet">
445 </head>
446 <body>
1async function fetchRandomJoke() {
2 const response = fetch(
3 "https://official-joke-api.appspot.com/random_joke",
4 );
5 return response.json;
500 intervalId = setInterval(async () => {
501 try {
502 const response = await fetch("/api/progress");
503 if (!response.ok) {
504 throw new Error(`HTTP error! status: ${response.status}`);
523 setError(null);
524 try {
525 const response = await fetch("/api/check-links", {
526 method: "POST",
527 headers: {
693 const url = new URL(request.url);
694
695 if (url.pathname === "/api/progress" && request.method === "GET") {
696 const now = new Date();
697 if (lastProgressUpdate && currentProgress) {
710 }
711
712 if (url.pathname === "/api/check-links" && request.method === "POST") {
713 let requestBody;
714 try {
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
189 <head>
190 <title>Val Email Generator</title>
191 <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap" rel="stylesheet">
192 <meta name="viewport" content="width=device-width, initial-scale=1">
193 <style>${css}</style>
59async function relay() {
60 const reqDev = await fetch(
61 `https://devtools.devprod.cloudflare.dev/js_app?wss=%2Fplayground.devprod.cloudflare.dev%2Fapi%2Finspector%3Fuser%3Db540c24b3817eaad0241a2baffdd493229c279357c134cd0a1ade2388c398b7d%26h%3D87502d4ecedde10987fee740e6c9ae116ea74e13a6cb62c6efc24237ec337d2b&theme=systemPreferred&domain=workers+playground`,
62 {},
63 );