14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);
5
6export const resumeConfig = {
7 // URL to fetch the resume JSON data. This should point to your raw resume JSON.
8 // If you want to host your resume JSON somewhere I recommend a setup like this on val town (https://www.val.town/v/iamseeley/resumeDetails) or a github gist.
9 // You can test out the resume view using my resume: https://iamseeley-resumedetails.web.val.run
5
6export const resumeConfig = {
7 // URL to fetch the resume JSON data. This should point to your raw resume JSON.
8 // If you want to host your resume JSON somewhere I recommend a setup like this on val town (https://www.val.town/v/iamseeley/resumeDetails) or a github gist.
9 // You can test out the resume view using my resume: https://iamseeley-resumedetails.web.val.run
33
34 // Post the message so we can deal with large text data.
35 await fetch(`/post-message?threadId=${input.getAttribute("data-thread-id")}`, {
36 method: "post",
37 body: msgDiv.textContent,
147 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
148});
149export default app.fetch;
32 // Post the message so we can deal with large text data.
33 try {
34 await fetch(`/post-message?threadId=${input.getAttribute("data-thread-id")}`, {
35 method: "post",
36 body: msgDiv.textContent,
169});
170
171export default app.fetch;
133 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
134});
135export default app.fetch;
133 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
134});
135export default app.fetch;
133 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
134});
135export default app.fetch;
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
2
3const EMOJI_DATA_URL = "https://unicode.org/Public/emoji/15.1/emoji-zwj-sequences.txt";
4
5export async function getCompoundEmojis(): Promise<string[]> {
6 const data = await fetchText(EMOJI_DATA_URL);
7 let result: string[] = [];
8 const lines = data.split("\n");
12 }
13 url = "https://r.jina.ai/" + url
14 const response = await fetch(url);
15 if (!response.ok) {
16 throw new Error(`HTTP error! Status: ${response.status}`);
19 return data;
20 } catch (error) {
21 console.error('Error fetching the URL:', error);
22 return 'Error fetching the content.';
23 }
24};
129});
130
131export default app.fetch;
132