# Hook for "Current Card (Browse)" (card info)?

**URL:** <https://forums.ankiweb.net/t/hook-for-current-card-browse-card-info/46361>\
**Category:** Add-ons\
**Created:** [June 23, 2024, 6:16am UTC](https://forums.ankiweb.net/t/hook-for-current-card-browse-card-info/46361 "2024-06-23T06:16:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleks\_ya](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/aleks_ya/32/22205_2.png) [@aleks\_ya](https://forums.ankiweb.net/u/aleks_ya)\
**Post date:** [June 23, 2024, 6:16am UTC](https://forums.ankiweb.net/t/hook-for-current-card-browse-card-info/46361/1 "2024-06-23T06:16:23Z")

</div>

Is any hook that is invoked before opening the “Current Card (Browser)” window by “Cards → Card Info…” menu item?

How to modify content of the “Current Card (Browser)” window from an addon?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/4/b/4b9d4ced4289f120849253413eba3a8df253daea.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/6/4/64c2e047d23e7776e3eb439f49c5c105ad65a5c8.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [June 24, 2024, 12:42am UTC](https://forums.ankiweb.net/t/hook-for-current-card-browse-card-info/46361/2 "2024-06-24T00:42:07Z")

</div>

You could try the [gui\_hooks.webview\_did\_inject\_style\_into\_page](https://github.com/ankitects/anki/blob/79917bbd2d71a0e28c0cf19bf50a850c4e8b4109/qt/tools/genhooks_gui.py#L740) hook.

Try the example given there in the docstring. Use AnkiWebViewKind.BROWSER\_CARD\_INFO to check for the Card Info screen.

---

<div class="post-metadata">

**Author:** ![sound](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/sound/32/25233_2.png) [@sound](https://forums.ankiweb.net/u/sound)\
**Post date:** [April 21, 2025, 10:05am UTC](https://forums.ankiweb.net/t/hook-for-current-card-browse-card-info/46361/3 "2025-04-21T10:05:12Z")

</div>

Hello, once you got that webview, is there any clean method to get the Card ID related to it ?
