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;
}
Reports whether the current document is rendered in a full browser tab (as opposed to the toolbar popup), based on the
?view=tabquery param set by openExtensionTab.