fix IBAN autofill
This commit is contained in:
		@@ -32,7 +32,7 @@ let disruption = "";
 | 
				
			|||||||
const ensureSettingsProp = (prop, existCallback, noExistCallback) => {
 | 
					const ensureSettingsProp = (prop, existCallback, noExistCallback) => {
 | 
				
			||||||
    return settings.get(prop).then(foundKeys => {
 | 
					    return settings.get(prop).then(foundKeys => {
 | 
				
			||||||
        console.debug("storage returned", foundKeys);
 | 
					        console.debug("storage returned", foundKeys);
 | 
				
			||||||
        if (prop in foundKeys){
 | 
					        if (prop in foundKeys) {
 | 
				
			||||||
            return existCallback(foundKeys[prop]);
 | 
					            return existCallback(foundKeys[prop]);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            return noExistCallback();
 | 
					            return noExistCallback();
 | 
				
			||||||
@@ -99,9 +99,9 @@ function processMutations(mutationList, observer) {
 | 
				
			|||||||
    if (currentStage === undefined) {
 | 
					    if (currentStage === undefined) {
 | 
				
			||||||
        currentStage = stages.shift();
 | 
					        currentStage = stages.shift();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (!("name" in currentStage)){
 | 
					    if (!("name" in currentStage)) {
 | 
				
			||||||
        // stages always have a `name`, so this must be the disruption type split
 | 
					        // stages always have a `name`, so this must be the disruption type split
 | 
				
			||||||
        if (disruption in currentStage){
 | 
					        if (disruption in currentStage) {
 | 
				
			||||||
            stages.unshift(...currentStage[disruption]);
 | 
					            stages.unshift(...currentStage[disruption]);
 | 
				
			||||||
            currentStage = stages.shift();
 | 
					            currentStage = stages.shift();
 | 
				
			||||||
        } else if (disruption == "") {
 | 
					        } else if (disruption == "") {
 | 
				
			||||||
@@ -285,7 +285,7 @@ const iDidntTravel = {
 | 
				
			|||||||
    match: node => node.classList.contains("antrags-typ-auswahl"),
 | 
					    match: node => node.classList.contains("antrags-typ-auswahl"),
 | 
				
			||||||
    execute: node => {
 | 
					    execute: node => {
 | 
				
			||||||
        const noTravel = $$(node, "input#antragstyp-nicht-angetreten");
 | 
					        const noTravel = $$(node, "input#antragstyp-nicht-angetreten");
 | 
				
			||||||
        if (noTravel instanceof HTMLInputElement){
 | 
					        if (noTravel instanceof HTMLInputElement) {
 | 
				
			||||||
            noTravel.dispatchEvent(new Event("change"));
 | 
					            noTravel.dispatchEvent(new Event("change"));
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -298,7 +298,7 @@ const iWentBack = {
 | 
				
			|||||||
    match: node => node.classList.contains("antrags-typ-auswahl"),
 | 
					    match: node => node.classList.contains("antrags-typ-auswahl"),
 | 
				
			||||||
    execute: node => {
 | 
					    execute: node => {
 | 
				
			||||||
        const wentBack = $$(node, "input#antragstyp-abgebrochen");
 | 
					        const wentBack = $$(node, "input#antragstyp-abgebrochen");
 | 
				
			||||||
        if (wentBack instanceof HTMLInputElement){
 | 
					        if (wentBack instanceof HTMLInputElement) {
 | 
				
			||||||
            wentBack.dispatchEvent(new Event("change"));
 | 
					            wentBack.dispatchEvent(new Event("change"));
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -481,7 +481,13 @@ const continueToPayout = {
 | 
				
			|||||||
/** @type Stage */
 | 
					/** @type Stage */
 | 
				
			||||||
const enterPaymentDetails = {
 | 
					const enterPaymentDetails = {
 | 
				
			||||||
    name: "enterPaymentDetails",
 | 
					    name: "enterPaymentDetails",
 | 
				
			||||||
    match: node => node.querySelector(".entschaedigung"),
 | 
					    match: node => {
 | 
				
			||||||
 | 
					        // Did not travel
 | 
				
			||||||
 | 
					        if (node.classList.contains("Entschaedigung")) return true;
 | 
				
			||||||
 | 
					        // Delayed
 | 
				
			||||||
 | 
					        if (node.querySelector(".Entschaedigung__description")) return true;
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    execute: node => {
 | 
					    execute: node => {
 | 
				
			||||||
        if (!hasConfiguredBankDetails) return true;
 | 
					        if (!hasConfiguredBankDetails) return true;
 | 
				
			||||||
        const xfrRadio = node.querySelector('#ueberweisung');
 | 
					        const xfrRadio = node.querySelector('#ueberweisung');
 | 
				
			||||||
@@ -505,8 +511,10 @@ const enterPaymentDetails = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
const defaultStages = [
 | 
					const defaultStages = [
 | 
				
			||||||
    startClaim, fillData, clickContinue,
 | 
					    startClaim, fillData, clickContinue,
 | 
				
			||||||
    {"delay": [iWasDelayed, moreThan60Minutes, continueToForm,
 | 
					    {
 | 
				
			||||||
        focusDepartureInput, jumpToTimeInput], "nodep": [iDidntTravel, focusDepartureInput], "abort": [iWentBack, focusDepartureInput, focusTurnaroundStationInput]},
 | 
					        "delay": [iWasDelayed, moreThan60Minutes, continueToForm,
 | 
				
			||||||
 | 
					            focusDepartureInput, jumpToTimeInput], "nodep": [iDidntTravel, focusDepartureInput], "abort": [iWentBack, focusDepartureInput, focusTurnaroundStationInput]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    activateAppellationDropdown, enterAppellationAndActivateTitleDropdown,
 | 
					    activateAppellationDropdown, enterAppellationAndActivateTitleDropdown,
 | 
				
			||||||
    enterTitleAndActivateCountryDropdown, enterCountry,
 | 
					    enterTitleAndActivateCountryDropdown, enterCountry,
 | 
				
			||||||
    enterTextPersonalData, /* continueToPayout, */ enterPaymentDetails
 | 
					    enterTextPersonalData, /* continueToPayout, */ enterPaymentDetails
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user