mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-17 15:37:57 +01:00
update message data keys
This commit is contained in:
parent
52c370f2b9
commit
4077630a92
@ -269,10 +269,10 @@ export default class RuntimeBackground {
|
|||||||
const responseVal: any = {};
|
const responseVal: any = {};
|
||||||
if (responseCommand === 'notificationBarDataResponse') {
|
if (responseCommand === 'notificationBarDataResponse') {
|
||||||
responseVal.neverDomains = await this.storageService.get<string[]>(ConstantsService.neverDomainsKey);
|
responseVal.neverDomains = await this.storageService.get<string[]>(ConstantsService.neverDomainsKey);
|
||||||
responseVal.disableAddLoginNotification = await this.storageService.get<boolean>(
|
responseVal.disabledNotification = await this.storageService.get<boolean>(
|
||||||
ConstantsService.disableAddLoginNotificationKey);
|
ConstantsService.disableAddLoginNotificationKey);
|
||||||
} else if (responseCommand === 'autofillerAutofillOnPageLoadEnabledResponse') {
|
} else if (responseCommand === 'autofillerAutofillOnPageLoadEnabledResponse') {
|
||||||
responseVal.enableAutoFillOnPageLoad = await this.storageService.get<boolean>(
|
responseVal.autofillEnabled = await this.storageService.get<boolean>(
|
||||||
ConstantsService.enableAutoFillOnPageLoadKey);
|
ConstantsService.enableAutoFillOnPageLoadKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
let pageHref = null;
|
let pageHref = null;
|
||||||
const enabledKey = 'enableAutoFillOnPageLoad';
|
|
||||||
|
|
||||||
if ((typeof safari !== 'undefined')) {
|
if ((typeof safari !== 'undefined')) {
|
||||||
const responseCommand = 'autofillerAutofillOnPageLoadEnabledResponse';
|
const responseCommand = 'autofillerAutofillOnPageLoadEnabledResponse';
|
||||||
@ -10,13 +9,14 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
|||||||
});
|
});
|
||||||
safari.self.addEventListener('message', function (msgEvent) {
|
safari.self.addEventListener('message', function (msgEvent) {
|
||||||
const msg = msgEvent.message;
|
const msg = msgEvent.message;
|
||||||
if (msg.command === responseCommand && msg.data[enabledKey] === true) {
|
if (msg.command === responseCommand && msg.data.autofillEnabled === true) {
|
||||||
setInterval(doFillIfNeeded, 500);
|
setInterval(doFillIfNeeded, 500);
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
const enabledKey = 'enableAutoFillOnPageLoad';
|
||||||
chrome.storage.local.get(enabledKey, (obj) => {
|
chrome.storage.local.get(enabledKey, (obj) => {
|
||||||
if (obj && obj[enabledKey] === true) {
|
if (obj && obj[enabledKey] === true) {
|
||||||
setInterval(doFillIfNeeded, 500);
|
setInterval(doFillIfNeeded, 500);
|
||||||
|
@ -31,7 +31,7 @@ document.addEventListener('DOMContentLoaded', function (event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notificationBarData.disableAddLoginNotification === true) {
|
if (notificationBarData.disabledNotification === true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user