mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-03 08:49:50 +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 = {};
|
||||
if (responseCommand === 'notificationBarDataResponse') {
|
||||
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);
|
||||
} else if (responseCommand === 'autofillerAutofillOnPageLoadEnabledResponse') {
|
||||
responseVal.enableAutoFillOnPageLoad = await this.storageService.get<boolean>(
|
||||
responseVal.autofillEnabled = await this.storageService.get<boolean>(
|
||||
ConstantsService.enableAutoFillOnPageLoadKey);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
let pageHref = null;
|
||||
const enabledKey = 'enableAutoFillOnPageLoad';
|
||||
|
||||
if ((typeof safari !== 'undefined')) {
|
||||
const responseCommand = 'autofillerAutofillOnPageLoadEnabledResponse';
|
||||
@ -10,13 +9,14 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
||||
});
|
||||
safari.self.addEventListener('message', function (msgEvent) {
|
||||
const msg = msgEvent.message;
|
||||
if (msg.command === responseCommand && msg.data[enabledKey] === true) {
|
||||
if (msg.command === responseCommand && msg.data.autofillEnabled === true) {
|
||||
setInterval(doFillIfNeeded, 500);
|
||||
}
|
||||
}, false);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
const enabledKey = 'enableAutoFillOnPageLoad';
|
||||
chrome.storage.local.get(enabledKey, (obj) => {
|
||||
if (obj && obj[enabledKey] === true) {
|
||||
setInterval(doFillIfNeeded, 500);
|
||||
|
@ -31,7 +31,7 @@ document.addEventListener('DOMContentLoaded', function (event) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (notificationBarData.disableAddLoginNotification === true) {
|
||||
if (notificationBarData.disabledNotification === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user