mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-10 01:28:36 +02:00
fix analytics
This commit is contained in:
parent
e1626dfc43
commit
76eeb4e41d
@ -43,6 +43,8 @@ import { AuthService } from 'jslib/services/auth.service';
|
|||||||
import { ConstantsService } from 'jslib/services/constants.service';
|
import { ConstantsService } from 'jslib/services/constants.service';
|
||||||
import { StateService } from 'jslib/services/state.service';
|
import { StateService } from 'jslib/services/state.service';
|
||||||
|
|
||||||
|
import { Analytics } from 'jslib/misc/analytics';
|
||||||
|
|
||||||
import { PopupUtilsService } from './popup-utils.service';
|
import { PopupUtilsService } from './popup-utils.service';
|
||||||
|
|
||||||
function getBgService<T>(service: string) {
|
function getBgService<T>(service: string) {
|
||||||
@ -71,13 +73,21 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer
|
|||||||
window.document.body.classList.add('body-sm');
|
window.document.body.classList.add('body-sm');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i18nService != null) {
|
|
||||||
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
|
|
||||||
authService.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
stateService.save(ConstantsService.disableFaviconKey,
|
stateService.save(ConstantsService.disableFaviconKey,
|
||||||
await storageService.get<boolean>(ConstantsService.disableFaviconKey));
|
await storageService.get<boolean>(ConstantsService.disableFaviconKey));
|
||||||
|
|
||||||
|
if (BrowserApi.getBackgroundPage() != null) {
|
||||||
|
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
|
||||||
|
authService.init();
|
||||||
|
|
||||||
|
new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
|
||||||
|
const bgPage = BrowserApi.getBackgroundPage();
|
||||||
|
if (bgPage == null || bgPage.bitwardenMain == null) {
|
||||||
|
throw 'Cannot resolve background page main.';
|
||||||
|
}
|
||||||
|
return bgPage.bitwardenMain;
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="left">
|
<div class="left">
|
||||||
<app-pop-out [show]="!inSidebar"></app-pop-out>
|
<app-pop-out [show]="!inSidebar"></app-pop-out>
|
||||||
<button type="button" appBlurClick (click)="refresh()" title="{{'refresh' | i18n}}" *ngIf="inSidebar">
|
<button type="button" appBlurClick (click)="refresh()" title="{{'refresh' | i18n}}" *ngIf="inSidebar">
|
||||||
<i class="fa fa-refresh fa-lg fa-fw"></i>
|
<i class="fa fa-retweet fa-lg fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
|
Loading…
Reference in New Issue
Block a user