assign window from app
This commit is contained in:
parent
e0674e1b9c
commit
4081c55be1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue