mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
rename bg variables
This commit is contained in:
parent
bc132876c9
commit
985c02c5e1
@ -1,11 +1,9 @@
|
|||||||
import MainBackground from './background/main.background';
|
import MainBackground from './background/main.background';
|
||||||
|
|
||||||
// tslint:disable-next-line:variable-name
|
const bitwardenIsBackground = (window as any).bitwardenIsBackground = true;
|
||||||
const bg_isBackground = (window as any).bg_isBackground = true;
|
const bitwardenMain = (window as any).bitwardenMain = new MainBackground();
|
||||||
// tslint:disable-next-line:variable-name
|
|
||||||
const bg_main = (window as any).bg_main = new MainBackground();
|
|
||||||
|
|
||||||
// tslint:disable-next-line:no-var-requires
|
// tslint:disable-next-line:no-var-requires
|
||||||
require('./scripts/analytics.js');
|
require('./scripts/analytics.js');
|
||||||
|
|
||||||
bg_main.bootstrap();
|
bitwardenMain.bootstrap();
|
||||||
|
@ -120,7 +120,8 @@ class Cipher extends Domain {
|
|||||||
model.subTitle = model.login.username;
|
model.subTitle = model.login.username;
|
||||||
if (model.login.uri) {
|
if (model.login.uri) {
|
||||||
if (this.utilsService == null) {
|
if (this.utilsService == null) {
|
||||||
this.utilsService = chrome.extension.getBackgroundPage().bg_main.utilsService as UtilsService;
|
this.utilsService = chrome.extension.getBackgroundPage()
|
||||||
|
.bitwardenMain.utilsService as UtilsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
model.login.domain = this.utilsService.getDomain(model.login.uri);
|
model.login.domain = this.utilsService.getDomain(model.login.uri);
|
||||||
|
@ -95,7 +95,8 @@ class CipherString {
|
|||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
if (this.cryptoService == null) {
|
if (this.cryptoService == null) {
|
||||||
this.cryptoService = chrome.extension.getBackgroundPage().bg_main.cryptoService as CryptoService;
|
this.cryptoService = chrome.extension.getBackgroundPage()
|
||||||
|
.bitwardenMain.cryptoService as CryptoService;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.cryptoService.getOrgKey(orgId).then((orgKey: any) => {
|
return this.cryptoService.getOrgKey(orgId).then((orgKey: any) => {
|
||||||
|
@ -4,7 +4,7 @@ import { UtilsService } from '../../../services/abstractions/utils.service';
|
|||||||
function getBackgroundService<T>(service: string) {
|
function getBackgroundService<T>(service: string) {
|
||||||
return (): T => {
|
return (): T => {
|
||||||
const page = chrome.extension.getBackgroundPage();
|
const page = chrome.extension.getBackgroundPage();
|
||||||
return page ? page.bg_main[service] as T : null;
|
return page ? page.bitwardenMain[service] as T : null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bgMain = bgPage.bg_main;
|
var bgMain = bgPage.bitwardenMain;
|
||||||
if (!bgMain) {
|
if (!bgMain) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@
|
|||||||
request.send(message);
|
request.send(message);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof bg_isBackground !== 'undefined') {
|
if (typeof bitwardenIsBackground !== 'undefined') {
|
||||||
ga('send', 'pageview', '/background.html');
|
ga('send', 'pageview', '/background.html');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user