import { parse } from "../scrapbox-parser/mod.ts"; import { convert } from "../Scrapbox記法をTeX記法に変換するScript/mod.ts"; import { Scrapbox } from "../scrapbox-jp%2Ftypes/userscript.ts"; declare const scrapbox: Scrapbox; scrapbox.PopupMenu.addButton({ title: "TeX", onClick: (text) => { navigator.clipboard.writeText(convert(parse(text))) .catch((e) => { console.error(e); alert(`${e.name} ${e.message}\n\n${e.stack}`); }); return undefined; }, });