Debian Codegraph @

extensions/Echo/modules/hooks.txt

raw
1 hooks.txt
2
3 This documents Echo's client-side hooks:
4
5 'ext.echo.notifications.beforeRender': Before notification widgets are rendered
6 the wrapper of the notifications and the individual notification jQuery elements
7 are passed to this hook, which can modify the DOM or take other actions.
8 * $wrapper: The jQuery object that is the wrapper for the notification items
9 * $elements: A jQuery group of all notification elements that are about to be rendered.
10
11 'ext.echo.badge.countChange': When the count changes in the Notifications popup
12 badge, this hook is fired with the new count.
13 * type: Notifications type that the badge represents. Can be 'message', 'alert' or 'all'
14 * count: The new numerical count in the notifications popup.
15 * label: The label for this number, for presentation purposes.
16
17 'ext.echo.popup.onInitialize': Fired when the popup is opened and after notifications
18 were fetched from the API.
19 * types: Notifications type that the badge represents. Can be 'message', 'alert' or 'all'
20 * controller: The instance of the controller responsible for the specific popup operations
21
22 'ext.echo.NotificationBadgeWidget.onInitialize': Fired when the badge is initialized
23 * badge: Instance of mw.echo.ui.NotificationBadgeWidget
24
25 'ext.echo.special.onInitialize': Fired when the special page is initialized. Note that this
26 is also fired whenever the special page notification display is changed, like when clicking
27 a filter, changing pagination, or viewing notifications for a remote wiki or page.
28 * types: Notifications type that the badge represents. Can be 'message', 'alert' or 'all'
29 * controller: The instance of the controller responsible for the specific popup operations