/// /// /// /** @jsx h */ import { h, render } from "../preact/mod.tsx"; import { App } from "./App.tsx"; import { Scrapbox } from "../scrapbox-jp%2Ftypes/userscript.ts"; declare const scrapbox: Scrapbox; const app = document.createElement("div"); const shadowRoot = app.attachShadow({ mode: "open" }); document.body.append(app); const ops = await new Promise( (resolve) => render(, shadowRoot) ); scrapbox.PageMenu.addItem({ title: "Ex Drawing", onClick: () => { ops?.open?.(); }, });