add browser typing to global def
This commit is contained in:
parent
2d6107fae1
commit
418951021f
|
@ -3,8 +3,8 @@ 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');
|
||||
static isFirefoxOnAndroid: boolean =
|
||||
navigator.userAgent.indexOf('Firefox/') !== -1 && navigator.userAgent.indexOf('Android') !== -1;
|
||||
static isFirefoxOnAndroid: boolean = navigator.userAgent.indexOf('Firefox/') !== -1 &&
|
||||
navigator.userAgent.indexOf('Android') !== -1;
|
||||
|
||||
static async getTabFromCurrentWindowId(): Promise<any> {
|
||||
if (BrowserApi.isChromeApi) {
|
||||
|
|
|
@ -2,4 +2,5 @@ declare function escape(s: string): string;
|
|||
declare function unescape(s: string): string;
|
||||
declare var opr: any;
|
||||
declare var chrome: any;
|
||||
declare var browser: any;
|
||||
declare var safari: any;
|
||||
|
|
Loading…
Reference in New Issue