moderator-toolbox-nxg-for-reddit / dom/oldReddit/queue
dom/oldReddit/queue¶
Functions¶
getAllThingCheckboxes()¶
getAllThingCheckboxes():
HTMLInputElement[]
Defined in: extension/data/dom/oldReddit/queue.ts:19
Returns all input[type=checkbox] inputs within .thing elements on the page.
Returns¶
HTMLInputElement[]
getModReports()¶
getModReports(
container?):Element[]
Defined in: extension/data/dom/oldReddit/queue.ts:67
Returns .report-reasons .mod-report elements, optionally scoped to a container.
Parameters¶
container?¶
Element | Document
Returns¶
Element[]
getPromotedAndRankEls()¶
getPromotedAndRankEls():
Element[]
Defined in: extension/data/dom/oldReddit/queue.ts:95
Returns #siteTable_promoted, #siteTable_organic, and .rank elements for removal.
Returns¶
Element[]
getSiteTableThings()¶
getSiteTableThings(
container?):Element[]
Defined in: extension/data/dom/oldReddit/queue.ts:9
Returns all .sitetable .thing elements, optionally scoped to a container.
Parameters¶
container?¶
Element | Document
Returns¶
Element[]
getSpamThings()¶
getSpamThings(
container?):Element[]
Defined in: extension/data/dom/oldReddit/queue.ts:62
Returns .thing.spam elements, optionally scoped to a container.
Parameters¶
container?¶
Element | Document
Returns¶
Element[]
getThingCheckbox()¶
getThingCheckbox(
thing):HTMLInputElement|null
Defined in: extension/data/dom/oldReddit/queue.ts:14
Returns the input[type=checkbox] within a thing, or null.
Parameters¶
thing¶
Element
Returns¶
HTMLInputElement | null
getThingEditedTimestampEl()¶
getThingEditedTimestampEl(
thing):Element|null
Defined in: extension/data/dom/oldReddit/queue.ts:29
Returns the time.edited-timestamp element in a thing’s tagline, or null.
Parameters¶
thing¶
Element
Returns¶
Element | null
getThingFlatListContextLink()¶
getThingFlatListContextLink(
thing):Element|null
Defined in: extension/data/dom/oldReddit/queue.ts:57
Returns the .flat-list.buttons .first a context-link within a thing, or null.
Parameters¶
thing¶
Element
Returns¶
Element | null
getThingMarkdownEls()¶
getThingMarkdownEls(
thing):Element[]
Defined in: extension/data/dom/oldReddit/queue.ts:100
Returns all .md (markdown) elements within a thing.
Parameters¶
thing¶
Element
Returns¶
Element[]
getThingRemovedAtEl()¶
getThingRemovedAtEl(
thing):Element|null
Defined in: extension/data/dom/oldReddit/queue.ts:34
Returns the li[title^="removed at"] element within a thing, or null.
Parameters¶
thing¶
Element
Returns¶
Element | null
getThingScoreTextEl()¶
getThingScoreTextEl(
thing):Element|null
Defined in: extension/data/dom/oldReddit/queue.ts:52
Returns the score element that matches the current vote state
(.score.likes, .score.unvoted, or .score.dislikes) within a thing, or null.
Parameters¶
thing¶
Element
Returns¶
Element | null
getThingSubredditEl()¶
getThingSubredditEl(
thing):Element|null
Defined in: extension/data/dom/oldReddit/queue.ts:90
Returns the .subreddit link element within a thing, or null.
Parameters¶
thing¶
Element
Returns¶
Element | null
getThingTimestampEl()¶
getThingTimestampEl(
thing):Element|null
Defined in: extension/data/dom/oldReddit/queue.ts:24
Returns the first non-edited time element in a thing’s tagline, or null.
Parameters¶
thing¶
Element
Returns¶
Element | null
getThingTitleLinks()¶
getThingTitleLinks(
thing):Element[]
Defined in: extension/data/dom/oldReddit/queue.ts:105
Returns all a.title link elements within a thing.
Parameters¶
thing¶
Element
Returns¶
Element[]
getThingVisibleScoreEl()¶
getThingVisibleScoreEl(
thing):Element|null
Defined in: extension/data/dom/oldReddit/queue.ts:42
Returns the first .score element within a thing whose computed display is not 'none'.
Requires a live document with layout; cannot be unit-tested with jsdom.
Parameters¶
thing¶
Element
Returns¶
Element | null
getUserReports()¶
getUserReports(
container?):Element[]
Defined in: extension/data/dom/oldReddit/queue.ts:72
Returns .report-reasons .user-report elements (free-text user reports), optionally scoped to a container.
Parameters¶
container?¶
Element | Document
Returns¶
Element[]
isThingPromotedPost()¶
isThingPromotedPost(
thing):boolean
Defined in: extension/data/dom/oldReddit/queue.ts:85
Returns true if a thing is a promoted post, detected by .parent text ending with
[promoted post].
Parameters¶
thing¶
Element
Returns¶
boolean