55});
56
57export default valTownBadge(app.fetch, import.meta.url);
1import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
2const resp = await fetch("https://maxm-wasmblobhost.web.val.run/e5vpzt253pv5jxqfmygo7nytl5uvyn5c.wasm");
3const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
4export default async function(req: Request): Promise<Response> {
42})();
43
44let resp = await fetch("https://maxm-wasmBlobHost.web.val.run", {
45 method: "POST",
46 headers: {
57
58import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
59const resp = await fetch("${url}");
60const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
61export default async function(req: Request): Promise<Response> {
246 const formData = new FormData();
247 formData.append("audio", blob, "recording.wav");
248 const response = await fetch("/transcribe", { method: "POST", body: formData });
249 if (response.ok) {
250 const result = await response.text();
286 const language2Value = document.getElementById("language2").value;
287
288 const response = await fetch("/translate", {
289 method: "POST",
290 headers: { "Content-Type": "application/json" },
328
329 if (text && voice) {
330 const response = await fetch('/generate-speech', {
331 method: 'POST',
332 headers: { 'Content-Type': 'application/json' },
455});
456
457export default app.fetch;
243});
244
245export default app.fetch;
1import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
2const resp = await fetch("https://maxm-wasmBlobHost.web.val.run/jpxqvyy5tphiwehzklmioklpkpz4gpzs.wasm");
3const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
4export default async function(req: Request): Promise<Response> {
34
35import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
36const resp = await fetch("https://maxm-wasmBlobHost.web.val.run/jpxqvyy5tphiwehzklmioklpkpz4gpzs.wasm");
37const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
38export default async function(req: Request): Promise<Response> {
64
65 function save() {
66 return fetch('${thisWebURL()}/${name}', {
67 method: 'POST',
68 headers: {
34});
35
36export default app.fetch;
1// Altered from https://github.com/ericclemmons/medium-to-markdown
2
3const fetchJSON = async (url, startAt = 0) => {
4 const response = await fetch(url);
5 const text = await response.text();
6 const json = JSON.parse(text.slice(startAt));
10
11export const mediumToMarkdown = async (mediumLink) => {
12 const raw = await fetchJSON(mediumLink + "?format=json", 16);
13
14 if (raw.error) {
138 case 11:
139 var resource = (
140 await fetchJSON(
141 `https://medium.com/media/${iframe.mediaResourceId}?format=json`,
142 16,
150
151 case "MediaResourceTweet":
152 const tweet = await fetchJSON(
153 `https://publish.twitter.com/oembed?url=${resource.href}`,
154 );
165 case 14:
166 var resource = (
167 await fetchJSON(
168 `https://medium.com/media/${mixtapeMetadata.mediaResourceId}?format=json`,
169 16,