moderator-toolbox-nxg-for-reddit / dom/shreddit/queue
dom/shreddit/queue¶
Functions¶
getQueueItemPermalink()¶
getQueueItemPermalink(
item):string
Defined in: extension/data/dom/shreddit/queue.ts:32
Returns the permalink of a queue item.
Parameters¶
item¶
Element
Returns¶
string
getQueueItemReasons()¶
getQueueItemReasons(
item):ModQueueReason[]
Defined in: extension/data/dom/shreddit/queue.ts:40
Parses the mod-queue-reasons JSON from the modqueue-smart-truncate-text inside a queue
item. Returns an empty array when the element or attribute is missing or the JSON is invalid.
Parameters¶
item¶
Element
Returns¶
getQueueItems()¶
getQueueItems(
container?):Element[]
Defined in: extension/data/dom/shreddit/queue.ts:16
Returns all shreddit-post[view-context="ModQueue"] elements within a container.
Parameters¶
container?¶
Element | Document
Returns¶
Element[]
getQueueItemScore()¶
getQueueItemScore(
item):number
Defined in: extension/data/dom/shreddit/queue.ts:21
Returns the score of a queue item, defaulting to 1 when the attribute is absent or non-numeric.
Parameters¶
item¶
Element
Returns¶
number
getQueueItemSubreddit()¶
getQueueItemSubreddit(
item):string
Defined in: extension/data/dom/shreddit/queue.ts:27
Returns the bare subreddit name from a queue item (the subreddit-name attribute).
Parameters¶
item¶
Element
Returns¶
string
getQueueItemTextBodyEl()¶
getQueueItemTextBodyEl(
item):Element|null
Defined in: extension/data/dom/shreddit/queue.ts:51
Returns the div[slot="text-body"] light-DOM element within a queue item, or null.
Parameters¶
item¶
Element
Returns¶
Element | null
Interfaces¶
ModQueueReason¶
Defined in: extension/data/dom/shreddit/queue.ts:4
A single reason entry from the mod-queue-reasons JSON attribute on a queue item.
Properties¶
__typename¶
__typename:
string
Defined in: extension/data/dom/shreddit/queue.ts:6
GraphQL typename (e.g. 'ReportReason', 'AutoModFilterReason').
actor?¶
optionalactor?:object
Defined in: extension/data/dom/shreddit/queue.ts:12
The user or bot that triggered this reason, if applicable.
displayName¶
displayName:
string
icon?¶
optionalicon?:object
icon.url¶
url:
string
description?¶
optionaldescription?:object
Defined in: extension/data/dom/shreddit/queue.ts:8
markdown¶
markdown:
string
icon¶
icon:
string
Defined in: extension/data/dom/shreddit/queue.ts:10
HTML entity or URL string for the reason icon.
title¶
title:
string
Defined in: extension/data/dom/shreddit/queue.ts:7