@freedomofpress/webcat
    Preparing search index...

    Class BrowserChromeController

    A class for interacting with browser chrome and extension internal pages.

    Hierarchy (View Summary)

    Index
    • Determines the browser color scheme currently in use.

      Returns "dark" | "light"

      The current color scheme.

    • Computes the URL of a named page.

      Parameters

      • name: string

        The name of the page.

      • Optionaloptions: { fragment?: string | URLSearchParams; query?: string | URLSearchParams }

      Returns string

      The absolute URL of the page.

    • Hides the icon shown on a specific tab.

      Parameters

      • tabId: number

        The ID of the tab to hide the icon from.

      Returns Promise<void>

    • Loads a named page in the specified tab.

      Parameters

      • tabId: number

        The ID of the tab to load the page in.

      • name: string

        The name of the page.

      • Optionaloptions: {
            fragment?: string | URLSearchParams;
            query?: string | URLSearchParams;
            replace?: boolean;
        }

      Returns Promise<void>

    • Displays an icon in the browser's URL bar.

      Parameters

      • tabId: number

        The ID of the tab to display the icon in.

      • Optionaloptions: {
            name?: string;
            popup?: {
                fragment?: string | URLSearchParams;
                name: string;
                query?: string | URLSearchParams;
            };
            title?: string;
        }
        • Optionalname?: string

          The name of the icon.

        • Optionalpopup?: {
              fragment?: string | URLSearchParams;
              name: string;
              query?: string | URLSearchParams;
          }

          The popup page to display on click.

        • Optionaltitle?: string

          The title displayed in the icon's tooltip.

      Returns Promise<void>