1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
8 isInterval?: boolean;
9 }) =>
10 `fetch('https://api.val.town/eval/@vez.editVal(${JSON.stringify(body)})')`;
11 return res.send(`<h1>Shitty Val Town 2</h1>
12${(await getAllVals("@vez")).map(({ code, name }) => {
13 const editorId = `${name}-editor`;
14 const onClick = `(document.getElementById('${name}-button').textContent = 'save 🔄'), fetch('https://api.val.town/eval/@vez.editVal', { method: 'POST', body: JSON.stringify({ name: '${name}', code: document.getElementById('${editorId}').value })}).then(()=>(document.getElementById('${name}-button').textContent = 'save ✅'))`;
15 return `<h2>${name}</h2>
16<textarea id="${editorId}" rows="20" cols="120">${escapeHtml(
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
8 };
9}) {
10 return fetchJSON(`https://api.twitter.com/2/tweets`, {
11 method: "POST",
12 headers: {
1export function myApi(name) {
2 return "hi " + name;
3}
12 .map((item) =>
13 postToMastodon(
14 "https://mastodon.social/api/v1",
15 process.env.mastodonAccessToken,
16 `${item.title.charAt(0) === "↗" ? "🔗" : "✍️"} ${
7 | "Bullet"
8 | "Computer"
9 | "Rapid"
10 | "Top Rated"
11 | "Blitz"