moderator-toolbox-nxg-for-reddit / modules/betterbuttons/features/removeConfirmation

modules/betterbuttons/features/removeConfirmation

Functions

createRemoveConfirmationHandlers()

createRemoveConfirmationHandlers(): object

Defined in: extension/data/modules/betterbuttons/features/removeConfirmation.ts:12

Creates handlers that skip the remove/approve confirmation step.

Returns

An object containing handleApproveClick and handleRemoveClick.

handleApproveClick()

handleApproveClick(element): void

Immediately confirms an approve action without waiting for user confirmation.

Parameters
element

Element

The approve toggle button that was clicked.

Returns

void

handleRemoveClick()

handleRemoveClick(element): Promise<void>

Immediately confirms a remove action, unless the removal-reasons module is active and comment reasons are enabled (in which case the reasons dialog handles its own flow). Spam removals always bypass the confirmation regardless.

Parameters
element

Element

The remove toggle button that was clicked.

Returns

Promise<void>