moderator-toolbox-nxg-for-reddit / modules/general/dom
modules/general/dom¶
Functions¶
createClassicThemeHandlers()¶
createClassicThemeHandlers():
ClassicThemeHandlers
Defined in: extension/data/modules/general/dom.ts:22
Creates the handlers that switch the classic theme on and off.
Returns¶
The apply handler and a cleanup that removes the theme class.
Interfaces¶
ClassicThemeHandlers¶
Defined in: extension/data/modules/general/dom.ts:11
Handler bundle returned by createClassicThemeHandlers.
Properties¶
applyClassicTheme¶
applyClassicTheme: (
enabled) =>void
Defined in: extension/data/modules/general/dom.ts:13
Turns the classic theme on or off. Safe to call repeatedly with the same value.
Parameters¶
enabled¶
boolean
Returns¶
void
cleanup¶
cleanup: () =>
Promise<void>
Defined in: extension/data/modules/general/dom.ts:15
Removes the theme class, restoring the default look.
Returns¶
Promise<void>
Variables¶
classicThemeClass¶
constclassicThemeClass:"toolbox-theme-classic"='toolbox-theme-classic'
Defined in: extension/data/modules/general/dom.ts:8
Root class that activates the classic theme’s token overrides in css/classic.css.
It lives on <html> so the overrides inherit into every light-DOM mount and shadow root.