ChemPal Documentation - v1.6.0
    Preparing search index...

    Function isTabView

    • Reports whether the current document is rendered in a full browser tab (as opposed to the toolbar popup), based on the ?view=tab query param set by openExtensionTab.

      Returns boolean

      true when running in the full-tab view, otherwise false.

      // URL: chrome-extension://<id>/index.html?view=tab
      isTabView(); // => true
      // URL: chrome-extension://<id>/index.html
      isTabView(); // => false
      export function isTabView(): boolean {
      return new URLSearchParams(window.location.search).get(VIEW_PARAM) === TAB_VIEW;
      }