moderator-toolbox-nxg-for-reddit / modules/announcements/dom

modules/announcements/dom

Functions

setupAnnouncementBuilder()

setupAnnouncementBuilder(lifecycle): void

Defined in: extension/data/modules/announcements/dom.tsx:78

Registers the announcements UI for mods of ANNOUNCEMENTS_SUB:

  • a per-post “Make Toolbox announcement” composer button, and

  • a modbar “Manage announcements” button (list / remove / new).

Both render only in the announcements subreddit (cheap synchronous checks); IsModGuard then hides them unless the current user moderates it.

Parameters

lifecycle

Lifecycle

The module lifecycle; renderers are unregistered on cleanup.

Returns

void