moderator-toolbox-nxg-for-reddit / modules/comment/oldReddit/hideOldComments

modules/comment/oldReddit/hideOldComments

Functions

createHideOldCommentsHandlers()

createHideOldCommentsHandlers(adapter): object

Defined in: extension/data/modules/comment/oldReddit/hideOldComments.tsx:89

Creates handlers for the hide-old-comments button in the commentThreadControls UI location. Call lifecycle.mount(handlers.cleanup) in index.ts.

Parameters

adapter

CommentModuleAdapter

The platform adapter used to find, collapse, and expand old comment things.

Returns

object

Handlers for the hide-old toggle click and the old-expand click, plus a cleanup function.

cleanup()

cleanup(): void

Returns

void

handleHideOldClick()

handleHideOldClick(): void

Returns

void

handleOldExpandClick()

handleOldExpandClick(element): void

Parameters
element

Element

Returns

void


createHideOldCommentsSetup()

createHideOldCommentsSetup(): (() => void) | null

Defined in: extension/data/modules/comment/oldReddit/hideOldComments.tsx:70

Provides the commentThreadControls UI location on the comment-visits title element, widening the comment-visits box if present. Performs the DOM query and DOM manipulation; call lifecycle.mount(cleanup) in index.ts.

Returns

(() => void) | null

A cleanup function, or null if the comment-visits title element was not found.