3536async function execute(statement: InStatement, args?: InArgs): Promise<ResultSet> {
37const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38method: "POST",
39headers: {
5051async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
52const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
53method: "POST",
54headers: {
decisiveRoseFelidaemain.tsx6 matches
1516useEffect(() => {
17async function fetchWeather() {
18try {
19const response = await fetch(
20`https://api.open-meteo.com/v1/forecast?latitude=${location.latitude}&longitude=${location.longitude}¤t_weather=true&hourly=temperature_2m,relativehumidity_2m,windspeed_10m,weathercode`
21);
24setError('');
25} catch (error) {
26console.error("Weather fetch failed", error);
27setError('Failed to fetch weather data');
28}
29}
30fetchWeather();
31}, [location]);
3270
71try {
72const geoResponse = await fetch(
73`https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(locationInput)}&count=1&language=en&format=json`
74);
scarletSolemain.tsx2 matches
32url: "https://d000d.com/e/pklnjh0gnnou",
33};
34const req = await fetch("http://turnstileTest.pythonanywhere.com/solve", {
35method: "POST",
36headers: { "Content-Type": "application/json" },
63return c.json({ worked: true });
64});
65export default app.fetch;
switchExtractormain.tsx1 match
7"rapid-cloud.tv": "https://rapid-cloud.co/js/player/prod/e6-player-v2-debug.min.js",
8};
9const req = await fetch(site["megacloud.tv"]);
10const str = await req.text();
11let m;
scraper_templatemain.tsx1 match
9const variable: string = await blob.getJSON(blobKey) ?? "";
1011const response = await fetch(scrapeURL);
12const body = await response.text();
13const $ = cheerio.load(body);
3536async function execute(statement: InStatement): Promise<ResultSet> {
37const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38method: "POST",
39headers: {
4950async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
51const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
52method: "POST",
53headers: {
1007app.get("/", (c) => c.html(html));
10081009// Export app.fetch for Val Town, otherwise export app
1010export default (typeof Deno !== "undefined" && Deno.env.get("valtown")) ? app.fetch : app;
1011
blob_adminmain.tsx22 matches
233const [isDragging, setIsDragging] = useState(false);
234235const fetchBlobs = useCallback(async () => {
236setLoading(true);
237try {
238const response = await fetch(`/api/blobs?prefix=${encodeKey(searchPrefix)}&limit=${limit}`);
239const data = await response.json();
240setBlobs(data);
241} catch (error) {
242console.error("Error fetching blobs:", error);
243} finally {
244setLoading(false);
247248useEffect(() => {
249fetchBlobs();
250}, [fetchBlobs]);
251252const handleSearch = (e) => {
263setBlobContentLoading(true);
264try {
265const response = await fetch(`/api/blob?key=${encodeKey(clickedBlob.key)}`);
266const content = await response.text();
267setSelectedBlob({ ...clickedBlob, key: decodeKey(clickedBlob.key) });
268setEditContent(content);
269} catch (error) {
270console.error("Error fetching blob content:", error);
271} finally {
272setBlobContentLoading(false);
277const handleSave = async () => {
278try {
279await fetch(`/api/blob?key=${encodeKey(selectedBlob.key)}`, {
280method: "PUT",
281body: editContent,
289const handleDelete = async (key) => {
290try {
291await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
292setBlobs(blobs.filter(b => b.key !== key));
293if (selectedBlob && selectedBlob.key === key) {
306const key = `${searchPrefix}${file.name}`;
307formData.append("key", encodeKey(key));
308await fetch("/api/blob", { method: "POST", body: formData });
309const newBlob = { key, size: file.size, lastModified: new Date().toISOString() };
310setBlobs([newBlob, ...blobs]);
314}
315}
316fetchBlobs();
317};
318328try {
329const fullKey = `${searchPrefix}${key}`;
330await fetch(`/api/blob?key=${encodeKey(fullKey)}`, {
331method: "PUT",
332body: "",
343const handleDownload = async (key) => {
344try {
345const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
346const blob = await response.blob();
347const url = window.URL.createObjectURL(blob);
362if (newKey && newKey !== oldKey) {
363try {
364const response = await fetch(`/api/blob?key=${encodeKey(oldKey)}`);
365const content = await response.blob();
366await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
367method: "PUT",
368body: content,
369});
370await fetch(`/api/blob?key=${encodeKey(oldKey)}`, { method: "DELETE" });
371setBlobs(blobs.map(b => b.key === oldKey ? { ...b, key: newKey } : b));
372if (selectedBlob && selectedBlob.key === oldKey) {
382const newKey = `__public/${key}`;
383try {
384const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
385const content = await response.blob();
386await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
387method: "PUT",
388body: content,
389});
390await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
391setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
392if (selectedBlob && selectedBlob.key === key) {
401const newKey = key.slice(9); // Remove "__public/" prefix
402try {
403const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
404const content = await response.blob();
405await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
406method: "PUT",
407body: content,
408});
409await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
410setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
411if (selectedBlob && selectedBlob.key === key) {
chatgptchessmain.tsx3 matches
3637const { Chess } = await import("https://esm.sh/chess.js@1.0.0-beta.8")
38const position = (await fetch(`/game/${game_id}`).then(r => r.json())).fen
39const thinking = document.querySelector("#thinking")
40thinking.className = "transition-opacity opacity-0"
69thinking.className = "transition-opacity opacity-100"
7071const response = fetch(`/game/${game_id}`, {
72method: "POST",
73body: JSON.stringify({ san: move.san }),
278})
279280export default app.fetch
1/** @jsxImportSource npm:hono/jsx */
2import { fetch } from "https://esm.town/v/std/fetch";
3import { faker } from "npm:@faker-js/faker";
4import CryptoJS from "npm:crypto-js";
14"sec-ch-ua-mobile": "?0",
15"sec-ch-ua-platform": "\"Windows\"",
16"sec-fetch-dest": "empty",
17"sec-fetch-mode": "cors",
18"sec-fetch-site": "same-origin",
19"Referrer-Policy": "strict-origin-when-cross-origin",
20};
58}
59async function upload(formData: any, user: string) {
60const _ = await fetch("https://workers.cloudflare.com/playground/api/worker", {
61"headers": {
62...commonHeaders,
75app.get("/regUser", async (c) => {
76const uuid = await uuidGen();
77const uid = await fetch("https://workers.cloudflare.com/playground", {
78"headers": {
79"accept":
123headers: {
124"User-Agent": faker.internet.userAgent(),
125"Sec-Fetch-Dest": "iframe",
126"referer": "https://workers.cloudflare.com/",
127"Cookie": `token=${token}`,
153);
154});
155export default app.fetch;