Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
import { BrowserContext } from "https://esm.town/v/pomdtr/browser";
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
export default function(ctx: BrowserContext) {
const { author, name } = extractValInfo(ctx.tab.url);
ctx.copy(`[@${author}/${name}](${ctx.tab.url})`);
}
// #web
February 6, 2024