[bug] Point autofill at the correct storage key
This commit is contained in:
parent
2844e06aa8
commit
693e1e76b5
|
@ -3,9 +3,18 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
||||||
let filledThisHref = false;
|
let filledThisHref = false;
|
||||||
let delayFillTimeout: number;
|
let delayFillTimeout: number;
|
||||||
|
|
||||||
const enabledKey = "enableAutoFillOnPageLoad";
|
const activeUserIdKey = "activeUserId";
|
||||||
chrome.storage.local.get(enabledKey, (obj: any) => {
|
let activeUserId: string;
|
||||||
if (obj != null && obj[enabledKey] === true) {
|
|
||||||
|
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 && obj[activeUserId].settings.enableAutoFillOnPageLoad === true) {
|
||||||
setInterval(() => doFillIfNeeded(), 500);
|
setInterval(() => doFillIfNeeded(), 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue