1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

copy common ts code over from browser repo

This commit is contained in:
Kyle Spearrin
2018-01-03 21:20:41 -05:00
parent ace8bd5e85
commit a95632294f
77 changed files with 6179 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { BrowserType } from '../../enums/browserType.enum';
export interface UtilsService {
getBrowser(): BrowserType;
getBrowserString(): string;
isFirefox(): boolean;
isChrome(): boolean;
isEdge(): boolean;
isOpera(): boolean;
analyticsId(): string;
initListSectionItemListeners(doc: Document, angular: any): void;
copyToClipboard(text: string, doc?: Document): void;
getDomain(uriString: string): string;
getHostname(uriString: string): string;
inSidebar(theWindow: Window): boolean;
inTab(theWindow: Window): boolean;
inPopout(theWindow: Window): boolean;
inPopup(theWindow: Window): boolean;
saveObjToStorage(key: string, obj: any): Promise<any>;
removeFromStorage(key: string): Promise<any>;
getObjFromStorage<T>(key: string): Promise<T>;
}