Fix regression in notificationBar (#2314)
(cherry picked from commit 2844e06aa8
)
This commit is contained in:
parent
d47cdbcd60
commit
65b493cce0
|
@ -48,23 +48,32 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
||||||
let disabledAddLoginNotification = false;
|
let disabledAddLoginNotification = false;
|
||||||
let disabledChangedPasswordNotification = false;
|
let disabledChangedPasswordNotification = false;
|
||||||
|
|
||||||
chrome.storage.local.get("neverDomains", (ndObj: any) => {
|
const activeUserIdKey = "activeUserId";
|
||||||
const domains = ndObj.neverDomains;
|
let activeUserId: string;
|
||||||
|
chrome.storage.local.get(activeUserIdKey, (obj: any) => {
|
||||||
|
if (obj == null || obj[activeUserIdKey] == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
activeUserId = obj[activeUserIdKey];
|
||||||
|
});
|
||||||
|
|
||||||
|
chrome.storage.local.get(activeUserId, (obj: any) => {
|
||||||
|
if (obj === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const domains = obj[activeUserId].settings.neverDomains;
|
||||||
if (domains != null && domains.hasOwnProperty(window.location.hostname)) {
|
if (domains != null && domains.hasOwnProperty(window.location.hostname)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
chrome.storage.local.get("disableAddLoginNotification", (disAddObj: any) => {
|
disabledAddLoginNotification = obj[activeUserId].settings.disableAddLoginNotification;
|
||||||
disabledAddLoginNotification =
|
disabledChangedPasswordNotification =
|
||||||
disAddObj != null && disAddObj.disableAddLoginNotification === true;
|
obj[activeUserId].settings.disableChangedPasswordNotification;
|
||||||
chrome.storage.local.get("disableChangedPasswordNotification", (disChangedObj: any) => {
|
|
||||||
disabledChangedPasswordNotification =
|
if (!disabledAddLoginNotification || !disabledChangedPasswordNotification) {
|
||||||
disChangedObj != null && disChangedObj.disableChangedPasswordNotification === true;
|
collectIfNeededWithTimeout();
|
||||||
if (!disabledAddLoginNotification || !disabledChangedPasswordNotification) {
|
}
|
||||||
collectIfNeededWithTimeout();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
chrome.runtime.onMessage.addListener((msg: any, sender: any, sendResponse: Function) => {
|
chrome.runtime.onMessage.addListener((msg: any, sender: any, sendResponse: Function) => {
|
||||||
|
|
Loading…
Reference in New Issue