use the util functions

This commit is contained in:
iw0 2024-04-11 10:45:53 +02:00
parent d21941d306
commit d5f44954b9

View File

@ -333,12 +333,7 @@ const enterTitleAndActivateCountryDropdown = {
const enterCountry = {
name: "enterCountry",
expects: "mutation",
match: mutation => {
return mutation.target.parentNode.parentNode.classList.contains("test-adresse-land") &&
Array.from(mutation.addedNodes).some(
n => n.nodeType === Node.ELEMENT_NODE &&
n.classList.contains("db-web-dropdown-outer-container"))
},
match: mut => matchDropdown(mut, "test-adresse-land", "open"),
execute: () => {
ensureSettingsProp("addr__country", v => {
const selectList = $(".test-adresse-land ul");
@ -354,13 +349,8 @@ const enterCountry = {
const enterTextPersonalData = {
name: "enterTextPersonalData",
expects: 'mutation',
/** @param {MutationRecord} mutation */
match: mutation => {
return (mutation.target.parentNode.parentNode.classList.contains("test-name-titel") &&
Array.from(mutation.removedNodes).some(
n => n.nodeType === Node.ELEMENT_NODE &&
n.classList.contains("db-web-dropdown-outer-container")))
},
/** @param {MutationRecord} mut */
match: mut => matchDropdown(mut, "test-name-titel", "close"),
execute: () => {
let node = document;
let delay = 100;