moderator-toolbox-nxg-for-reddit / modules/betterbuttons/features/modSave
modules/betterbuttons/features/modSave¶
Functions¶
createModSaveHandlers()¶
createModSaveHandlers():
object
Defined in: extension/data/modules/betterbuttons/features/modSave.tsx:48
Creates the mod-save toggles and their handlers.
Returns¶
Handlers handleToggleChange and handleSaveClick for index.ts to delegate, plus a
cleanup function to pass to lifecycle.mount.
cleanup()¶
cleanup():
void
Returns¶
void
handleSaveClick()¶
handleSaveClick(
element):void
Notes the requested action when a reply is saved with either toggle on, then watches for the new comment node so the distinguish can be applied to it.
Parameters¶
element¶
Element
Returns¶
void
handleToggleChange()¶
handleToggleChange(
element):void
Keeps the two toggles mutually exclusive within their own (possibly cloned) reply form.
Parameters¶
element¶
Element
Returns¶
void