Skip to content

[Feature] JavaScript Addons support for AnkiDroid #7959

@krmanik

Description

@krmanik

Is your feature request related to a problem? Please describe.
For Anki, addons can be made using Python. But for AnkiDroid JavaScript may be option to implement some of the addons. There are already some API have been exposed in AnkiDroid JS API. But deck developer have to tell or guide user to add HTML/CSS/JS. So this is idea for having js addons.

The addons made in javascript so it will be used in Anki Ecosystem as Anki Desktop and Anki Mobile use webview for reviewer. But the AnkiDesktop and AnkiMobile have not exposed the API like AnkiDroid JS API. So, in #7958 PR there are implementation for containing the addons to AnkiDroid only. It can be extented for AnkiDesktop and AnkiMobile if both have API.

But GOAL here is to have addon support so that all deck should share same HTML/CSS/JS like addon for AnkiDroid. The addons will use AnkiDroid JS API.

Describe the solution you'd like
#7958 . I am implementing this Feature but it requires some discussion and possible changes to make this feature more useful.

Describe alternatives you've considered
The alternative solution will be copying pasting the code to Card template manually.

Additional context
The workflow will be

  1. User will download the addon .adaddon (AnkiDroid Addons) or .jsaddon (JavaScript Addon) files
  2. Install using in app option (to be implemented)
  3. Enable the addons, so that the contents of addons will be added to reviewer during review.

捕获

Example of some Anki Addons that can be implemented
1. Progress Bar
2. Custom buttons at bottom
3. Card layout changes
4. Cards info during review
5. Clickable tag
etc...

The more API get exposed the more features will addon will have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Keep Openavoids the stale bot

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions