moderator-toolbox-nxg-for-reddit / store/contextMenu
store/contextMenu¶
Functions¶
addContextItem()¶
addContextItem(
id,options):void
Defined in: extension/data/store/contextMenu.ts:33
Adds or updates an item in the Toolbox context menu. No-ops when the page is running in an embedded frame.
Parameters¶
id¶
string
Stable identifier for this item; used for deduplication and removal.
options¶
The menu item’s content and behaviour (see AddContextItemOptions).
Returns¶
void
removeContextItem()¶
removeContextItem(
id):void
Defined in: extension/data/store/contextMenu.ts:52
Removes the context menu item with the given id. No-ops when the page is running in an embedded frame.
Parameters¶
id¶
string
Returns¶
void
Interfaces¶
AddContextItemOptions¶
Defined in: extension/data/store/contextMenu.ts:9
Options for adding a context menu item.
Properties¶
attention?¶
optionalattention?:boolean
Defined in: extension/data/store/contextMenu.ts:19
When true, briefly highlights the menu to draw the user’s attention.
dataAttributes?¶
optionaldataAttributes?:Record<string,string>
Defined in: extension/data/store/contextMenu.ts:17
Additional data-* attributes set on the <li> element.
icon¶
icon:
"modqueue"|"unmoderated"|"overlay"|"close"|"list"|"remove"|"modmail"|"comments"|"ban"|"mute"|"settings"|"add"|"delete"|"edit"|"archive"|"unarchive"|"addBox"|"addCircle"|"arrowLeft"|"arrowRight"|"dotMenu"|"dragHandle"|"flair"|"help"|"history"|"modlog"|"profile"|"refresh"|"sortDown"|"sortUp"|"subTraffic"|"tbConsole"|"tbReload"|"tbSettingLink"|"tbSubConfig"|"userInbox"|"usernote"|"prerelease"|"unknownDocument"|"trainingMode"
Defined in: extension/data/store/contextMenu.ts:13
Icon name from the icons map.
order?¶
optionalorder?:number
Defined in: extension/data/store/contextMenu.ts:24
Sort position for this item. Lower numbers appear first. Items without an order are sorted to the end in insertion order.
text¶
text:
string
Defined in: extension/data/store/contextMenu.ts:11
Display text for the menu item.
title?¶
optionaltitle?:string
Defined in: extension/data/store/contextMenu.ts:15
Tooltip shown on hover.