atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.84k stars 411 forks source link

An annotation API? #2247

Open Ambrevar opened 2 years ago

Ambrevar commented 2 years ago

Currently it seems we don't have a good way to handle annotations beyond link hinting.

By annotation, I mean a way to display contextual information on specific parts of a document. Example: hover or click on a highlighted word to get its definition / translation.

@hendursaga mentioned two resources worth exploring:

odanoburu commented 10 months ago

It would be really nice if Nyxt would display the annotations I made using annotate-highlighted-text in the page itself (or a local copy, since the page may change and the annotations might be orphaned).

hover or click on a highlighted word to get its definition / translation.

That's something I'd love to have, to have a bare-bones yomichan in Nyxt.

PS: as of 3.9.2 (installed via flathub), show-annotations-for-current-url doesn't seem to work, it gives me a Page could not be loaded. error.

aadcg commented 10 months ago

@odanoburu I'm able to reproduce the bug. I'll open a PR fixing it.

aadcg commented 10 months ago

@odanoburu thanks for reporting and please open issues whenever you find more!