DB changes
This commit is contained in:
parent
beea705bb0
commit
09dba84faa
@ -198,7 +198,7 @@ const matchDropdown = (mut, testName, openOrClose) => {
|
|||||||
return mut.target.parentNode.parentNode.classList.contains(testName) &&
|
return mut.target.parentNode.parentNode.classList.contains(testName) &&
|
||||||
Array.from(nodes).some(
|
Array.from(nodes).some(
|
||||||
n => n.nodeType === Node.ELEMENT_NODE &&
|
n => n.nodeType === Node.ELEMENT_NODE &&
|
||||||
n.classList.contains("db-web-dropdown-outer-container"))
|
n.classList.contains("db-web-transition-dropdown_outer-container"))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@param {MutationRecord} mut */
|
/**@param {MutationRecord} mut */
|
||||||
@ -225,7 +225,7 @@ const startClaim = {
|
|||||||
|
|
||||||
const fillData = {
|
const fillData = {
|
||||||
name: "fillData",
|
name: "fillData",
|
||||||
match: node => node.classList.contains("fahrgastrechte-bahn-card-auswahl"),
|
match: node => node.classList.contains("bahncard-auswahl"),
|
||||||
execute: node => {
|
execute: node => {
|
||||||
settings.get(["bcnum", "bday"]).then(cfg => {
|
settings.get(["bcnum", "bday"]).then(cfg => {
|
||||||
for (const [k, v] of Object.entries(cfg)) {
|
for (const [k, v] of Object.entries(cfg)) {
|
||||||
@ -245,7 +245,7 @@ const clickContinue = {
|
|||||||
name: "clickContinue",
|
name: "clickContinue",
|
||||||
match: () => $('#fahrgastrechte-bahn-card-auswahl-geburts-datum--db-web-text-input').value !== "",
|
match: () => $('#fahrgastrechte-bahn-card-auswahl-geburts-datum--db-web-text-input').value !== "",
|
||||||
execute: e => {
|
execute: e => {
|
||||||
const continueButton = $('.fahrgastrechte-bahn-card-auswahl button.fahrgastrechte-continue-button');
|
const continueButton = $('.bahncard-auswahl button.fahrgastrechte-continue-button');
|
||||||
if (continueButton instanceof Element) {
|
if (continueButton instanceof Element) {
|
||||||
continueButton.dispatchEvent(_clickEv());
|
continueButton.dispatchEvent(_clickEv());
|
||||||
return true;
|
return true;
|
||||||
|
10
eslint.config.mjs
Normal file
10
eslint.config.mjs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import globals from "globals";
|
||||||
|
import pluginJs from "@eslint/js";
|
||||||
|
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{ plugins: globals.webextensions.browser },
|
||||||
|
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
|
||||||
|
{languageOptions: { globals: globals.browser }},
|
||||||
|
pluginJs.configs.recommended,
|
||||||
|
];
|
@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.5.0",
|
||||||
"@types/firefox-webext-browser": "^111.0.2",
|
"@types/firefox-webext-browser": "^111.0.2",
|
||||||
|
"eslint": "~9.5.0",
|
||||||
|
"globals": "^15.6.0",
|
||||||
"web-ext": "^7.8.0",
|
"web-ext": "^7.8.0",
|
||||||
"webextension-polyfill": "github:mozilla/webextension-polyfill"
|
"webextension-polyfill": "github:mozilla/webextension-polyfill"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start:firefox": "web-ext run"
|
"start:firefox": "web-ext run"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"luhn": "^2.4.1",
|
|
||||||
"typescript": "^5.2.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
module.exports = {
|
export default {
|
||||||
ignoreFiles: [
|
ignoreFiles: [
|
||||||
"README.md",
|
"README.md",
|
||||||
"package.json",
|
"package.json",
|
Loading…
x
Reference in New Issue
Block a user