Possible Hook For DeckBrowser._render_deck_node

Would it be possible to add a hook so that you can add a button / html to the end of a entry in the deckbrowser, like the ‘render’ button here:

At the moment the only way I have been able to do this is by overwriting DeckBrowser._render_deck_node

It isn’t as simple as extending the function (so I can’t do monkey patching either), because the code also adds entries for subdecks - the extra html needs to be between the #options and #children lines


(the last few lines of DeckBrowser._render_deck_node)

links:
the deckbrowser class in anki
the source code for my add-on with the render buttons

1 Like

The decks screen is likely to be rewritten soon, so any hook that was added at the moment would be short-lived.