nsdotjs
    Preparing search index...

    Function addSidebarButton

    • Adds a button to the sidebar panel of the NationStates interface.

      The sidebar is the vertical navigation panel on the left (inside div#panel). Buttons are added to the main menu list (ul.menu).

      Parameters

      • text: string

        The text label for the button.

      • iconClass: Icon

        The CSS class for the button's icon (e.g., "globe", "radar").

      • onClick: () => void

        A function to be called when the button is clicked.

      • href: string = "#"

        The URL the button should link to. Defaults to "#" for action-only buttons.

      Returns null | HTMLLIElement

      The created list item element (HTMLLIElement) or null if a required container element is not found.