themoeway / yomitan

Japanese pop-up dictionary browser extension. Successor to Yomichan.
https://chromewebstore.google.com/detail/yomitan/likgccmbimhjbgkjambclfkhldnlhbnn
GNU General Public License v3.0
989 stars 76 forks source link

Is it possible to port it to Anki? #240

Closed ganqqwerty closed 2 months ago

ganqqwerty commented 10 months ago

A lot of Yomitan is written on js+html, and it seems that the amount of Chrome-specific or Firefox specific code is not so big. Do you think it's possible to make it an Anki extension?

praschke commented 10 months ago

Anki uses QtWebEngine, which does not support webextensions. This is not possible.

ganqqwerty commented 10 months ago

Ah, yeah, sure, sorry for misunderstanding. I do understand that the existing code can't be used as-is to be executed on QtWeb engine. Could you help me estimating the amount of rewriting needed to produce an anki-compatible fork? Imagine that you need to create a webapplication where the core features of yomitan is supported (in one particular tab), the dictionaries are pre-installed, but there's no access to Chrome Extension API. I see that the code that uses the chrome object will need to be rewritten. What else will not work? The usage of IndexedDB possibly? Audio?

MarvNC commented 10 months ago

Funny thing, Yomichan started out as an Anki extension IIRC. But in any case, you can just use ankiweb if you really need this for whatever reason. I think there might have been a debug mode to show cards from the Anki application in a browser as well, not sure. Might be worth asking in the Anki forums.