moderator-toolbox-nxg-for-reddit / util/wiki/wikiConstants

util/wiki/wikiConstants

Functions

isTombstone()

isTombstone(data): boolean

Defined in: extension/data/util/wiki/wikiConstants.ts:68

Returns true when a parsed toolbox page is an NXG tombstone rather than a real 6.x config.

Parameters

data

object

Returns

boolean


stripLayoutMetadata()

stripLayoutMetadata(config): Record<string, unknown>

Defined in: extension/data/util/wiki/wikiConstants.ts:60

Returns a shallow copy of a config object without the NXG layout metadata keys. Used when writing the legacy toolbox mirror, which 6.x parses.

Parameters

config

object

Returns

Record<string, unknown>

Type Aliases

WikiPageName

WikiPageName = "settings" | "usernotes" | "notes" | "userSettings"

Defined in: extension/data/util/wiki/wikiConstants.ts:10

Logical names for the wiki pages toolbox manages.

Variables

COMPAT_WRITES_KEY

const COMPAT_WRITES_KEY: "Toolbox.Utils.compatibilityWrites" = 'Toolbox.Utils.compatibilityWrites'

Defined in: extension/data/util/wiki/wikiConstants.ts:54

Config key inside the toolbox-nxg page holding the per-subreddit 6.x-compatibility flag. Written explicitly on every NXG config save.


DOMAIN_TAGS_PAGE

const DOMAIN_TAGS_PAGE: "toolbox-nxg/domain-tags" = 'toolbox-nxg/domain-tags'

Defined in: extension/data/util/wiki/wikiConstants.ts:35

The single canonical wiki page for NXG domain tags. Domain tags are NXG-only: 6.x reads them from the main config page (re-injected via encodeClassicConfig during the compatibility copy), not from a standalone page, so there is no legacy mirror and this path must never be fanned out through the generic write-path machinery.


NEW_NOTE_PAGE_PREFIX

const NEW_NOTE_PAGE_PREFIX: "toolbox-nxg/notes/" = 'toolbox-nxg/notes/'

Defined in: extension/data/util/wiki/wikiConstants.ts:41

NXG wiki page prefix for individual subreddit note pages.


NEW_WIKI_PATHS

const NEW_WIKI_PATHS: Record<WikiPageName, string>

Defined in: extension/data/util/wiki/wikiConstants.ts:21

New centralized page paths, keyed by logical name.


OLD_NOTE_PAGE_PREFIX

const OLD_NOTE_PAGE_PREFIX: "notes/" = 'notes/'

Defined in: extension/data/util/wiki/wikiConstants.ts:38

Legacy wiki page prefix for individual subreddit note pages.


OLD_WIKI_PATHS

const OLD_WIKI_PATHS: Record<WikiPageName, string>

Defined in: extension/data/util/wiki/wikiConstants.ts:13

Old (legacy) page paths, keyed by logical name.


WIKI_LAYOUT_KEY

const WIKI_LAYOUT_KEY: "Toolbox.Utils.wikiLayout" = 'Toolbox.Utils.wikiLayout'

Defined in: extension/data/util/wiki/wikiConstants.ts:48

Config key marking a toolbox page as an NXG tombstone. Only written when compatibility mode is turned off; its presence without a toolbox-nxg page means the NXG pages were deleted externally.