mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
move "in UI" methods to popup utils
This commit is contained in:
@@ -116,23 +116,6 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
||||
return BrowserPlatformUtilsService.getDomain(uriString);
|
||||
}
|
||||
|
||||
inSidebar(theWindow: Window): boolean {
|
||||
return theWindow.location.search !== '' && theWindow.location.search.indexOf('uilocation=sidebar') > -1;
|
||||
}
|
||||
|
||||
inTab(theWindow: Window): boolean {
|
||||
return theWindow.location.search !== '' && theWindow.location.search.indexOf('uilocation=tab') > -1;
|
||||
}
|
||||
|
||||
inPopout(theWindow: Window): boolean {
|
||||
return theWindow.location.search !== '' && theWindow.location.search.indexOf('uilocation=popout') > -1;
|
||||
}
|
||||
|
||||
inPopup(theWindow: Window): boolean {
|
||||
return theWindow.location.search === '' || theWindow.location.search.indexOf('uilocation=') === -1 ||
|
||||
theWindow.location.search.indexOf('uilocation=popup') > -1;
|
||||
}
|
||||
|
||||
isViewOpen(): boolean {
|
||||
const popupOpen = chrome.extension.getViews({ type: 'popup' }).length > 0;
|
||||
if (popupOpen) {
|
||||
|
||||
Reference in New Issue
Block a user