Background
I am implementing JavaScript Addons Support for AnkiDroid. But it will become AnkiDroid specific features. So, my motivation here use to make it cross platform.
Addons Type
I have created two types of addon, Note Editor and Reviewer
-
Reviewer
Anki ecosystem uses webview for card displaying, so here JavaScript code injected to reviewer. It changes UI or display cards information JS API. -
Note Editor
I have used js-evaluator in AnkiDroid to execute JS code.
For iOS there are better options to run js code like javascriptcore
Addons Hosting
The addons are hosted on npmjs.com.
Why?
It will be better to have same addons for all Anki versions. Otherwise separate addons have to implemented for each platform.
The AnkiDroid JS Addons feature is still in development so I think it will be better to have one implementations instead of three implementations.