1function run() {
2 const target = new URL(document.URL);
3 target.hostname = "vladimyr-mdviewer.web.val.run";
2import { gfm } from "https://esm.town/v/pomdtr/gfm";
3
4export async function readmeToHtmlResponse(author: string, name: string) {
5 return new Response(await readmeToHtml(author, name), {
6 headers: {
10}
11
12export async function readmeToHtml(author: string, name: string) {
13 const markdown = await readme(author, name);
14 return gfm(markdown);
15}
16
17export async function readme(author: string, name: string) {
18 const { readme } = await api(`/v1/alias/${author}/${name}`);
19 return readme;
2import { email } from "https://esm.town/v/std/email?v=11";
3
4export async function sqliteBackupWithEmail() {
5 const { name, content } = await sqliteBackup();
6 return email({
17}
18
19export default function() {
20 return sqliteBackupWithEmail();
21}
28console.log(text);
29
30export async function weatherGPT() {
31 const result = await fetch(`https://hello.liaolile.com/test/weather`, {
32 method: "POST",
1export async function handlePlexWebhook(req: Request) {
2 console.log(await req.text());
3}
1export async function umdImport(url: string | URL, globals = {}) {
2 const res = await fetch(url);
3 if (!res.ok) throw new Error(await res.text());
16 },
17 });
18 new Function("module", "exports", "global", ...Object.keys(globals), code)(
19 module,
20 module.exports,
1function run() {
2 window.location = new URL(`/${document.URL}`, "https://vladimyr-posteval.web.val.run/");
3}
8const app = new Hono();
9
10async function bookmarkletUrl(author: string, name: string) {
11 const { code } = await api(`/v1/alias/${author}/${name}`);
12 const { code: minifedCode } = await minify(`(${code})();`);
1function run() {
2 const target = new URL(document.URL);
3 target.hostname = "esm.town";
5## Usage
6
7You val should export an anonymous function, containing the code that will run when the bookmarklet is triggered.
8
9```typescript
A helper function to build a file's email
Simple functional CSS library for Val Town
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.