moderator-toolbox-nxg-for-reddit / modules/announcements/display
modules/announcements/display¶
Functions¶
displayAnnouncements()¶
displayAnnouncements():
Promise<void>
Defined in: extension/data/modules/announcements/display.ts:58
Fetches announcements from the toolbox_nxg wiki, filters out not-yet-due (scheduled), irrelevant-build, and already-seen notes, then shows the popup for any that remain. No-op in dev builds.
Returns¶
Promise<void>
filterByBuildType()¶
filterByBuildType(
notes,build):AnnouncementNote[]
Defined in: extension/data/modules/announcements/display.ts:38
Filters notes to only those relevant for the given build type.
Notes with no buildTypes field are shown on all builds. Only called for
non-dev builds (the display path returns early on dev), so build is narrowed
to the values a note can target.
Parameters¶
notes¶
build¶
"stable" | "beta"
Returns¶
filterUnseen()¶
filterUnseen(
notes,seenIds):AnnouncementNote[]
Defined in: extension/data/modules/announcements/display.ts:48
Filters notes to only those whose IDs are not in seenIds.
Parameters¶
notes¶
seenIds¶
string[]