fix the acquisition callback

This commit is contained in:
iw0
2024-05-29 13:53:23 +02:00
parent de690f43a3
commit 5dda9e52d9
2 changed files with 6 additions and 14 deletions

View File

@ -177,13 +177,11 @@ function startBcnumAcquisition(ev) {
})
}
function startAllAcquisition(ev) {
browser.storage.sync.set({"acquireAll":true}).then(() => {
browser.storage.sync.set({ "acquireAll": true }).then(() => {
browser.storage.sync.onChanged.addListener(changes => {
console.debug(changes);
for(const [key, changeSet] of Object.entries(changes)){
if (key === "acquireAll"){
document.location.reload();
}
if ("acquireAll" in changes) {
document.location.reload();
}
})
bahncardWindow = window.open("https://www.bahn.de/buchung/kundenkonto/bahncard", "_blank", "popup")