moderator-toolbox-nxg-for-reddit / modules/modviewenhancements/features/subscriberCount

modules/modviewenhancements/features/subscriberCount

Functions

createSubscriberCountHandlers()

createSubscriberCountHandlers(enabled): object

Defined in: extension/data/modules/modviewenhancements/features/subscriberCount.ts:57

Fetches the current subreddit’s subscriber count from about.json and shows it in the old Reddit sidebar. No-op off old Reddit, when disabled, or on pages without a subreddit titlebox.

Parameters

enabled

boolean

Whether the user has the subscriber-count setting on.

Returns

object

An object with a cleanup function that removes the injected line.

cleanup

cleanup: () => Promise<void>

Returns

Promise<void>

Variables

subscriberCountClass

const subscriberCountClass: "toolbox-subscriber-count" = 'toolbox-subscriber-count'

Defined in: extension/data/modules/modviewenhancements/features/subscriberCount.ts:12

Class on the injected element; also the marker that stops a second injection.