mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
assign window from app
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class BrowserApi {
|
||||
export class BrowserApi {
|
||||
static isSafariApi: boolean = (typeof safari !== 'undefined') &&
|
||||
navigator.userAgent.indexOf(' Safari/') !== -1 && navigator.userAgent.indexOf('Chrome') === -1;
|
||||
static isChromeApi: boolean = !BrowserApi.isSafariApi && (typeof chrome !== 'undefined');
|
||||
@@ -250,6 +250,3 @@ class BrowserApi {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export { BrowserApi };
|
||||
(window as any).BrowserApi = BrowserApi;
|
||||
|
||||
@@ -18,7 +18,10 @@ require('../../scripts/duo.js');
|
||||
require('../less/libs.less');
|
||||
require('../less/popup.less');
|
||||
|
||||
import U2f from '../../scripts/u2f';
|
||||
import { BrowserApi } from '../../browser/browserApi';
|
||||
window.BrowserApi = BrowserApi;
|
||||
import { U2f } from '../../scripts/u2f';
|
||||
window.U2f = U2f;
|
||||
|
||||
import Analytics from '../../scripts/analytics';
|
||||
new Analytics(window);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class U2f {
|
||||
export class U2f {
|
||||
private iframe: HTMLIFrameElement = null;
|
||||
private connectorLink: HTMLAnchorElement;
|
||||
|
||||
@@ -71,6 +71,3 @@ class U2f {
|
||||
event.data.indexOf('info|') === 0;
|
||||
}
|
||||
}
|
||||
|
||||
export { U2f };
|
||||
(window as any).U2f = U2f;
|
||||
|
||||
Reference in New Issue
Block a user