Wikipedia link previews for Logseq as pop-ups. Click a Wikipedia link in your notes and instead of leaving the app, you get a small popup with the article content, themed to your Logseq theme.
It does three things, all of them small:
- Tags Wikipedia links with a tiny
Wglyph so you can spot them. - On click, opens a popup with the article body. If the URL has a
#sectionanchor, only that section is shown. Images, infoboxes, the lot. ESC or click outside to close. Drag the bottom-right corner to resize. - When you paste a Wikipedia URL into a block, it auto-converts to
[Article Title](url)— the title comes from Wikipedia, not from you. TheWglyph next to the rendered link is purely a display thing; it never ends up in the markdown.
That's it. No settings panel, no sync, no AI.
You'll need Node 18+ and a Logseq build with developer mode enabled (Settings → Advanced → Developer mode).
npm install
npm run buildIn Logseq: Plugins → "Load unpacked plugin" → point at this directory. Reload after each rebuild (Plugins → ⋯ → Reload).
- Wikipedia content is fetched live every time. There's no cache. If you're offline, the popup says so and gets out of the way.
- The popup respects
--ls-primary-background-color,--ls-link-text-color, and friends, so dark themes should work without a separate stylesheet. - HTML coming back from
action=parseis sanitized — scripts, iframes, inlineon*handlers, and non-http(s)URLs are stripped before anything is inserted into the host document. It is still Wikipedia's HTML though, so if Wikipedia ships you weird markup, weird markup is what you'll see. - The W icon is appended as a
<span>child of the anchor element after the block renders. Your block's markdown source stays clean; copying the link text doesn't drag the icon along. - Modifier-clicks (cmd / ctrl / shift / middle) bypass the popup and open in your browser like a normal link.
MIT