Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=fetch&page=505&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 7880 results for "fetch"(880ms)

imgGenUrlmain.tsx1 match

@ibodev•Updated 7 months ago
14 await blob.setJSON(genKey(key), url);
15 }
16 return new Response((await fetch(url)).body, { headers: { "content-type": "image/jpg" } });
17}

BrowserbaseFetcherFromURLREADME.md1 match

@willthereader•Updated 7 months ago
1Migrated from folder: fanficSearcher/BrowserBaseAttempt/BrowserbaseFetcherFromURL

sqliteExplorerAppmain.tsx4 matches

@florian42•Updated 7 months ago
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 })));

excaliGridmain.tsx4 matches

@all•Updated 7 months ago
39
40 useEffect(() => {
41 const fetchSvg = async () => {
42 try {
43 const response = await fetch(svgUrl);
44 const svgContent = await response.text();
45 setSvg(svgContent);
46 } catch (error) {
47 console.error("Error fetching SVG:", error);
48 }
49 };
50
51 fetchSvg();
52 }, [svgUrl]);
53

lastloginmain.tsx2 matches

@mrsnor•Updated 7 months ago
102 tokenUrl.searchParams.set("state", store.state);
103
104 const tokenResp = await fetch(tokenUrl.toString());
105 if (!tokenResp.ok) {
106 throw new Error(await tokenResp.text());
111 };
112
113 const resp = await fetch("https://lastlogin.io/userinfo", {
114 headers: {
115 Authorization: `Bearer ${access_token}`,

blob_adminmain.tsx2 matches

@ndyg•Updated 7 months ago
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));

dependentHarlequinTigermain.tsx7 matches

@willthereader•Updated 7 months ago
23 console.log("Searching for threadmark buttons...");
24 const buttons = document.querySelectorAll(
25 "div.structItem-cell--main[data-xf-click=\"threadmark-fetcher\"]",
26 );
27 console.log(`Found ${buttons.length} potential threadmark buttons.`);
29 let newButtonsClicked = false;
30 for (let button of buttons) {
31 const fetchUrl = button.dataset.fetchurl;
32 const originalTitle = button.getAttribute("data-original-title");
33
34 if (
35 fetchUrl && fetchUrl.includes("threadmarks-load-range")
36 && fetchUrl.includes("min") && fetchUrl.includes("max")
37 && originalTitle && originalTitle.includes("hidden")
38 && !clickedButtons.has(fetchUrl)
39 ) {
40 console.log(`Clicking threadmark button with fetchUrl: ${fetchUrl}`);
41 button.click();
42 await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for load
43 clickedButtons.add(fetchUrl);
44 newButtonsClicked = true;
45 totalClicked++;

freesoundSearchmain.tsx1 match

@sedson•Updated 7 months ago
33 page: nth + 1,
34 });
35 const res = await fetch(`${BASE_URL}/search/text/?${queryString}`);
36 const json = await res.json();
37 return json.results.map((sound: FreeSoundResponse) => ({

iframeGridInfinitemain.tsx2 matches

@maxm•Updated 7 months ago
142 setIsLoading(true);
143 try {
144 const response = await fetch('/api/submit-url', {
145 method: 'POST',
146 headers: {
162 const loadUrlDatabase = async () => {
163 try {
164 const response = await fetch('/api/load-urls');
165 if (!response.ok) throw new Error('Failed to load URLs');
166 const loadedUrls = await response.json();

drumMachinemain.tsx6 matches

@mo3ly•Updated 7 months ago
267 setIsLoading(true);
268 for (let i = 0; i < tracks.length; i++) {
269 const result = await fetchSound(tracks[i].search, 0);
270 if (result) {
271 setTracks(prevTracks => prevTracks.map((track, index) =>
277 };
278
279 const fetchSound = async (query, index) => {
280 try {
281 const response = await fetch(`${searchUrl}?q=${encodeURIComponent(query)}`);
282 const data = await response.json();
283 if (data.results && data.results.length > 0) {
284 const sound = data.results[index % data.results.length];
285 const audioResponse = await fetch(sound.previews["preview-hq-mp3"]);
286 const arrayBuffer = await audioResponse.arrayBuffer();
287 const decodedData = await audioCtx.current.decodeAudioData(arrayBuffer);
290 }
291 } catch (error) {
292 console.error("Error fetching sound:", error);
293 }
294 return null;
357 setTracks(newTracks);
358
359 const result = await fetchSound(newSearch, index - 1);
360 if (result) {
361 newTracks[trackIndex] = {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago