From fe57dc73a0cc37866320c39e84995b9c66a6efce Mon Sep 17 00:00:00 2001 From: iw0 Date: Wed, 10 Apr 2024 23:29:00 +0200 Subject: [PATCH] formatting & semantics --- content_script.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/content_script.js b/content_script.js index 7eedbdb..5317b04 100644 --- a/content_script.js +++ b/content_script.js @@ -123,6 +123,7 @@ function nextStage() { if (stages.length > 0) { currentStage = stages.shift(); } else { + console.log("no more stages - disconnecting observer"); observer.disconnect(); } } @@ -400,16 +401,18 @@ const enterTextPersonalData = { const continueToPayout = { name: "continueToPayout", expects: "mutation", - match: () => Object.is(document.activeElement, $(".fahrgastrechte-editable__buttons button.fahrgastrechte-continue-button")) - , + match: () => Object.is( + document.activeElement, + $(".fahrgastrechte-editable__buttons button.fahrgastrechte-continue-button") + ), execute: () => document.activeElement.dispatchEvent(_clickEv()), } const enterPaymentDetails = { name: "enterPaymentDetails", - match: node => node.querySelector(".entschaedigung") && - hasConfiguredBankDetails, + match: node => node.querySelector(".entschaedigung"), execute: node => { + if (!hasConfiguredBankDetails) return true; const xfrRadio = node.querySelector('#ueberweisung'); xfrRadio.dispatchEvent(new Event('change')); settings.get(bankDetailConfigKeys).then(results => {