Class DeputyModuleAbstract

A Deputy module. Modules are parts of Deputy that can usually be removed and turned into standalone components that can load without Deputy.

Hierarchy (view full)

Constructors

Properties

deputy?: Deputy

An instance of Deputy. This is commonly window.deputy. Instantiating this class with a Deputy instances enables connection with the Deputy core, which shares the OOUI window manager and API manager for Deputy.

Accessors

  • get wikiConfig(): WikiConfiguration
  • Returns WikiConfiguration

    the wiki-wide configuration handler for this module. If Deputy is loaded, this reuses the configuration handler of Deputy. Since the wiki config is loaded asynchronously, this may not be populated at runtime. Only use it if you're sure that preInit has already been called and finished.

Methods

  • Get the module key for this module. Allows modules to be identified with a different configuration key.

    Returns string

    The module key. the module name by default.

  • Returns string

    the symbolic name of this module. Eventually used for getting translation strings, etc.

  • Load the language pack for this module, with a fallback in case one could not be loaded.

    Parameters

    • fallback: Record<string, string>

      The fallback to use if a language pack could not be loaded.

    Returns Promise<void>

  • Pre-initialize the module. This is the opportunity of the module to load language strings, append important UI elements, add portlets, etc.

    Parameters

    • languageFallback: Record<string, string>

      The fallback language pack to use if one could not be loaded.

    Returns Promise<boolean>